diff --git a/.gitattributes b/.gitattributes index ea199d90d0539bae182bc6ea0466bf0faf6489a2..171ec7c271da52c722c0f32770104da2de6dca3a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4438,3 +4438,8 @@ tool_server/.venv/lib/python3.12/site-packages/ray/_private/runtime_env/agent/th tool_server/.venv/lib/python3.12/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp/_websocket/reader_c.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text tool_server/.venv/lib/python3.12/site-packages/ray/_private/runtime_env/agent/thirdparty_files/idna/__pycache__/uts46data.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text tool_server/.venv/lib/python3.12/site-packages/ray/_private/thirdparty/pynvml/__pycache__/pynvml.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/gcs/gcs_server filter=lfs diff=lfs merge=lfs -text +tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/raylet/raylet filter=lfs diff=lfs merge=lfs -text +tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/compiled_dag_node.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +tool_server/.venv/lib/python3.12/site-packages/ray/data/__pycache__/dataset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +tool_server/.venv/lib/python3.12/site-packages/ray/data/__pycache__/read_api.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/__pycache__/data_batch_type.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/__pycache__/data_batch_type.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..79044cabdcab87c3300d29b7dca8e0f3b00fcf5e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/__pycache__/data_batch_type.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/__pycache__/result.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/__pycache__/result.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ee3abe41df82974c137b65ac7e941e9e69c1bbc Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/__pycache__/result.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/__pycache__/session.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/__pycache__/session.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..789daa376edef90f7b00e783b1c8162bbd0860c0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/__pycache__/session.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4f8547f4e7a92750af2c456bb62c0b9e974a9e8b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/config.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de659bb60450ed62c6ca037535fb6fa0dcb97222 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/config.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/filelock.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/filelock.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d604e3782ee4d37c1acd2902fbafcacb29b08731 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/filelock.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/json.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/json.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4c3cc5e88a923a00b7384495b987eba06a7918ec Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/json.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/mlflow.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/mlflow.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0dcbcb517ecff38ebab72e0c93fce0ede889331a Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/mlflow.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/tensorflow_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/tensorflow_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..943b7d4b9a29c7723999878a8bcab100d35a9da0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/tensorflow_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/torch_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/torch_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8886e650be79d29f7130043131dd71b2db97fa2a Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/torch_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/uri_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/uri_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7c90a55dc573ea504de65bf481b90b1699e32b7d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/uri_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/usage.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/usage.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..def2c40060420ecefc6491facbf995fb3eddbd9a Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/usage.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/util.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f65f76534429f4dd19bd9e3f52b64ab6f75ed43 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/__pycache__/util.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..824833df03ffe9e03f583856b9336d7610386d91 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__init__.py @@ -0,0 +1,92 @@ +import logging +import threading +from typing import Optional + +import ray +import ray._private.ray_constants as ray_constants +from ray.air._internal.device_manager.cpu import CPUTorchDeviceManager +from ray.air._internal.device_manager.hpu import HPUTorchDeviceManager +from ray.air._internal.device_manager.npu import NPUTorchDeviceManager +from ray.air._internal.device_manager.nvidia_gpu import CUDATorchDeviceManager +from ray.air._internal.device_manager.torch_device_manager import TorchDeviceManager + +logger = logging.getLogger(__name__) + + +DEFAULT_TORCH_DEVICE_MANAGER_CLS = CPUTorchDeviceManager + + +SUPPORTED_ACCELERATOR_TORCH_DEVICE_MANAGER = { + ray_constants.GPU: CUDATorchDeviceManager, + ray_constants.HPU: HPUTorchDeviceManager, + ray_constants.NPU: NPUTorchDeviceManager, +} + + +def register_custom_torch_dist_backend(backend: Optional[str] = None) -> None: + if backend == "hccl": + # The name for the communication backend of Habana and torch-npu is the same. + HPUTorchDeviceManager.register_custom_torch_dist_backend() + + NPUTorchDeviceManager.register_custom_torch_dist_backend() + + +_torch_device_manager = None +_torch_device_manager_lock = threading.Lock() + + +def get_torch_device_manager_by_context() -> TorchDeviceManager: + global _torch_device_manager + + with _torch_device_manager_lock: + if not _torch_device_manager: + existing_device_manager_cls = None + resources = ray.get_runtime_context().get_accelerator_ids() + + # select correct accelerator type from resources + for resource_type, resource_value in resources.items(): + device_manager_cls = SUPPORTED_ACCELERATOR_TORCH_DEVICE_MANAGER.get( + resource_type, None + ) + if resource_value and device_manager_cls: + # An error will raise when multiple accelerators are specified. + if existing_device_manager_cls: + raise RuntimeError( + "Unable to determine the appropriate DeviceManager " + f"for the specified resources {resources}." + ) + else: + existing_device_manager_cls = device_manager_cls + + device_manager_cls = ( + existing_device_manager_cls or DEFAULT_TORCH_DEVICE_MANAGER_CLS + ) + + _torch_device_manager = device_manager_cls() + + return _torch_device_manager + + +def get_torch_device_manager_by_device_type(device_type: str): + if device_type.lower() == ray_constants.GPU.lower() or device_type == "cuda": + return CUDATorchDeviceManager() + elif device_type.lower() == ray_constants.NPU.lower(): + return NPUTorchDeviceManager() + elif device_type.lower() == ray_constants.HPU.lower(): + return HPUTorchDeviceManager() + elif device_type.lower() == "cpu": + return CPUTorchDeviceManager() + + raise RuntimeError(f"Device type {device_type} cannot be recognized.") + + +__all__ = [ + TorchDeviceManager, + CPUTorchDeviceManager, + CUDATorchDeviceManager, + HPUTorchDeviceManager, + NPUTorchDeviceManager, + register_custom_torch_dist_backend, + get_torch_device_manager_by_context, + get_torch_device_manager_by_device_type, +] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b6f54ef7080f3c445e131e0a31305569d84cd41 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/cpu.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/cpu.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1fadcd120aa9624a45d4de1bf90d3c6533a46c79 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/cpu.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/hpu.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/hpu.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..db288f1a06288981e6c2a4eee36a16909aef05f4 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/hpu.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/npu.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/npu.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a87d6913272ff1c98ffa9d6379b013c4d926fd9c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/npu.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/nvidia_gpu.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/nvidia_gpu.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..502b948a82966209a597ef05066f0aececa4e0ac Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/nvidia_gpu.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/torch_device_manager.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/torch_device_manager.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2f1e619ca04321f69809a5d030e581690a62534b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/__pycache__/torch_device_manager.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/cpu.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/cpu.py new file mode 100644 index 0000000000000000000000000000000000000000..76fa73765287c6bf68a0b2f6e7d4130297b799df --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/cpu.py @@ -0,0 +1,30 @@ +from contextlib import contextmanager +from typing import List + +import torch + +from ray.air._internal.device_manager.torch_device_manager import TorchDeviceManager + + +class CPUTorchDeviceManager(TorchDeviceManager): + """CPU device manager""" + + def is_available(self) -> bool(): + return True + + def get_devices(self) -> List[torch.device]: + """Gets the correct torch device list configured for this process.""" + return [torch.device("cpu")] + + def supports_stream(self) -> bool: + """Validate if the device type support create a stream""" + return False + + def get_stream_context(self, stream): + """Return empty context mananger for CPU.""" + + @contextmanager + def default_context_manager(): + yield + + return default_context_manager() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/hpu.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/hpu.py new file mode 100644 index 0000000000000000000000000000000000000000..bb402ea65b0d9378cb10d70b50bab3588be79102 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/hpu.py @@ -0,0 +1,50 @@ +from contextlib import contextmanager +from typing import List, Union + +import torch + +from ray._private.accelerators.hpu import HPU_PACKAGE_AVAILABLE +from ray.air._internal.device_manager.torch_device_manager import TorchDeviceManager + +if HPU_PACKAGE_AVAILABLE: + import habana_frameworks.torch.hpu as torch_hpu + + +class HPUTorchDeviceManager(TorchDeviceManager): + """HPU device manager""" + + @staticmethod + def register_custom_torch_dist_backend(): + if HPU_PACKAGE_AVAILABLE: + import habana_frameworks.torch.core # noqa: F401 + import habana_frameworks.torch.distributed.hccl # noqa: F401 + + def is_available(self) -> bool(): + if not HPU_PACKAGE_AVAILABLE: + return False + + return torch_hpu.is_available() + + def get_devices(self) -> List[torch.device]: + if not self.is_available(): + raise RuntimeError( + "Using HPUTorchDeviceManager but torch hpu is not available." + ) + + return [torch.device("hpu")] + + def set_device(self, device: Union[torch.device, int, str, None]): + torch_hpu.set_device(device) + + def supports_stream(self) -> bool: + """Validate if the device type support create a stream""" + return False + + def get_stream_context(self, stream): + """Get HPU stream context manager, empty so far.""" + + @contextmanager + def default_context_manager(): + yield + + return default_context_manager() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/npu.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/npu.py new file mode 100644 index 0000000000000000000000000000000000000000..3a3c554da44fdf8da32d600f625862c472480ece --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/npu.py @@ -0,0 +1,104 @@ +import os +from importlib.util import find_spec +from typing import List, Union + +import torch + +import ray +import ray._private.ray_constants as ray_constants +from ray.air._internal.device_manager.torch_device_manager import TorchDeviceManager +from ray._private.accelerators.npu import ASCEND_RT_VISIBLE_DEVICES_ENV_VAR + + +def is_package_present(package_name: str) -> bool: + try: + return find_spec(package_name) is not None + except ModuleNotFoundError: + return False + + +NPU_TORCH_PACKAGE_AVAILABLE = is_package_present("torch_npu") + + +if NPU_TORCH_PACKAGE_AVAILABLE: + import torch_npu # noqa: F401 + + +class NPUTorchDeviceManager(TorchDeviceManager): + """Ascend NPU device manager""" + + @staticmethod + def register_custom_torch_dist_backend(): + if NPU_TORCH_PACKAGE_AVAILABLE: + import torch_npu # noqa: F401, F811 + + def is_available(self) -> bool: + if not NPU_TORCH_PACKAGE_AVAILABLE: + return False + + return torch.npu.is_available() + + def get_devices(self) -> List[torch.device]: + """Gets the correct torch device list configured for this process. + + Returns a list of torch NPU devices allocated for the current worker. + If no NPUs are assigned, then it returns a list with a single CPU device. + """ + if NPU_TORCH_PACKAGE_AVAILABLE and torch.npu.is_available(): + npu_ids = [ + str(id) + for id in ray.get_runtime_context().get_accelerator_ids()[ + ray_constants.NPU + ] + ] + + device_ids = [] + + if len(npu_ids) > 0: + npu_visible_str = os.environ.get(ASCEND_RT_VISIBLE_DEVICES_ENV_VAR, "") + if npu_visible_str and npu_visible_str != "NoDevFiles": + npu_visible_list = npu_visible_str.split(",") + else: + npu_visible_list = [] + + for npu_id in npu_ids: + try: + device_ids.append(npu_visible_list.index(npu_id)) + except IndexError: + raise RuntimeError( + "ASCEND_RT_VISIBLE_DEVICES set incorrectly. " + f"Got {npu_visible_str}, expected to include {npu_id}. " + "Did you override the `ASCEND_RT_VISIBLE_DEVICES` " + "environment variable?" + ) + else: + # If called on the driver or outside of Ray Train, return the + # 0th device. + device_ids.append(0) + + devices = [torch.device(f"npu:{device_id}") for device_id in device_ids] + else: + raise RuntimeError( + "Using NPUTorchDeviceManager but torch npu is not available." + ) + + return devices + + def set_device(self, device: Union[torch.device, int]): + torch.npu.set_device(device) + + def supports_stream(self) -> bool: + """Validate if the device type support to create a stream""" + return True + + def create_stream(self, device): + """Create a stream on NPU device""" + return torch.npu.Stream(device) + + def get_stream_context(self, stream): + """Get a torch.stream context on NPU device""" + return torch.npu.stream(stream) + + def get_current_stream(self): + """Get current stream for NPU device""" + return torch.npu.current_stream() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/nvidia_gpu.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/nvidia_gpu.py new file mode 100644 index 0000000000000000000000000000000000000000..f4bb1b54097e153cc7784c849c46331478d87988 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/nvidia_gpu.py @@ -0,0 +1,79 @@ +import os +from typing import List, Union + +import torch + +import ray +from ray.air._internal.device_manager.torch_device_manager import TorchDeviceManager + + +class CUDATorchDeviceManager(TorchDeviceManager): + """CUDA device manager""" + + def is_available(self) -> bool(): + return torch.cuda.is_available() + + def get_devices(self) -> List[torch.device]: + """Gets the correct torch device list configured for this process. + + Returns a list of torch CUDA devices allocated for the current worker. + If no GPUs are assigned, then it returns a list with a single CPU device. + + Assumes that `CUDA_VISIBLE_DEVICES` is set and is a + superset of the `ray.get_gpu_ids()`. + """ + + # GPU IDs are assigned by Ray after you specify "use_gpu" + # GPU `ray.get_gpu_ids()` may return ints or may return strings. + # We should always convert to strings. + gpu_ids = [str(id) for id in ray.get_gpu_ids()] + + device_ids = [] + + if len(gpu_ids) > 0: + cuda_visible_str = os.environ.get("CUDA_VISIBLE_DEVICES", "") + if cuda_visible_str and cuda_visible_str != "NoDevFiles": + cuda_visible_list = cuda_visible_str.split(",") + else: + cuda_visible_list = [] + + # By default, there should only be one GPU ID if `use_gpu=True`. + # If there are multiple GPUs, return a list of devices. + # If using fractional GPUs, these IDs are not guaranteed + # to be unique across different processes. + for gpu_id in gpu_ids: + try: + device_ids.append(cuda_visible_list.index(gpu_id)) + except IndexError: + raise RuntimeError( + "CUDA_VISIBLE_DEVICES set incorrectly. " + f"Got {cuda_visible_str}, expected to include {gpu_id}. " + "Did you override the `CUDA_VISIBLE_DEVICES` environment" + " variable? If not, please help file an issue on Github." + ) + + else: + # If called on the driver or outside of Ray Train, return the + # 0th device. + device_ids.append(0) + + return [torch.device(f"cuda:{device_id}") for device_id in device_ids] + + def set_device(self, device: Union[torch.device, int, str, None]): + torch.cuda.set_device(device) + + def supports_stream(self) -> bool: + """Validate if the device type support create a stream""" + return True + + def create_stream(self, device: torch.device) -> torch.cuda.Stream: + """Create a stream on cuda device""" + return torch.cuda.Stream(device) + + def get_stream_context(self, stream): + """Get a stream context for cuda device""" + return torch.cuda.stream(stream) + + def get_current_stream(self) -> torch.cuda.Stream: + """Get current stream for cuda device""" + return torch.cuda.current_stream() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/torch_device_manager.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/torch_device_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..d522a477ef58a5021300eab3415abe99d3079213 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/_internal/device_manager/torch_device_manager.py @@ -0,0 +1,40 @@ +from abc import ABC +from typing import List, Union + +import torch + + +class TorchDeviceManager(ABC): + """This class contains the function needed for supporting + an acclerator family in Ray AI Library. + """ + + def is_available(self) -> bool: + """Validate if device is available.""" + ... + + def get_devices(self) -> List[torch.device]: + """Gets the correct torch device configured for this process""" + ... + + def set_device(self, device: Union[torch.device, int, str, None]): + """Set the correct device for this process""" + ... + + def supports_stream(self) -> bool: + """Validate if the device type support create a stream""" + ... + + def create_stream(self, device: torch.device): + """Create a device stream""" + ... + + def get_stream_context(self, stream): + """Get a stream context of device. If device didn't support stream, + this should return a empty context manager instead of None. + """ + ... + + def get_current_stream(self): + """Get current stream on accelerators like torch.cuda.current_stream""" + ... diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/examples/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/examples/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c1321e569f6070e7990cb753dc1aa67344fe226 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/examples/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/examples/__pycache__/custom_trainer.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/examples/__pycache__/custom_trainer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16c908409ccb521a335b60b09f884ac890dcd7ef Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/examples/__pycache__/custom_trainer.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..351d602ae6ad8402dbe80b86d00517674a047e2a Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..db48d7854eec8683013753f9d54a667826ee4071 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__init__.py @@ -0,0 +1,5 @@ +from ray.air.execution._internal.actor_manager import RayActorManager +from ray.air.execution._internal.barrier import Barrier +from ray.air.execution._internal.tracked_actor import TrackedActor + +__all__ = ["Barrier", "RayActorManager", "TrackedActor"] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..20ce143e65bf31453a18041b10ffdbec8df47c76 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/actor_manager.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/actor_manager.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..535272845698607ba9ce0a6cf2ec9d6b59d4d62b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/actor_manager.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/barrier.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/barrier.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eebc851535a4b69f3b559eb4bee633e221a5b381 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/barrier.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/event_manager.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/event_manager.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a5d6f2c83c37abad7711e2a73aacde55b08a3a40 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/event_manager.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/tracked_actor.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/tracked_actor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c47a07070bbb1b73a13411dbfdcfc5cb4a04608b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/tracked_actor.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/tracked_actor_task.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/tracked_actor_task.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a3f18928c0cf88848c84c4e5c5c90c0b26ba6d85 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/__pycache__/tracked_actor_task.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/actor_manager.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/actor_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..33cf6d9ec9f28ca72197c176c5049c19a7239675 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/actor_manager.py @@ -0,0 +1,894 @@ +import logging +import random +import time +import uuid +from collections import Counter, defaultdict +from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union + +import ray +from ray.air.execution._internal.event_manager import RayEventManager +from ray.air.execution._internal.tracked_actor import TrackedActor +from ray.air.execution._internal.tracked_actor_task import TrackedActorTask +from ray.air.execution.resources import ( + AcquiredResources, + ResourceManager, + ResourceRequest, +) +from ray.exceptions import RayActorError, RayTaskError + +logger = logging.getLogger(__name__) + + +class RayActorManager: + """Management class for Ray actors and actor tasks. + + This class provides an event-based management interface for actors, and + actor tasks. + + The manager can be used to start actors, stop actors, and schedule and + track task futures on these actors. + The manager will then invoke callbacks related to the tracked entities. + + For instance, when an actor is added with + :meth:`add_actor() `, + a :ref:`TrackedActor `, + an ``on_result`` callback can be specified that is invoked when the task + successfully resolves, and an ``on_error`` callback will resolve when the + task fails. + + The RayActorManager does not implement any true asynchronous processing. Control + has to be explicitly yielded to the event manager via :meth:`RayActorManager.next`. + Callbacks will only be invoked when control is with the RayActorManager, and + callbacks will always be executed sequentially in order of arriving events. + + Args: + resource_manager: Resource manager used to request resources for the actors. + + Example: + + .. code-block:: python + + from ray.air.execution import ResourceRequest + from ray.air.execution._internal import RayActorManager + + actor_manager = RayActorManager() + + # Request an actor + tracked_actor = actor_manager.add_actor( + ActorClass, + kwargs={}, + resource_request=ResourceRequest([{"CPU": 1}]), + on_start=actor_start_callback, + on_stop=actor_stop_callback, + on_error=actor_error_callback + ) + + # Yield control to event manager to start actor + actor_manager.next() + + # Start task on the actor (ActorClass.foo.remote()) + tracked_actor_task = actor_manager.schedule_actor_task( + tracked_actor, + method_name="foo", + on_result=task_result_callback, + on_error=task_error_callback + ) + + # Again yield control to event manager to process task futures + actor_manager.wait() + + """ + + def __init__(self, resource_manager: ResourceManager): + self._resource_manager: ResourceManager = resource_manager + + self._actor_state_events = RayEventManager() + self._actor_task_events = RayEventManager() + + # --- + # Tracked actor futures. + + # This maps TrackedActor objects to their futures. We use this to see if an + # actor has any futures scheduled and to remove them when we terminate an actor. + + # Actors to actor task futures + self._tracked_actors_to_task_futures: Dict[ + TrackedActor, Set[ray.ObjectRef] + ] = defaultdict(set) + + # Actors to actor state futures (start/terminate) + self._tracked_actors_to_state_futures: Dict[ + TrackedActor, Set[ray.ObjectRef] + ] = defaultdict(set) + + # --- + # Pending actors. + # We use three dicts for actors that are requested but not yet started. + + # This dict keeps a list of actors associated with each resource request. + # We use this to start actors in the correct order when their resources + # become available. + self._resource_request_to_pending_actors: Dict[ + ResourceRequest, List[TrackedActor] + ] = defaultdict(list) + + # This dict stores the actor class, kwargs, and resource request of + # pending actors. Once the resources are available, we start the remote + # actor class with its args. We need the resource request to cancel it + # if needed. + self._pending_actors_to_attrs: Dict[ + TrackedActor, Tuple[Type, Dict[str, Any], ResourceRequest] + ] = {} + + # This dict keeps track of cached actor tasks. We can't schedule actor + # tasks before the actor is actually scheduled/live. So when the caller + # tries to schedule a task, we cache it here, and schedule it once the + # actor is started. + self._pending_actors_to_enqueued_actor_tasks: Dict[ + TrackedActor, List[Tuple[TrackedActorTask, str, Tuple[Any], Dict[str, Any]]] + ] = defaultdict(list) + + # --- + # Live actors. + # We keep one dict for actors that are currently running and a set of + # actors that we should forcefully kill. + + # This dict associates the TrackedActor object with the Ray actor handle + # and the resources associated to the actor. We use it to schedule the + # actual ray tasks, and to return the resources when the actor stopped. + self._live_actors_to_ray_actors_resources: Dict[ + TrackedActor, Tuple[ray.actor.ActorHandle, AcquiredResources] + ] = {} + self._live_resource_cache: Optional[Dict[str, Any]] = None + + # This dict contains all actors that should be killed (after calling + # `remove_actor()`). Kill requests will be handled in wait(). + self._live_actors_to_kill: Set[TrackedActor] = set() + + # Track failed actors + self._failed_actor_ids: Set[int] = set() + + def next(self, timeout: Optional[Union[int, float]] = None) -> bool: + """Yield control to event manager to await the next event and invoke callbacks. + + Calling this method will wait for up to ``timeout`` seconds for the next + event to arrive. + + When events arrive, callbacks relating to the events will be + invoked. A timeout of ``None`` will block until the next event arrives. + + Note: + If an actor task fails with a ``RayActorError``, this is one event, + but it may trigger _two_ `on_error` callbacks: One for the actor, + and one for the task. + + Note: + The ``timeout`` argument is used for pure waiting time for events. It does + not include time spent on processing callbacks. Depending on the processing + time of the callbacks, it can take much longer for this function to + return than the specified timeout. + + Args: + timeout: Timeout in seconds to wait for next event. + + Returns: + True if at least one event was processed. + + """ + # First issue any pending forceful actor kills + actor_killed = self._try_kill_actor() + + # We always try to start actors as this won't trigger an event callback + self._try_start_actors() + + # If an actor was killed, this was our event, and we return. + if actor_killed: + return True + + # Otherwise, collect all futures and await the next. + resource_futures = self._resource_manager.get_resource_futures() + actor_state_futures = self._actor_state_events.get_futures() + actor_task_futures = self._actor_task_events.get_futures() + + # Shuffle state futures + shuffled_state_futures = list(actor_state_futures) + random.shuffle(shuffled_state_futures) + + # Shuffle task futures + shuffled_task_futures = list(actor_task_futures) + random.shuffle(shuffled_task_futures) + + # Prioritize resource futures over actor state over task futures + all_futures = resource_futures + shuffled_state_futures + shuffled_task_futures + + start_wait = time.monotonic() + ready, _ = ray.wait(all_futures, num_returns=1, timeout=timeout) + + if not ready: + return False + + [future] = ready + + if future in actor_state_futures: + self._actor_state_events.resolve_future(future) + elif future in actor_task_futures: + self._actor_task_events.resolve_future(future) + else: + self._handle_ready_resource_future() + # Ready resource futures don't count as one event as they don't trigger + # any callbacks. So we repeat until we hit anything that is not a resource + # future. + time_taken = time.monotonic() - start_wait + return self.next( + timeout=max(1e-9, timeout - time_taken) if timeout is not None else None + ) + + self._try_start_actors() + return True + + def _actor_start_resolved(self, tracked_actor: TrackedActor, future: ray.ObjectRef): + """Callback to be invoked when actor started""" + self._tracked_actors_to_state_futures[tracked_actor].remove(future) + + if tracked_actor._on_start: + tracked_actor._on_start(tracked_actor) + + def _actor_stop_resolved(self, tracked_actor: TrackedActor): + """Callback to be invoked when actor stopped""" + self._cleanup_actor(tracked_actor=tracked_actor) + + if tracked_actor._on_stop: + tracked_actor._on_stop(tracked_actor) + + def _actor_start_failed(self, tracked_actor: TrackedActor, exception: Exception): + """Callback to be invoked when actor start/stop failed""" + self._failed_actor_ids.add(tracked_actor.actor_id) + + self._cleanup_actor(tracked_actor=tracked_actor) + + if tracked_actor._on_error: + tracked_actor._on_error(tracked_actor, exception) + + def _actor_task_failed( + self, tracked_actor_task: TrackedActorTask, exception: Exception + ): + """Handle an actor task future that became ready. + + - On actor error, trigger actor error callback AND error task error callback + - On task error, trigger actor task error callback + - On success, trigger actor task result callback + """ + tracked_actor = tracked_actor_task._tracked_actor + + if isinstance(exception, RayActorError): + self._failed_actor_ids.add(tracked_actor.actor_id) + + # Clean up any references to the actor and its futures + self._cleanup_actor(tracked_actor=tracked_actor) + + # Handle actor state callbacks + if tracked_actor._on_error: + tracked_actor._on_error(tracked_actor, exception) + + # Then trigger actor task error callback + if tracked_actor_task._on_error: + tracked_actor_task._on_error(tracked_actor, exception) + + elif isinstance(exception, RayTaskError): + # Otherwise only the task failed. Invoke callback + if tracked_actor_task._on_error: + tracked_actor_task._on_error(tracked_actor, exception) + else: + raise RuntimeError( + f"Caught unexpected exception: {exception}" + ) from exception + + def _actor_task_resolved(self, tracked_actor_task: TrackedActorTask, result: Any): + tracked_actor = tracked_actor_task._tracked_actor + + # Trigger actor task result callback + if tracked_actor_task._on_result: + tracked_actor_task._on_result(tracked_actor, result) + + def _handle_ready_resource_future(self): + """Handle a resource future that became ready. + + - Update state of the resource manager + - Try to start one actor + """ + # Force resource manager to update internal state + self._resource_manager.update_state() + # We handle resource futures one by one, so only try to start 1 actor at a time + self._try_start_actors(max_actors=1) + + def _try_start_actors(self, max_actors: Optional[int] = None) -> int: + """Try to start up to ``max_actors`` actors. + + This function will iterate through all resource requests we collected for + pending actors. As long as a resource request can be fulfilled (resources + are available), we try to start as many actors as possible. + + This will schedule a `Actor.__ray_ready__()` future which, once resolved, + will trigger the `TrackedActor.on_start` callback. + """ + started_actors = 0 + + # Iterate through all resource requests + for resource_request in self._resource_request_to_pending_actors: + if max_actors is not None and started_actors >= max_actors: + break + + # While we have resources ready and there are actors left to schedule + while ( + self._resource_manager.has_resources_ready(resource_request) + and self._resource_request_to_pending_actors[resource_request] + ): + # Acquire resources for actor + acquired_resources = self._resource_manager.acquire_resources( + resource_request + ) + assert acquired_resources + + # Get tracked actor to start + candidate_actors = self._resource_request_to_pending_actors[ + resource_request + ] + assert candidate_actors + + tracked_actor = candidate_actors.pop(0) + + # Get actor class and arguments + actor_cls, kwargs, _ = self._pending_actors_to_attrs.pop(tracked_actor) + + if not isinstance(actor_cls, ray.actor.ActorClass): + actor_cls = ray.remote(actor_cls) + + # Associate to acquired resources + [remote_actor_cls] = acquired_resources.annotate_remote_entities( + [actor_cls] + ) + + # Start Ray actor + actor = remote_actor_cls.remote(**kwargs) + + # Track + self._live_actors_to_ray_actors_resources[tracked_actor] = ( + actor, + acquired_resources, + ) + self._live_resource_cache = None + + # Schedule ready future + future = actor.__ray_ready__.remote() + + self._tracked_actors_to_state_futures[tracked_actor].add(future) + + # We need to create the callbacks in a function so tracked_actors + # are captured correctly. + def create_callbacks( + tracked_actor: TrackedActor, future: ray.ObjectRef + ): + def on_actor_start(result: Any): + self._actor_start_resolved( + tracked_actor=tracked_actor, future=future + ) + + def on_error(exception: Exception): + self._actor_start_failed( + tracked_actor=tracked_actor, exception=exception + ) + + return on_actor_start, on_error + + on_actor_start, on_error = create_callbacks( + tracked_actor=tracked_actor, future=future + ) + + self._actor_state_events.track_future( + future=future, + on_result=on_actor_start, + on_error=on_error, + ) + + self._enqueue_cached_actor_tasks(tracked_actor=tracked_actor) + + started_actors += 1 + + return started_actors + + def _enqueue_cached_actor_tasks(self, tracked_actor: TrackedActor): + assert tracked_actor in self._live_actors_to_ray_actors_resources + + # Enqueue cached futures + cached_tasks = self._pending_actors_to_enqueued_actor_tasks.pop( + tracked_actor, [] + ) + for tracked_actor_task, method_name, args, kwargs in cached_tasks: + self._schedule_tracked_actor_task( + tracked_actor_task=tracked_actor_task, + method_name=method_name, + args=args, + kwargs=kwargs, + ) + + def _try_kill_actor(self) -> bool: + """Try to kill actor scheduled for termination.""" + if not self._live_actors_to_kill: + return False + + tracked_actor = self._live_actors_to_kill.pop() + + # Remove from tracked actors + ( + ray_actor, + acquired_resources, + ) = self._live_actors_to_ray_actors_resources[tracked_actor] + + # Hard kill if requested + ray.kill(ray_actor) + + self._cleanup_actor_futures(tracked_actor) + + self._actor_stop_resolved(tracked_actor) + + return True + + def _cleanup_actor(self, tracked_actor: TrackedActor): + self._cleanup_actor_futures(tracked_actor) + + # Remove from tracked actors + ( + ray_actor, + acquired_resources, + ) = self._live_actors_to_ray_actors_resources.pop(tracked_actor) + self._live_resource_cache = None + + # Return resources + self._resource_manager.free_resources(acquired_resource=acquired_resources) + + @property + def all_actors(self) -> List[TrackedActor]: + """Return all ``TrackedActor`` objects managed by this manager instance.""" + return self.live_actors + self.pending_actors + + @property + def live_actors(self) -> List[TrackedActor]: + """Return all ``TrackedActor`` objects that are currently alive.""" + return list(self._live_actors_to_ray_actors_resources) + + @property + def pending_actors(self) -> List[TrackedActor]: + """Return all ``TrackedActor`` objects that are currently pending.""" + return list(self._pending_actors_to_attrs) + + @property + def num_live_actors(self): + """Return number of started actors.""" + return len(self.live_actors) + + @property + def num_pending_actors(self) -> int: + """Return number of pending (not yet started) actors.""" + return len(self.pending_actors) + + @property + def num_total_actors(self): + """Return number of total actors.""" + return len(self.all_actors) + + @property + def num_actor_tasks(self): + """Return number of pending tasks""" + return self._actor_task_events.num_futures + + def get_live_actors_resources(self): + if self._live_resource_cache: + return self._live_resource_cache + + counter = Counter() + for _, acq in self._live_actors_to_ray_actors_resources.values(): + for bdl in acq.resource_request.bundles: + counter.update(bdl) + self._live_resource_cache = dict(counter) + return self._live_resource_cache + + def add_actor( + self, + cls: Union[Type, ray.actor.ActorClass], + kwargs: Dict[str, Any], + resource_request: ResourceRequest, + *, + on_start: Optional[Callable[[TrackedActor], None]] = None, + on_stop: Optional[Callable[[TrackedActor], None]] = None, + on_error: Optional[Callable[[TrackedActor, Exception], None]] = None, + ) -> TrackedActor: + """Add an actor to be tracked. + + This method will request resources to start the actor. Once the resources + are available, the actor will be started and the + :meth:`TrackedActor.on_start + ` callback + will be invoked. + + Args: + cls: Actor class to schedule. + kwargs: Keyword arguments to pass to actor class on construction. + resource_request: Resources required to start the actor. + on_start: Callback to invoke when the actor started. + on_stop: Callback to invoke when the actor stopped. + on_error: Callback to invoke when the actor failed. + + Returns: + Tracked actor object to reference actor in subsequent API calls. + + """ + tracked_actor = TrackedActor( + uuid.uuid4().int, on_start=on_start, on_stop=on_stop, on_error=on_error + ) + + self._pending_actors_to_attrs[tracked_actor] = cls, kwargs, resource_request + self._resource_request_to_pending_actors[resource_request].append(tracked_actor) + + self._resource_manager.request_resources(resource_request=resource_request) + + return tracked_actor + + def remove_actor( + self, + tracked_actor: TrackedActor, + kill: bool = False, + stop_future: Optional[ray.ObjectRef] = None, + ) -> bool: + """Remove a tracked actor. + + If the actor has already been started, this will stop the actor. This will + trigger the :meth:`TrackedActor.on_stop + ` + callback once the actor stopped. + + If the actor has only been requested, but not started, yet, this will cancel + the actor request. This will not trigger any callback. + + If ``kill=True``, this will use ``ray.kill()`` to forcefully terminate the + actor. Otherwise, graceful actor deconstruction will be scheduled after + all currently tracked futures are resolved. + + This method returns a boolean, indicating if a stop future is tracked and + the ``on_stop`` callback will be invoked. If the actor has been alive, + this will be ``True``. If the actor hasn't been scheduled, yet, or failed + (and triggered the ``on_error`` callback), this will be ``False``. + + Args: + tracked_actor: Tracked actor to be removed. + kill: If set, will forcefully terminate the actor instead of gracefully + scheduling termination. + stop_future: If set, use this future to track actor termination. + Otherwise, schedule a ``__ray_terminate__`` future. + + Returns: + Boolean indicating if the actor was previously alive, and thus whether + a callback will be invoked once it is terminated. + + """ + if tracked_actor.actor_id in self._failed_actor_ids: + logger.debug( + f"Tracked actor already failed, no need to remove: {tracked_actor}" + ) + return False + elif tracked_actor in self._live_actors_to_ray_actors_resources: + # Ray actor is running. + + if not kill: + # Schedule __ray_terminate__ future + ray_actor, _ = self._live_actors_to_ray_actors_resources[tracked_actor] + + # Clear state futures here to avoid resolving __ray_ready__ futures + for future in list( + self._tracked_actors_to_state_futures[tracked_actor] + ): + self._actor_state_events.discard_future(future) + self._tracked_actors_to_state_futures[tracked_actor].remove(future) + + # If the __ray_ready__ future hasn't resolved yet, but we already + # scheduled the actor via Actor.remote(), we just want to stop + # it but not trigger any callbacks. This is in accordance with + # the contract defined in the docstring. + tracked_actor._on_start = None + tracked_actor._on_stop = None + tracked_actor._on_error = None + + def on_actor_stop(*args, **kwargs): + self._actor_stop_resolved(tracked_actor=tracked_actor) + + if stop_future: + # If the stop future was schedule via the actor manager, + # discard (track it as state future instead). + self._actor_task_events.discard_future(stop_future) + else: + stop_future = ray_actor.__ray_terminate__.remote() + + self._actor_state_events.track_future( + future=stop_future, + on_result=on_actor_stop, + on_error=on_actor_stop, + ) + + self._tracked_actors_to_state_futures[tracked_actor].add(stop_future) + else: + # kill = True + self._live_actors_to_kill.add(tracked_actor) + + return True + + elif tracked_actor in self._pending_actors_to_attrs: + # Actor is pending, stop + _, _, resource_request = self._pending_actors_to_attrs.pop(tracked_actor) + self._resource_request_to_pending_actors[resource_request].remove( + tracked_actor + ) + self._resource_manager.cancel_resource_request( + resource_request=resource_request + ) + return False + else: + raise ValueError(f"Unknown tracked actor: {tracked_actor}") + + def is_actor_started(self, tracked_actor: TrackedActor) -> bool: + """Returns True if the actor has been started. + + Args: + tracked_actor: Tracked actor object. + """ + return ( + tracked_actor in self._live_actors_to_ray_actors_resources + and tracked_actor.actor_id not in self._failed_actor_ids + ) + + def is_actor_failed(self, tracked_actor: TrackedActor) -> bool: + return tracked_actor.actor_id in self._failed_actor_ids + + def get_actor_resources( + self, tracked_actor: TrackedActor + ) -> Optional[AcquiredResources]: + """Returns the acquired resources of an actor that has been started. + + This will return ``None`` if the actor has not been started, yet. + + Args: + tracked_actor: Tracked actor object. + """ + if not self.is_actor_started(tracked_actor): + return None + + return self._live_actors_to_ray_actors_resources[tracked_actor][1] + + def schedule_actor_task( + self, + tracked_actor: TrackedActor, + method_name: str, + args: Optional[Tuple] = None, + kwargs: Optional[Dict] = None, + on_result: Optional[Callable[[TrackedActor, Any], None]] = None, + on_error: Optional[Callable[[TrackedActor, Exception], None]] = None, + _return_future: bool = False, + ) -> Optional[ray.ObjectRef]: + """Schedule and track a task on an actor. + + This method will schedule a remote task ``method_name`` on the + ``tracked_actor``. + + This method accepts two optional callbacks that will be invoked when + their respective events are triggered. + + The ``on_result`` callback is triggered when a task resolves successfully. + It should accept two arguments: The actor for which the + task resolved, and the result received from the remote call. + + The ``on_error`` callback is triggered when a task fails. + It should accept two arguments: The actor for which the + task threw an error, and the exception. + + Args: + tracked_actor: Actor to schedule task on. + method_name: Remote method name to invoke on the actor. If this is + e.g. ``foo``, then ``actor.foo.remote(*args, **kwargs)`` will be + scheduled. + args: Arguments to pass to the task. + kwargs: Keyword arguments to pass to the task. + on_result: Callback to invoke when the task resolves. + on_error: Callback to invoke when the task fails. + + Raises: + ValueError: If the ``tracked_actor`` is not managed by this event manager. + + """ + args = args or tuple() + kwargs = kwargs or {} + + if tracked_actor.actor_id in self._failed_actor_ids: + return + + tracked_actor_task = TrackedActorTask( + tracked_actor=tracked_actor, on_result=on_result, on_error=on_error + ) + + if tracked_actor not in self._live_actors_to_ray_actors_resources: + # Actor is not started, yet + if tracked_actor not in self._pending_actors_to_attrs: + raise ValueError( + f"Tracked actor is not managed by this event manager: " + f"{tracked_actor}" + ) + + # Cache tasks for future execution + self._pending_actors_to_enqueued_actor_tasks[tracked_actor].append( + (tracked_actor_task, method_name, args, kwargs) + ) + else: + res = self._schedule_tracked_actor_task( + tracked_actor_task=tracked_actor_task, + method_name=method_name, + args=args, + kwargs=kwargs, + _return_future=_return_future, + ) + if _return_future: + return res[1] + + def _schedule_tracked_actor_task( + self, + tracked_actor_task: TrackedActorTask, + method_name: str, + *, + args: Optional[Tuple] = None, + kwargs: Optional[Dict] = None, + _return_future: bool = False, + ) -> Union[TrackedActorTask, Tuple[TrackedActorTask, ray.ObjectRef]]: + tracked_actor = tracked_actor_task._tracked_actor + ray_actor, _ = self._live_actors_to_ray_actors_resources[tracked_actor] + + try: + remote_fn = getattr(ray_actor, method_name) + except AttributeError as e: + raise AttributeError( + f"Remote function `{method_name}()` does not exist for this actor." + ) from e + + def on_result(result: Any): + self._actor_task_resolved( + tracked_actor_task=tracked_actor_task, result=result + ) + + def on_error(exception: Exception): + self._actor_task_failed( + tracked_actor_task=tracked_actor_task, exception=exception + ) + + future = remote_fn.remote(*args, **kwargs) + + self._actor_task_events.track_future( + future=future, on_result=on_result, on_error=on_error + ) + + self._tracked_actors_to_task_futures[tracked_actor].add(future) + + if _return_future: + return tracked_actor_task, future + + return tracked_actor_task + + def schedule_actor_tasks( + self, + tracked_actors: List[TrackedActor], + method_name: str, + *, + args: Optional[Union[Tuple, List[Tuple]]] = None, + kwargs: Optional[Union[Dict, List[Dict]]] = None, + on_result: Optional[Callable[[TrackedActor, Any], None]] = None, + on_error: Optional[Callable[[TrackedActor, Exception], None]] = None, + ) -> None: + """Schedule and track tasks on a list of actors. + + This method will schedule a remote task ``method_name`` on all + ``tracked_actors``. + + ``args`` and ``kwargs`` can be a single tuple/dict, in which case the same + (keyword) arguments are passed to all actors. If a list is passed instead, + they are mapped to the respective actors. In that case, the list of + (keyword) arguments must be the same length as the list of actors. + + This method accepts two optional callbacks that will be invoked when + their respective events are triggered. + + The ``on_result`` callback is triggered when a task resolves successfully. + It should accept two arguments: The actor for which the + task resolved, and the result received from the remote call. + + The ``on_error`` callback is triggered when a task fails. + It should accept two arguments: The actor for which the + task threw an error, and the exception. + + Args: + tracked_actors: List of actors to schedule tasks on. + method_name: Remote actor method to invoke on the actors. If this is + e.g. ``foo``, then ``actor.foo.remote(*args, **kwargs)`` will be + scheduled on all actors. + args: Arguments to pass to the task. + kwargs: Keyword arguments to pass to the task. + on_result: Callback to invoke when the task resolves. + on_error: Callback to invoke when the task fails. + + """ + if not isinstance(args, List): + args_list = [args] * len(tracked_actors) + else: + if len(tracked_actors) != len(args): + raise ValueError( + f"Length of args must be the same as tracked_actors " + f"list. Got `len(kwargs)={len(kwargs)}` and " + f"`len(tracked_actors)={len(tracked_actors)}" + ) + args_list = args + + if not isinstance(kwargs, List): + kwargs_list = [kwargs] * len(tracked_actors) + else: + if len(tracked_actors) != len(kwargs): + raise ValueError( + f"Length of kwargs must be the same as tracked_actors " + f"list. Got `len(args)={len(args)}` and " + f"`len(tracked_actors)={len(tracked_actors)}" + ) + kwargs_list = kwargs + + for tracked_actor, args, kwargs in zip(tracked_actors, args_list, kwargs_list): + self.schedule_actor_task( + tracked_actor=tracked_actor, + method_name=method_name, + args=args, + kwargs=kwargs, + on_result=on_result, + on_error=on_error, + ) + + def clear_actor_task_futures(self, tracked_actor: TrackedActor): + """Discard all actor task futures from a tracked actor.""" + futures = self._tracked_actors_to_task_futures.pop(tracked_actor, []) + for future in futures: + self._actor_task_events.discard_future(future) + + def _cleanup_actor_futures(self, tracked_actor: TrackedActor): + # Remove all actor task futures + self.clear_actor_task_futures(tracked_actor=tracked_actor) + + # Remove all actor state futures + futures = self._tracked_actors_to_state_futures.pop(tracked_actor, []) + for future in futures: + self._actor_state_events.discard_future(future) + + def cleanup(self): + for ( + actor, + acquired_resources, + ) in self._live_actors_to_ray_actors_resources.values(): + ray.kill(actor) + self._resource_manager.free_resources(acquired_resources) + + for ( + resource_request, + pending_actors, + ) in self._resource_request_to_pending_actors.items(): + for i in range(len(pending_actors)): + self._resource_manager.cancel_resource_request(resource_request) + + self._resource_manager.clear() + + self.__init__(resource_manager=self._resource_manager) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/barrier.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/barrier.py new file mode 100644 index 0000000000000000000000000000000000000000..8cb0c5a2bf55242281090a1cc6bcac9009face52 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/barrier.py @@ -0,0 +1,93 @@ +from typing import Any, Callable, List, Optional, Tuple + + +class Barrier: + """Barrier to collect results and process them in bulk. + + A barrier can be used to collect multiple results and process them in bulk once + a certain count or a timeout is reached. + + For instance, if ``max_results=N``, the ``on_completion`` callback will be + invoked once :meth:`arrive` has been called ``N`` times. + + The completion callback will only be invoked once, even if more results + arrive after completion. The collected results can be resetted + with :meth:`reset`, after which the callback may be invoked again. + + The completion callback should expect one argument, which is the barrier + object that completed. + + Args: + max_results: Maximum number of results to collect before a call to + :meth:`wait` resolves or the :meth:`on_completion` callback is invoked. + on_completion: Callback to invoke when ``max_results`` results + arrived at the barrier. + + """ + + def __init__( + self, + max_results: int, + *, + on_completion: Optional[Callable[["Barrier"], None]] = None, + ): + self._max_results = max_results + + # on_completion callback + self._completed = False + self._on_completion = on_completion + + # Collect received results + self._results: List[Tuple[Any]] = [] + + def arrive(self, *data): + """Notify barrier that a result successfully arrived. + + This will count against the ``max_results`` limit. The received result + will be included in a call to :meth:`get_results`. + + Args: + *data: Result data to be cached. Can be obtained via :meth:`get_results`. + + """ + if len(data) == 1: + data = data[0] + + self._results.append(data) + self._check_completion() + + def _check_completion(self): + if self._completed: + # Already fired completion callback + return + + if self.num_results >= self._max_results: + # Barrier is complete + self._completed = True + + if self._on_completion: + self._on_completion(self) + + @property + def completed(self) -> bool: + """Returns True if the barrier is completed.""" + return self._completed + + @property + def num_results(self) -> int: + """Number of received (successful) results.""" + return len(self._results) + + def get_results(self) -> List[Tuple[Any]]: + """Return list of received results.""" + return self._results + + def reset(self) -> None: + """Reset barrier, removing all received results. + + Resetting the barrier will reset the completion status. When ``max_results`` + is set and enough new events arrive after resetting, the + :meth:`on_completion` callback will be invoked again. + """ + self._completed = False + self._results = [] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/event_manager.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/event_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..fbea6f72d2925b5435931e58203d206bd0009709 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/event_manager.py @@ -0,0 +1,148 @@ +import random +from typing import Any, Callable, Dict, Iterable, Optional, Set, Tuple, Union + +import ray + +_ResultCallback = Callable[[Any], None] +_ErrorCallback = Callable[[Exception], None] + + +class RayEventManager: + """Event manager for Ray futures. + + The event manager can be used to track futures and invoke callbacks when + they resolve. + + Futures are tracked with :meth:`track_future`. Future can then be awaited with + :meth:`wait`. When futures successfully resolve, they trigger an optional + ``on_result`` callback that can be passed to :meth:`track_future`. If they + fail, they trigger an optional ``on_error`` callback. + + Args: + shuffle_futures: If True, futures will be shuffled before awaited. This + will avoid implicit prioritization of futures within Ray. + """ + + def __init__(self, shuffle_futures: bool = True): + self._shuffle_futures = shuffle_futures + + # Map of futures to callbacks (result, error) + self._tracked_futures: Dict[ + ray.ObjectRef, Tuple[Optional[_ResultCallback], Optional[_ErrorCallback]] + ] = {} + + def track_future( + self, + future: ray.ObjectRef, + on_result: Optional[_ResultCallback] = None, + on_error: Optional[_ErrorCallback] = None, + ): + """Track a single future and invoke callbacks on resolution. + + Control has to be yielded to the event manager for the callbacks to + be invoked, either via :meth:`wait` or via :meth:`resolve_future`. + + Args: + future: Ray future to await. + on_result: Callback to invoke when the future resolves successfully. + on_error: Callback to invoke when the future fails. + + """ + self._tracked_futures[future] = (on_result, on_error) + + def track_futures( + self, + futures: Iterable[ray.ObjectRef], + on_result: Optional[_ResultCallback] = None, + on_error: Optional[_ErrorCallback] = None, + ): + """Track multiple futures and invoke callbacks on resolution. + + Control has to be yielded to the event manager for the callbacks to + be invoked, either via :meth:`wait` or via :meth:`resolve_future`. + + Args: + futures: Ray futures to await. + on_result: Callback to invoke when the future resolves successfully. + on_error: Callback to invoke when the future fails. + + """ + for future in futures: + self.track_future(future, on_result=on_result, on_error=on_error) + + def discard_future(self, future: ray.ObjectRef): + """Remove future from tracking. + + The future will not be awaited anymore, and it will not trigger any callbacks. + + Args: + future: Ray futures to discard. + """ + self._tracked_futures.pop(future, None) + + def get_futures(self) -> Set[ray.ObjectRef]: + """Get futures tracked by the event manager.""" + return set(self._tracked_futures) + + @property + def num_futures(self) -> int: + return len(self._tracked_futures) + + def resolve_future(self, future: ray.ObjectRef): + """Resolve a single future. + + This method will block until the future is available. It will then + trigger the callback associated to the future and the event (success + or error), if specified. + + Args: + future: Ray future to resolve. + + """ + try: + on_result, on_error = self._tracked_futures.pop(future) + except KeyError as e: + raise ValueError( + f"Future {future} is not tracked by this RayEventManager" + ) from e + + try: + result = ray.get(future) + except Exception as e: + if on_error: + on_error(e) + else: + raise e + else: + if on_result: + on_result(result) + + def wait( + self, + timeout: Optional[Union[float, int]] = None, + num_results: Optional[int] = 1, + ): + """Wait up to ``timeout`` seconds for ``num_results`` futures to resolve. + + If ``timeout=None``, this method will block until all `num_results`` futures + resolve. If ``num_results=None``, this method will await all tracked futures. + + For every future that resolves, the respective associated callbacks will be + invoked. + + Args: + timeout: Timeout in second to wait for futures to resolve. + num_results: Number of futures to await. If ``None``, will wait for + all tracked futures to resolve. + + """ + futures = list(self.get_futures()) + + if self._shuffle_futures: + random.shuffle(futures) + + num_results = num_results or len(futures) + + ready, _ = ray.wait(list(futures), timeout=timeout, num_returns=num_results) + for future in ready: + self.resolve_future(future) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/tracked_actor.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/tracked_actor.py new file mode 100644 index 0000000000000000000000000000000000000000..91abd0556e40b197ea82ac8ac55b53613ef635cc --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/tracked_actor.py @@ -0,0 +1,54 @@ +from typing import Callable, Optional + + +class TrackedActor: + """Actor tracked by an actor manager. + + This object is used to reference a Ray actor on an actor manager + + Existence of this object does not mean that the Ray actor has already been started. + Actor state can be inquired from the actor manager tracking the Ray actor. + + Note: + Objects of this class are returned by the :class:`RayActorManager`. + This class should not be instantiated manually. + + Attributes: + actor_id: ID for identification of the actor within the actor manager. This + ID is not related to the Ray actor ID. + + """ + + def __init__( + self, + actor_id: int, + on_start: Optional[Callable[["TrackedActor"], None]] = None, + on_stop: Optional[Callable[["TrackedActor"], None]] = None, + on_error: Optional[Callable[["TrackedActor", Exception], None]] = None, + ): + self.actor_id = actor_id + self._on_start = on_start + self._on_stop = on_stop + self._on_error = on_error + + def set_on_start(self, on_start: Optional[Callable[["TrackedActor"], None]]): + self._on_start = on_start + + def set_on_stop(self, on_stop: Optional[Callable[["TrackedActor"], None]]): + self._on_stop = on_stop + + def set_on_error( + self, on_error: Optional[Callable[["TrackedActor", Exception], None]] + ): + self._on_error = on_error + + def __repr__(self): + return f"" + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + return self.actor_id == other.actor_id + + def __hash__(self): + return hash(self.actor_id) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/tracked_actor_task.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/tracked_actor_task.py new file mode 100644 index 0000000000000000000000000000000000000000..2fb21cbfb514924d8d38267c4e63321a27f9cb41 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/_internal/tracked_actor_task.py @@ -0,0 +1,42 @@ +from typing import Any, Callable, Optional + +from ray.air.execution._internal.tracked_actor import TrackedActor + + +class TrackedActorTask: + """Actor task tracked by a Ray event manager. + + This container class is used to define callbacks to be invoked when + the task resolves, errors, or times out. + + Note: + Objects of this class are returned by the :class:`RayActorManager`. + This class should not be instantiated manually. + + Args: + tracked_actor: Tracked actor object this task is scheduled on. + on_result: Callback to invoke when the task resolves. + on_error: Callback to invoke when the task fails. + + Example: + + .. code-block:: python + + tracked_futures = actor_manager.schedule_actor_tasks( + actor_manager.live_actors, + "foo", + on_result=lambda actor, result: print(result) + ) + + """ + + def __init__( + self, + tracked_actor: TrackedActor, + on_result: Optional[Callable[[TrackedActor, Any], None]] = None, + on_error: Optional[Callable[[TrackedActor, Exception], None]] = None, + ): + self._tracked_actor = tracked_actor + + self._on_result = on_result + self._on_error = on_error diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..991a5edbf194c675203a6115d66132f62f9e38e9 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__init__.py @@ -0,0 +1,12 @@ +from ray.air.execution.resources.fixed import FixedResourceManager +from ray.air.execution.resources.placement_group import PlacementGroupResourceManager +from ray.air.execution.resources.request import AcquiredResources, ResourceRequest +from ray.air.execution.resources.resource_manager import ResourceManager + +__all__ = [ + "ResourceRequest", + "AcquiredResources", + "ResourceManager", + "FixedResourceManager", + "PlacementGroupResourceManager", +] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9422b959be19c8dbf7bc3a7f03f8839e1ac9d086 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/fixed.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/fixed.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3a4f6007b0fe5ea34d241656f7394282b4c421fb Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/fixed.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/placement_group.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/placement_group.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f6a0db773066e233e3a552ddd5818a0f888e4477 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/placement_group.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/request.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/request.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fde8fad7ada2ee657618548eb1c29a80abbef29d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/request.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/resource_manager.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/resource_manager.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..601d00f08f4a7d8dcea1f0afbabc087d154d5fcd Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/__pycache__/resource_manager.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/fixed.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/fixed.py new file mode 100644 index 0000000000000000000000000000000000000000..5e969ed7c23cccf9d16af62bc0e421df2cc53ff0 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/fixed.py @@ -0,0 +1,147 @@ +from dataclasses import dataclass +from typing import Dict, List, Optional + +import ray +from ray import LOCAL_MODE, SCRIPT_MODE +from ray.air.execution.resources.request import ( + AcquiredResources, + RemoteRayEntity, + ResourceRequest, +) +from ray.air.execution.resources.resource_manager import ResourceManager +from ray.util.annotations import DeveloperAPI + +# Avoid numerical errors by multiplying and subtracting with this number. +# Compare: 0.99 - 0.33 = 0.65999... vs (0.99 * 1000 - 0.33 * 1000) / 1000 = 0.66 +_DIGITS = 100000 + + +@DeveloperAPI +@dataclass +class FixedAcquiredResources(AcquiredResources): + bundles: List[Dict[str, float]] + + def _annotate_remote_entity( + self, entity: RemoteRayEntity, bundle: Dict[str, float], bundle_index: int + ) -> RemoteRayEntity: + bundle = bundle.copy() + num_cpus = bundle.pop("CPU", 0) + num_gpus = bundle.pop("GPU", 0) + memory = bundle.pop("memory", 0.0) + + return entity.options( + num_cpus=num_cpus, + num_gpus=num_gpus, + memory=memory, + resources=bundle, + ) + + +@DeveloperAPI +class FixedResourceManager(ResourceManager): + """Fixed budget based resource manager. + + This resource manager keeps track of a fixed set of resources. When resources + are acquired, they are subtracted from the budget. When resources are freed, + they are added back to the budget. + + The resource manager still requires resources to be requested before they become + available. However, because the resource requests are virtual, this will not + trigger autoscaling. + + Additionally, resources are not reserved on request, only on acquisition. Thus, + acquiring a resource can change the availability of other requests. Note that + this behavior may be changed in future implementations. + + The fixed resource manager does not support placement strategies. Using + ``STRICT_SPREAD`` will result in an error. ``STRICT_PACK`` will succeed only + within a placement group bundle. All other placement group arguments will be + ignored. + + Args: + total_resources: Budget of resources to manage. Defaults to all available + resources in the current task or all cluster resources (if outside a task). + + """ + + _resource_cls: AcquiredResources = FixedAcquiredResources + + def __init__(self, total_resources: Optional[Dict[str, float]] = None): + rtc = ray.get_runtime_context() + + if not total_resources: + if rtc.worker.mode in {None, SCRIPT_MODE, LOCAL_MODE}: + total_resources = ray.cluster_resources() + else: + total_resources = rtc.get_assigned_resources() + + # If we are in a placement group, all of our resources will be in a bundle + # and thus fulfill requirements of STRICT_PACK - but only if child tasks + # are captured by the pg. + self._allow_strict_pack = ( + ray.util.get_current_placement_group() is not None + and rtc.should_capture_child_tasks_in_placement_group + ) + + self._total_resources = total_resources + self._requested_resources = [] + self._used_resources = [] + + @property + def _available_resources(self) -> Dict[str, float]: + available_resources = self._total_resources.copy() + + for used_resources in self._used_resources: + all_resources = used_resources.required_resources + for k, v in all_resources.items(): + available_resources[k] = ( + available_resources[k] * _DIGITS - v * _DIGITS + ) / _DIGITS + return available_resources + + def request_resources(self, resource_request: ResourceRequest): + if resource_request.strategy == "STRICT_SPREAD" or ( + not self._allow_strict_pack and resource_request.strategy == "STRICT_PACK" + ): + raise RuntimeError( + f"Requested a resource with placement strategy " + f"{resource_request.strategy}, but this cannot be fulfilled by a " + f"FixedResourceManager. In a nested setting, please set the inner " + f"placement strategy to be less restrictive (i.e. no STRICT_ strategy)." + ) + + self._requested_resources.append(resource_request) + + def cancel_resource_request(self, resource_request: ResourceRequest): + self._requested_resources.remove(resource_request) + + def has_resources_ready(self, resource_request: ResourceRequest) -> bool: + if resource_request not in self._requested_resources: + return False + + available_resources = self._available_resources + all_resources = resource_request.required_resources + for k, v in all_resources.items(): + if available_resources.get(k, 0.0) < v: + return False + return True + + def acquire_resources( + self, resource_request: ResourceRequest + ) -> Optional[AcquiredResources]: + if not self.has_resources_ready(resource_request): + return None + + self._used_resources.append(resource_request) + return self._resource_cls( + bundles=resource_request.bundles, resource_request=resource_request + ) + + def free_resources(self, acquired_resource: AcquiredResources): + resources = acquired_resource.resource_request + self._used_resources.remove(resources) + + def clear(self): + # Reset internal state + self._requested_resources = [] + self._used_resources = [] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/placement_group.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/placement_group.py new file mode 100644 index 0000000000000000000000000000000000000000..d804fc3750a38129fe17f718863b10599e4e170b --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/placement_group.py @@ -0,0 +1,214 @@ +import time +from collections import defaultdict +from dataclasses import dataclass +from typing import Dict, List, Optional, Set + +import ray +from ray.air.execution.resources.request import ( + AcquiredResources, + RemoteRayEntity, + ResourceRequest, +) +from ray.air.execution.resources.resource_manager import ResourceManager +from ray.util.annotations import DeveloperAPI +from ray.util.placement_group import PlacementGroup, remove_placement_group +from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy + + +@DeveloperAPI +@dataclass +class PlacementGroupAcquiredResources(AcquiredResources): + placement_group: PlacementGroup + + def _annotate_remote_entity( + self, entity: RemoteRayEntity, bundle: Dict[str, float], bundle_index: int + ) -> RemoteRayEntity: + bundle = bundle.copy() + num_cpus = bundle.pop("CPU", 0) + num_gpus = bundle.pop("GPU", 0) + memory = bundle.pop("memory", 0.0) + + return entity.options( + scheduling_strategy=PlacementGroupSchedulingStrategy( + placement_group=self.placement_group, + placement_group_bundle_index=bundle_index, + placement_group_capture_child_tasks=True, + ), + num_cpus=num_cpus, + num_gpus=num_gpus, + memory=memory, + resources=bundle, + ) + + +@DeveloperAPI +class PlacementGroupResourceManager(ResourceManager): + """Resource manager using placement groups as the resource backend. + + This manager will use placement groups to fulfill resource requests. Requesting + a resource will schedule the placement group. Acquiring a resource will + return a ``PlacementGroupAcquiredResources`` that can be used to schedule + Ray tasks and actors on the placement group. Freeing an acquired resource + will destroy the associated placement group. + + Ray core does not emit events when resources are available. Instead, the + scheduling state has to be periodically updated. + + Per default, placement group scheduling state is refreshed every time when + resource state is inquired, but not more often than once every ``update_interval_s`` + seconds. Alternatively, staging futures can be retrieved (and awaited) with + ``get_resource_futures()`` and state update can be force with ``update_state()``. + + Args: + update_interval_s: Minimum interval in seconds between updating scheduling + state of placement groups. + + """ + + _resource_cls: AcquiredResources = PlacementGroupAcquiredResources + + def __init__(self, update_interval_s: float = 0.1): + # Internally, the placement group lifecycle is like this: + # - Resources are requested with ``request_resources()`` + # - A placement group is scheduled ("staged") + # - A ``PlacementGroup.ready()`` future is scheduled ("staging future") + # - We update the scheduling state when we need to + # (e.g. when ``has_resources_ready()`` is called) + # - When staging futures resolve, a placement group is moved from "staging" + # to "ready" + # - When a resource request is canceled, we remove a placement group from + # "staging". If there are not staged placement groups + # (because they are already "ready"), we remove one from "ready" instead. + # - When a resource is acquired, the pg is removed from "ready" and moved + # to "acquired" + # - When a resource is freed, the pg is removed from "acquired" and destroyed + + # Mapping of placement group to request + self._pg_to_request: Dict[PlacementGroup, ResourceRequest] = {} + + # PGs that are staged but not "ready", yet (i.e. not CREATED) + self._request_to_staged_pgs: Dict[ + ResourceRequest, Set[PlacementGroup] + ] = defaultdict(set) + + # PGs that are CREATED and can be used by tasks and actors + self._request_to_ready_pgs: Dict[ + ResourceRequest, Set[PlacementGroup] + ] = defaultdict(set) + + # Staging futures used to update internal state. + # We keep a double mapping here for better lookup efficiency. + self._staging_future_to_pg: Dict[ray.ObjectRef, PlacementGroup] = dict() + self._pg_to_staging_future: Dict[PlacementGroup, ray.ObjectRef] = dict() + + # Set of acquired PGs. We keep track of these here to make sure we + # only free PGs that this manager managed. + self._acquired_pgs: Set[PlacementGroup] = set() + + # Minimum time between updates of the internal state + self.update_interval_s = update_interval_s + self._last_update = time.monotonic() - self.update_interval_s - 1 + + def get_resource_futures(self) -> List[ray.ObjectRef]: + return list(self._staging_future_to_pg.keys()) + + def _maybe_update_state(self): + now = time.monotonic() + if now > self._last_update + self.update_interval_s: + self.update_state() + + def update_state(self): + ready, not_ready = ray.wait( + list(self._staging_future_to_pg.keys()), + num_returns=len(self._staging_future_to_pg), + timeout=0, + ) + for future in ready: + # Remove staging future + pg = self._staging_future_to_pg.pop(future) + self._pg_to_staging_future.pop(pg) + # Fetch resource request + request = self._pg_to_request[pg] + # Remove from staging, add to ready + self._request_to_staged_pgs[request].remove(pg) + self._request_to_ready_pgs[request].add(pg) + self._last_update = time.monotonic() + + def request_resources(self, resource_request: ResourceRequest): + pg = resource_request.to_placement_group() + self._pg_to_request[pg] = resource_request + self._request_to_staged_pgs[resource_request].add(pg) + + future = pg.ready() + self._staging_future_to_pg[future] = pg + self._pg_to_staging_future[pg] = future + + def cancel_resource_request(self, resource_request: ResourceRequest): + if self._request_to_staged_pgs[resource_request]: + pg = self._request_to_staged_pgs[resource_request].pop() + + # PG was staging + future = self._pg_to_staging_future.pop(pg) + self._staging_future_to_pg.pop(future) + + # Cancel the pg.ready task. + # Otherwise, it will be pending node assignment forever. + ray.cancel(future) + else: + # PG might be ready + pg = self._request_to_ready_pgs[resource_request].pop() + if not pg: + raise RuntimeError( + "Cannot cancel resource request: No placement group was " + f"staged or is ready. Make sure to not cancel more resource " + f"requests than you've created. Request: {resource_request}" + ) + + self._pg_to_request.pop(pg) + ray.util.remove_placement_group(pg) + + def has_resources_ready(self, resource_request: ResourceRequest) -> bool: + if not bool(len(self._request_to_ready_pgs[resource_request])): + # Only update state if needed + self._maybe_update_state() + + return bool(len(self._request_to_ready_pgs[resource_request])) + + def acquire_resources( + self, resource_request: ResourceRequest + ) -> Optional[PlacementGroupAcquiredResources]: + if not self.has_resources_ready(resource_request): + return None + + pg = self._request_to_ready_pgs[resource_request].pop() + self._acquired_pgs.add(pg) + + return self._resource_cls(placement_group=pg, resource_request=resource_request) + + def free_resources(self, acquired_resource: PlacementGroupAcquiredResources): + pg = acquired_resource.placement_group + + self._acquired_pgs.remove(pg) + remove_placement_group(pg) + self._pg_to_request.pop(pg) + + def clear(self): + if not ray.is_initialized(): + return + + for staged_pgs in self._request_to_staged_pgs.values(): + for staged_pg in staged_pgs: + remove_placement_group(staged_pg) + + for ready_pgs in self._request_to_ready_pgs.values(): + for ready_pg in ready_pgs: + remove_placement_group(ready_pg) + + for acquired_pg in self._acquired_pgs: + remove_placement_group(acquired_pg) + + # Reset internal state + self.__init__(update_interval_s=self.update_interval_s) + + def __del__(self): + self.clear() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/request.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/request.py new file mode 100644 index 0000000000000000000000000000000000000000..7777fe297b6e0c7f291349435563e7ac7d3dac2a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/request.py @@ -0,0 +1,255 @@ +import abc +import json +from copy import deepcopy +from dataclasses import dataclass +from inspect import signature +from typing import Dict, List, Union + +import ray +from ray.util import placement_group +from ray.util.annotations import DeveloperAPI + +RemoteRayEntity = Union[ray.remote_function.RemoteFunction, ray.actor.ActorClass] + + +def _sum_bundles(bundles: List[Dict[str, float]]) -> Dict[str, float]: + """Sum all resources in a list of resource bundles. + + Args: + bundles: List of resource bundles. + + Returns: Dict containing all resources summed up. + """ + resources = {} + for bundle in bundles: + for k, v in bundle.items(): + resources[k] = resources.get(k, 0) + v + return resources + + +@DeveloperAPI +class ResourceRequest: + """Request for resources. + + This class is used to define a resource request. A resource request comprises one + or more bundles of resources and instructions on the scheduling behavior. + + The resource request can be submitted to a resource manager, which will + schedule the resources. Depending on the resource backend, this may instruct + Ray to scale up (autoscaling). + + Resource requests are compatible with the most fine-grained low-level resource + backend, which are Ray placement groups. + + Args: + bundles: A list of bundles which represent the resources requirements. + E.g. ``[{"CPU": 1, "GPU": 1}]``. + strategy: The scheduling strategy to acquire the bundles. + + - "PACK": Packs Bundles into as few nodes as possible. + - "SPREAD": Places Bundles across distinct nodes as even as possible. + - "STRICT_PACK": Packs Bundles into one node. The group is + not allowed to span multiple nodes. + - "STRICT_SPREAD": Packs Bundles across distinct nodes. + *args: Passed to the call of ``placement_group()``, if applicable. + **kwargs: Passed to the call of ``placement_group()``, if applicable. + + """ + + def __init__( + self, + bundles: List[Dict[str, Union[int, float]]], + strategy: str = "PACK", + *args, + **kwargs, + ): + if not bundles: + raise ValueError("Cannot initialize a ResourceRequest with zero bundles.") + + # Remove empty resource keys + self._bundles = [ + {k: float(v) for k, v in bundle.items() if v != 0} for bundle in bundles + ] + + # Check if the head bundle is empty (no resources defined or all resources + # are 0 (and thus removed in the previous step) + if not self._bundles[0]: + # This is when the head bundle doesn't need resources. + self._head_bundle_is_empty = True + self._bundles.pop(0) + + if not self._bundles: + raise ValueError( + "Cannot initialize a ResourceRequest with an empty head " + "and zero worker bundles." + ) + else: + self._head_bundle_is_empty = False + + self._strategy = strategy + self._args = args + self._kwargs = kwargs + + self._hash = None + self._bound = None + + self._bind() + + @property + def head_bundle_is_empty(self): + """Returns True if head bundle is empty while child bundles + need resources. + + This is considered an internal API within Tune. + """ + return self._head_bundle_is_empty + + @property + @DeveloperAPI + def head_cpus(self) -> float: + """Returns the number of cpus in the head bundle.""" + return 0.0 if self._head_bundle_is_empty else self._bundles[0].get("CPU", 0.0) + + @property + @DeveloperAPI + def bundles(self) -> List[Dict[str, float]]: + """Returns a deep copy of resource bundles""" + return deepcopy(self._bundles) + + @property + def required_resources(self) -> Dict[str, float]: + """Returns a dict containing the sums of all resources""" + return _sum_bundles(self._bundles) + + @property + @DeveloperAPI + def strategy(self) -> str: + """Returns the placement strategy""" + return self._strategy + + def _bind(self): + """Bind the args and kwargs to the `placement_group()` signature. + + We bind the args and kwargs, so we can compare equality of two resource + requests. The main reason for this is that the `placement_group()` API + can evolve independently from the ResourceRequest API (e.g. adding new + arguments). Then, `ResourceRequest(bundles, strategy, arg=arg)` should + be the same as `ResourceRequest(bundles, strategy, arg)`. + """ + sig = signature(placement_group) + try: + self._bound = sig.bind( + self._bundles, self._strategy, *self._args, **self._kwargs + ) + except Exception as exc: + raise RuntimeError( + "Invalid definition for resource request. Please check " + "that you passed valid arguments to the ResourceRequest " + "object." + ) from exc + + def to_placement_group(self): + return placement_group(*self._bound.args, **self._bound.kwargs) + + def __eq__(self, other: "ResourceRequest"): + return ( + isinstance(other, ResourceRequest) + and self._bound == other._bound + and self.head_bundle_is_empty == other.head_bundle_is_empty + ) + + def __hash__(self): + if not self._hash: + # Cache hash + self._hash = hash( + json.dumps( + {"args": self._bound.args, "kwargs": self._bound.kwargs}, + sort_keys=True, + indent=0, + ensure_ascii=True, + ) + ) + return self._hash + + def __getstate__(self): + state = self.__dict__.copy() + state.pop("_hash", None) + state.pop("_bound", None) + return state + + def __setstate__(self, state): + self.__dict__.update(state) + self._hash = None + self._bound = None + self._bind() + + def __repr__(self) -> str: + return ( + f"" + ) + + +@DeveloperAPI +@dataclass +class AcquiredResources(abc.ABC): + """Base class for resources that have been acquired. + + Acquired resources can be associated to Ray objects, which can then be + scheduled using these resources. + + Internally this can point e.g. to a placement group, a placement + group bundle index, or just raw resources. + + The main API is the `annotate_remote_entities` method. This will associate + remote Ray objects (tasks and actors) with the acquired resources by setting + the Ray remote options to use the acquired resources. + """ + + resource_request: ResourceRequest + + def annotate_remote_entities( + self, entities: List[RemoteRayEntity] + ) -> List[Union[RemoteRayEntity]]: + """Return remote ray entities (tasks/actors) to use the acquired resources. + + The first entity will be associated with the first bundle, the second + entity will be associated with the second bundle, etc. + + Args: + entities: Remote Ray entities to annotate with the acquired resources. + """ + bundles = self.resource_request.bundles + + # Also count the empty head bundle as a bundle + num_bundles = len(bundles) + int(self.resource_request.head_bundle_is_empty) + + if len(entities) > num_bundles: + raise RuntimeError( + f"The number of callables to annotate ({len(entities)}) cannot " + f"exceed the number of available bundles ({num_bundles})." + ) + + annotated = [] + + if self.resource_request.head_bundle_is_empty: + # The empty head bundle is place on the first bundle index with empty + # resources. + annotated.append( + self._annotate_remote_entity(entities[0], {}, bundle_index=0) + ) + + # Shift the remaining entities + entities = entities[1:] + + for i, (entity, bundle) in enumerate(zip(entities, bundles)): + annotated.append( + self._annotate_remote_entity(entity, bundle, bundle_index=i) + ) + + return annotated + + def _annotate_remote_entity( + self, entity: RemoteRayEntity, bundle: Dict[str, float], bundle_index: int + ) -> RemoteRayEntity: + raise NotImplementedError diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/resource_manager.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/resource_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..daa2cdd69215157e21a36ea937bb9399d5c759b3 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/execution/resources/resource_manager.py @@ -0,0 +1,155 @@ +import abc +from typing import List, Optional + +import ray +from ray.air.execution.resources.request import AcquiredResources, ResourceRequest +from ray.util.annotations import DeveloperAPI + + +@DeveloperAPI +class ResourceManager(abc.ABC): + """Resource manager interface. + + A resource manager can be used to request resources from a Ray cluster and + allocate them to remote Ray tasks or actors. + + Resources have to be requested before they can be acquired. + + Resources managed by the resource manager can be in three states: + + 1. "Requested": The resources have been requested but are not yet available to + schedule remote Ray objects. The resource request may trigger autoscaling, + and can be cancelled if no longer needed. + 2. "Ready": The requested resources are now available to schedule remote Ray + objects. They can be acquired and subsequently used remote Ray objects. + The resource request can still be cancelled if no longer needed. + 3. "Acquired": The resources have been acquired by a caller to use for scheduling + remote Ray objects. Note that it is the responsibility of the caller to + schedule the Ray objects with these resources. + The associated resource request has been completed and can no longer be + cancelled. The acquired resources can be freed by the resource manager when + they are no longer used. + + The flow is as follows: + + .. code-block:: python + + # Create resource manager + resource_manager = ResourceManager() + + # Create resource request + resource_request = ResourceRequest([{"CPU": 4}]) + + # Pass to resource manager + resource_manager.request_resources(resource_request) + + # Wait until ready + while not resource_manager.has_resources_ready(resource_request): + time.sleep(1) + + # Once ready, acquire resources + acquired_resource = resource_manager.acquire_resources(resource_request) + + # Bind to remote task or actor + annotated_remote_fn = acquired_resource.annotate_remote_entities( + [remote_fn]) + + # Run remote function. This will use the acquired resources + ray.get(annotated_remote_fn.remote()) + + # After using the resources, free + resource_manager.free_resources(annotated_resources) + + """ + + def request_resources(self, resource_request: ResourceRequest): + """Request resources. + + Depending on the backend, resources can trigger autoscaling. Requested + resources can be ready or not ready. Once they are "ready", they can + be acquired and used by remote Ray objects. + + Resource requests can be cancelled anytime using ``cancel_resource_request()``. + Once acquired, the resource request is removed. Acquired resources can be + freed with ``free_resources()``. + """ + raise NotImplementedError + + def cancel_resource_request(self, resource_request: ResourceRequest): + """Cancel resource request. + + Resource requests can be cancelled anytime before a resource is acquired. + Acquiring a resource will remove the associated resource request. + Acquired resources can be freed with ``free_resources()``. + """ + raise NotImplementedError + + def has_resources_ready(self, resource_request: ResourceRequest) -> bool: + """Returns True if resources for the given request are ready to be acquired.""" + raise NotImplementedError + + def acquire_resources( + self, resource_request: ResourceRequest + ) -> Optional[AcquiredResources]: + """Acquire resources. Returns None if resources are not ready to be acquired. + + Acquiring resources will remove the associated resource request. + Acquired resources can be returned with ``free_resources()``. + """ + raise NotImplementedError + + def free_resources(self, acquired_resource: AcquiredResources): + """Free acquired resources from usage and return them to the resource manager. + + Freeing resources will return the resources to the manager, but there are + no guarantees about the tasks and actors scheduled on the resources. The caller + should make sure that any references to tasks or actors scheduled on the + resources have been removed before calling ``free_resources()``. + """ + raise NotImplementedError + + def get_resource_futures(self) -> List[ray.ObjectRef]: + """Return futures for resources to await. + + Depending on the backend, we use resource futures to determine availability + of resources (e.g. placement groups) or resolution of requests. + In this case, the futures can be awaited externally by the caller. + + When a resource future resolved, the caller may call ``update_state()`` + to force the resource manager to update its internal state immediately. + """ + return [] + + def update_state(self): + """Update internal state of the resource manager. + + The resource manager may have internal state that needs periodic updating. + For instance, depending on the backend, resource futures can be awaited + externally (with ``get_resource_futures()``). + + If such a future resolved, the caller can instruct the resource + manager to update its internal state immediately. + """ + pass + + def clear(self): + """Reset internal state and clear all resources. + + Calling this method will reset the resource manager to its initialization state. + All resources will be removed. + + Clearing the state will remove tracked resources from the manager, but there are + no guarantees about the tasks and actors scheduled on the resources. The caller + should make sure that any references to tasks or actors scheduled on the + resources have been removed before calling ``clear()``. + """ + raise NotImplementedError + + def __reduce__(self): + """We disallow serialization. + + Shared resource managers should live on an actor. + """ + raise ValueError( + f"Resource managers cannot be serialized. Resource manager: {str(self)}" + ) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6d5714e33c285389c5f9429163f0fd71a09a2822 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/comet.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/comet.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1faf7c2000138e529294379e8e4d249d9568c1e0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/comet.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/keras.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/keras.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2628e6d8b1a28ad5f852d78743a670716fc94b18 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/keras.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/mlflow.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/mlflow.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f66262070a7c88e8d3b82f761b3b8d20ae18891a Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/mlflow.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/wandb.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/wandb.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9306e37bcd703cbecd1f93ab8e87c357d8d76a70 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/integrations/__pycache__/wandb.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5add099c69aa6a48411971bbf7479c13d629b023 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/check_ingest.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/check_ingest.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cd6a08ade6025d0a0e8d7443ccafe851105c8eeb Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/check_ingest.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/data_batch_conversion.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/data_batch_conversion.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c4144a69c8ec6187c47b9c1c660d7e50224c82f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/data_batch_conversion.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/node.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/node.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..512bd8189606d8ca2b095f03b87baaaa33bc3a81 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/node.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/torch_dist.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/torch_dist.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..462e58fe4da753e235a35e5cd303285a8c37f6fd Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/torch_dist.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/transform_pyarrow.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/transform_pyarrow.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d9f653d356c4a297eb6ebaa847b6aaa97e090313 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/__pycache__/transform_pyarrow.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d3dcf1d9869b0d3c5add9a8755903a86612da921 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__pycache__/arrow.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__pycache__/arrow.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..81f37f77fe78133a9f7d8c6ce76f448c01fd081e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__pycache__/arrow.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__pycache__/pandas.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__pycache__/pandas.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..83de9097310925875be1d848f1c1335c0c90ea96 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/__pycache__/pandas.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/arrow.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/arrow.py new file mode 100644 index 0000000000000000000000000000000000000000..b7e2e569c61b4d709537f930167d7ec3c2faf844 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/arrow.py @@ -0,0 +1,121 @@ +import pickle +import typing + +import numpy as np +import pyarrow as pa +from packaging.version import parse as parse_version + +import ray.air.util.object_extensions.pandas +from ray._private.serialization import pickle_dumps +from ray._private.arrow_utils import get_pyarrow_version +from ray.util.annotations import PublicAPI + +MIN_PYARROW_VERSION_SCALAR_SUBCLASS = parse_version("9.0.0") + +PYARROW_VERSION = get_pyarrow_version() + + +def _object_extension_type_allowed() -> bool: + return ( + PYARROW_VERSION is not None + and PYARROW_VERSION >= MIN_PYARROW_VERSION_SCALAR_SUBCLASS + ) + + +# Please see https://arrow.apache.org/docs/python/extending_types.html for more info +@PublicAPI(stability="alpha") +class ArrowPythonObjectType(pa.ExtensionType): + """Defines a new Arrow extension type for Python objects. + We do not require a parametrized type, so the constructor does not + take any arguments + """ + + def __init__(self) -> None: + # Defines the underlying storage type as the PyArrow LargeBinary type + super().__init__(pa.large_binary(), "ray.data.arrow_pickled_object") + + def __arrow_ext_serialize__(self) -> bytes: + # Since there are no type parameters, we are free to return empty + return b"" + + @classmethod + def __arrow_ext_deserialize__( + cls, storage_type: pa.DataType, serialized: bytes + ) -> "ArrowPythonObjectType": + return ArrowPythonObjectType() + + def __arrow_ext_scalar_class__(self) -> type: + """Returns the scalar class of the extension type. Indexing out of the + PyArrow extension array will return instances of this type. + """ + return ArrowPythonObjectScalar + + def __arrow_ext_class__(self) -> type: + """Returns the array type of the extension type. Selecting one array + out of the ChunkedArray that makes up a column in a Table with + this custom type will return an instance of this type. + """ + return ArrowPythonObjectArray + + def to_pandas_dtype(self): + """Pandas interoperability type. This describes the Pandas counterpart + to the Arrow type. See https://pandas.pydata.org/docs/development/extending.html + for more information. + """ + return ray.air.util.object_extensions.pandas.PythonObjectDtype() + + def __reduce__(self): + # Earlier PyArrow versions require custom pickling behavior. + return self.__arrow_ext_deserialize__, ( + self.storage_type, + self.__arrow_ext_serialize__(), + ) + + def __hash__(self) -> int: + return hash((type(self), self.storage_type.id, self.extension_name)) + + +@PublicAPI(stability="alpha") +class ArrowPythonObjectScalar(pa.ExtensionScalar): + """Scalar class for ArrowPythonObjectType""" + + def as_py(self, **kwargs) -> typing.Any: + if not isinstance(self.value, pa.LargeBinaryScalar): + raise RuntimeError( + f"{type(self.value)} is not the expected LargeBinaryScalar" + ) + return pickle.load(pa.BufferReader(self.value.as_buffer())) + + +@PublicAPI(stability="alpha") +class ArrowPythonObjectArray(pa.ExtensionArray): + """Array class for ArrowPythonObjectType""" + + def from_objects( + objects: typing.Union[np.ndarray, typing.Iterable[typing.Any]] + ) -> "ArrowPythonObjectArray": + if isinstance(objects, np.ndarray): + objects = objects.tolist() + type_ = ArrowPythonObjectType() + all_dumped_bytes = [] + for obj in objects: + dumped_bytes = pickle_dumps( + obj, "Error pickling object to convert to Arrow" + ) + all_dumped_bytes.append(dumped_bytes) + arr = pa.array(all_dumped_bytes, type=type_.storage_type) + return ArrowPythonObjectArray.from_storage(type_, arr) + + def to_numpy( + self, zero_copy_only: bool = False, writable: bool = False + ) -> np.ndarray: + arr = np.empty(len(self), dtype=object) + arr[:] = self.to_pylist() + return arr + + +try: + pa.register_extension_type(ArrowPythonObjectType()) +except pa.ArrowKeyError: + # Already registered + pass diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/pandas.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/pandas.py new file mode 100644 index 0000000000000000000000000000000000000000..dbc5732f350b8c89d314b8a634c8809ad7e817b3 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/object_extensions/pandas.py @@ -0,0 +1,146 @@ +import collections.abc +import typing + +import numpy as np +import pandas as pd +import pyarrow as pa +from pandas._libs import lib +from pandas._typing import ArrayLike, Dtype, PositionalIndexer, TakeIndexer, npt + +import ray.air.util.object_extensions.arrow +from ray.util.annotations import PublicAPI + + +# See https://pandas.pydata.org/docs/development/extending.html for more information. +@PublicAPI(stability="alpha") +class PythonObjectArray(pd.api.extensions.ExtensionArray): + """Implements the Pandas extension array interface for the Arrow object array""" + + def __init__(self, values: collections.abc.Iterable[typing.Any]): + vals = list(values) + self.values = np.empty(len(vals), dtype=object) + self.values[:] = vals + + @classmethod + def _from_sequence( + cls, + scalars: collections.abc.Sequence[typing.Any], + *, + dtype: typing.Union[Dtype, None] = None, + copy: bool = False, + ) -> "PythonObjectArray": + return PythonObjectArray(scalars) + + @classmethod + def _from_factorized( + cls, values: collections.abc.Sequence[typing.Any], original: "PythonObjectArray" + ) -> "PythonObjectArray": + return PythonObjectArray(values) + + def __getitem__(self, item: PositionalIndexer) -> typing.Any: + return self.values[item] + + def __setitem__(self, key, value) -> None: + self.values[key] = value + + def __len__(self) -> int: + return len(self.values) + + def __eq__(self, other: object) -> ArrayLike: + if isinstance(other, PythonObjectArray): + return self.values == other.values + elif isinstance(other, np.ndarray): + return self.values == other + else: + return NotImplemented + + def to_numpy( + self, + dtype: typing.Union["npt.DTypeLike", None] = None, + copy: bool = False, + na_value: object = lib.no_default, + ) -> np.ndarray: + result = self.values + if copy or na_value is not lib.no_default: + result = result.copy() + if na_value is not lib.no_default: + result[self.isna()] = na_value + return result + + @property + def dtype(self) -> pd.api.extensions.ExtensionDtype: + return PythonObjectDtype() + + @property + def nbytes(self) -> int: + return self.values.nbytes + + def __arrow_array__(self, type=None): + return ray.air.util.object_extensions.arrow.ArrowPythonObjectArray.from_objects( + self.values + ) + + def isna(self) -> np.ndarray: + return pd.isnull(self.values) + + def take( + self, + indices: TakeIndexer, + *, + allow_fill: bool = False, + fill_value: typing.Any = None, + ) -> "PythonObjectArray": + if allow_fill and fill_value is None: + fill_value = self.dtype.na_value + + result = pd.core.algorithms.take( + self.values, indices, allow_fill=allow_fill, fill_value=fill_value + ) + return self._from_sequence(result, dtype=self.dtype) + + def copy(self) -> "PythonObjectArray": + return PythonObjectArray(self.values) + + @classmethod + def _concat_same_type( + cls, to_concat: collections.abc.Sequence["PythonObjectArray"] + ) -> "PythonObjectArray": + values_to_concat = [element.values for element in to_concat] + return cls(np.concatenate(values_to_concat)) + + +@PublicAPI(stability="alpha") +@pd.api.extensions.register_extension_dtype +class PythonObjectDtype(pd.api.extensions.ExtensionDtype): + @classmethod + def construct_from_string(cls, string: str): + if string != "python_object()": + raise TypeError(f"Cannot construct a '{cls.__name__}' from '{string}'") + return cls() + + @property + def type(self): + """ + The scalar type for the array, e.g. ``int`` + It's expected ``ExtensionArray[item]`` returns an instance + of ``ExtensionDtype.type`` for scalar ``item``, assuming + that value is valid (not NA). NA values do not need to be + instances of `type`. + """ + return object + + @property + def name(self) -> str: + return "python_object()" + + @classmethod + def construct_array_type(cls: type) -> type: + """ + Return the array type associated with this dtype. + """ + return PythonObjectArray + + def __from_arrow__( + self, array: typing.Union[pa.Array, pa.ChunkedArray] + ) -> PythonObjectArray: + return PythonObjectArray(array.to_pylist()) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7799af48c6bea3e3fc3ec2bf8dccf4675d89bd0d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/arrow.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/arrow.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0d9eeccf1875b9eb3c874c37498da905d2c382a3 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/arrow.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/pandas.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/pandas.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e376c19d7bde6b769236f1f5bfb9e152698cd09b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/pandas.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a12ccc46bc425d0fe5a4555b0e9738469fee2596 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/__pycache__/utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/arrow.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/arrow.py new file mode 100644 index 0000000000000000000000000000000000000000..0c1772b46d78993566ba580bda8f71f1113bcec6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/arrow.py @@ -0,0 +1,1408 @@ +import abc +from datetime import datetime + +import itertools +import json +import logging +import sys +from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union + +import numpy as np +import pyarrow as pa +from packaging.version import parse as parse_version +import ray.cloudpickle as cloudpickle +from enum import Enum + +from ray._private.arrow_utils import get_pyarrow_version +from ray.air.util.tensor_extensions.utils import ( + _is_ndarray_variable_shaped_tensor, + create_ragged_ndarray, + _should_convert_to_tensor, + ArrayLike, +) +from ray.data._internal.numpy_support import ( + convert_to_numpy, + _convert_datetime_to_np_datetime, +) +from ray.util import log_once +from ray.util.annotations import DeveloperAPI, PublicAPI +from ray.util.common import INT32_MAX +from ray._private.ray_constants import env_integer + + +PYARROW_VERSION = get_pyarrow_version() +# Minimum version of Arrow that supports subclassable ExtensionScalars. +# TODO(Clark): Remove conditional definition once we only support Arrow 9.0.0+. +MIN_PYARROW_VERSION_SCALAR_SUBCLASS = parse_version("9.0.0") +# Minimum version supporting `zero_copy_only` flag in `ChunkedArray.to_numpy` +MIN_PYARROW_VERSION_CHUNKED_ARRAY_TO_NUMPY_ZERO_COPY_ONLY = parse_version("13.0.0") + +NUM_BYTES_PER_UNICODE_CHAR = 4 + + +class _SerializationFormat(Enum): + # JSON format is legacy and inefficient, only kept for backward compatibility + JSON = 0 + CLOUDPICKLE = 1 + + +# Set the default serialization format for Arrow extension types. +ARROW_EXTENSION_SERIALIZATION_FORMAT = _SerializationFormat( + _SerializationFormat.JSON # legacy + if env_integer("RAY_DATA_ARROW_EXTENSION_SERIALIZATION_LEGACY_JSON_FORMAT", 0) == 1 + else _SerializationFormat.CLOUDPICKLE # default +) + + +logger = logging.getLogger(__name__) + + +def _deserialize_with_fallback(serialized: bytes, field_name: str = "data"): + """Deserialize data with cloudpickle first, fallback to JSON.""" + try: + # Try cloudpickle first (new format) + return cloudpickle.loads(serialized) + except Exception: + # Fallback to JSON format (legacy) + try: + return json.loads(serialized) + except json.JSONDecodeError: + raise ValueError( + f"Unable to deserialize {field_name} from {type(serialized)}" + ) + + +@DeveloperAPI +class ArrowConversionError(Exception): + """Error raised when there is an issue converting data to Arrow.""" + + MAX_DATA_STR_LEN = 200 + + def __init__(self, data_str: str): + if len(data_str) > self.MAX_DATA_STR_LEN: + data_str = data_str[: self.MAX_DATA_STR_LEN] + "..." + message = f"Error converting data to Arrow: {data_str}" + super().__init__(message) + + +def _arrow_extension_scalars_are_subclassable(): + """ + Whether Arrow ExtensionScalars support subclassing in the current pyarrow version. + + This returns True if the pyarrow version is 9.0.0+, or if the pyarrow version is + unknown. + """ + # TODO(Clark): Remove utility once we only support Arrow 9.0.0+. + return ( + PYARROW_VERSION is None + or PYARROW_VERSION >= MIN_PYARROW_VERSION_SCALAR_SUBCLASS + ) + + +@DeveloperAPI +def pyarrow_table_from_pydict( + pydict: Dict[str, Union[List[Any], pa.Array]], +) -> pa.Table: + """ + Convert a Python dictionary to a pyarrow Table. + + Raises: + ArrowConversionError: if the conversion fails. + """ + try: + return pa.Table.from_pydict(pydict) + except Exception as e: + raise ArrowConversionError(str(pydict)) from e + + +@DeveloperAPI(stability="alpha") +def convert_to_pyarrow_array( + column_values: Union[List[Any], np.ndarray, ArrayLike], column_name: str +) -> pa.Array: + """Converts provided NumPy `ndarray` into PyArrow's `array` while utilizing + both Arrow's natively supported types as well as custom extension types: + + - ArrowTensorArray (for tensors) + - ArrowPythonObjectArray (for user-defined python class objects, as well as + any python object that aren't represented by a corresponding Arrow's native + scalar type) + """ + + try: + # Since Arrow does NOT support tensors (aka multidimensional arrays) natively, + # we have to make sure that we handle this case utilizing `ArrowTensorArray` + # extension type + if len(column_values) > 0 and _should_convert_to_tensor( + column_values, column_name + ): + from ray.data.extensions.tensor_extension import ArrowTensorArray + + # Convert to Numpy before creating instance of `ArrowTensorArray` to + # align tensor shapes falling back to ragged ndarray only if necessary + return ArrowTensorArray.from_numpy( + convert_to_numpy(column_values), column_name + ) + else: + return _convert_to_pyarrow_native_array(column_values, column_name) + + except ArrowConversionError as ace: + from ray.data import DataContext + from ray.data.extensions.object_extension import ( + ArrowPythonObjectArray, + _object_extension_type_allowed, + ) + + enable_fallback_config: Optional[ + bool + ] = DataContext.get_current().enable_fallback_to_arrow_object_ext_type + + if not _object_extension_type_allowed(): + object_ext_type_fallback_allowed = False + object_ext_type_detail = ( + "skipping fallback to serialize as pickled python" + f" objects (due to unsupported Arrow version {PYARROW_VERSION}, " + f"min required version is {MIN_PYARROW_VERSION_SCALAR_SUBCLASS})" + ) + else: + # NOTE: By default setting is unset which (for compatibility reasons) + # is allowing the fallback + object_ext_type_fallback_allowed = ( + enable_fallback_config is None or enable_fallback_config + ) + + if object_ext_type_fallback_allowed: + object_ext_type_detail = ( + "falling back to serialize as pickled python objects" + ) + else: + object_ext_type_detail = ( + "skipping fallback to serialize as pickled python objects " + "(due to DataContext.enable_fallback_to_arrow_object_ext_type " + "= False)" + ) + + # To avoid logging following warning for every block it's + # only going to be logged in following cases + # - It's being logged for the first time, and + # - When config enabling fallback is not set explicitly (in this case + # fallback will still occur by default for compatibility reasons), or + # - Fallback is disallowed (either explicitly or due to use of incompatible + # Pyarrow version) + if ( + enable_fallback_config is None or not object_ext_type_fallback_allowed + ) and log_once("_fallback_to_arrow_object_extension_type_warning"): + logger.warning( + f"Failed to convert column '{column_name}' into pyarrow " + f"array due to: {ace}; {object_ext_type_detail}", + exc_info=ace, + ) + + if not object_ext_type_fallback_allowed: + # If `ArrowPythonObjectType` is not supported raise original exception + raise + + # Otherwise, attempt to fall back to serialize as python objects + return ArrowPythonObjectArray.from_objects(column_values) + + +def _convert_to_pyarrow_native_array( + column_values: Union[List[Any], np.ndarray], column_name: str +) -> pa.Array: + """Converts provided NumPy `ndarray` into PyArrow's `array` while only utilizing + Arrow's natively supported types (ie no custom extension types)""" + + try: + # NOTE: Python's `datetime` only supports precision up to us and could + # inadvertently lose precision when handling Pandas `Timestamp` type. + # To avoid that we convert provided list of `datetime` objects into + # ndarray of `np.datetime64` + if len(column_values) > 0 and isinstance(column_values[0], datetime): + column_values = _convert_datetime_to_np_datetime(column_values) + + # To avoid deserialization penalty of converting Arrow arrays (`Array` and `ChunkedArray`) + # to Python objects and then back to Arrow, we instead combine them into ListArray manually + if len(column_values) > 0 and isinstance( + column_values[0], (pa.Array, pa.ChunkedArray) + ): + return _combine_as_list_array(column_values) + + # NOTE: We explicitly infer PyArrow `DataType` so that + # we can perform upcasting to be able to accommodate + # blocks that are larger than 2Gb in size (limited + # by int32 offsets used by Arrow internally) + pa_type = _infer_pyarrow_type(column_values) + + if pa_type and pa.types.is_timestamp(pa_type): + # NOTE: Quirky Arrow behavior will coerce unsupported Numpy `datetime64` + # precisions that are nested inside a list type, but won't do it, + # if these are top-level ndarray. To work this around we have to cast + # ndarray values manually + if isinstance(column_values, np.ndarray): + column_values = _coerce_np_datetime_to_pa_timestamp_precision( + column_values, pa_type, column_name + ) + + logger.log( + logging.getLevelName("TRACE"), + f"Inferred dtype of '{pa_type}' for column '{column_name}'", + ) + + # NOTE: Pyarrow 19.0 is not able to properly handle `ListScalar(None)` when + # creating native array and hence we have to manually replace any such + # cases w/ an explicit null value + # + # See for more details https://github.com/apache/arrow/issues/45682 + if len(column_values) > 0 and isinstance(column_values[0], pa.ListScalar): + column_values = [v if v.is_valid else None for v in column_values] + + return pa.array(column_values, type=pa_type) + except Exception as e: + raise ArrowConversionError(str(column_values)) from e + + +def _combine_as_list_array(column_values: List[Union[pa.Array, pa.ChunkedArray]]): + """Combines list of Arrow arrays into a single `ListArray`""" + + # First, compute respective offsets in the resulting array + lens = [len(v) for v in column_values] + offsets = pa.array(np.concatenate([[0], np.cumsum(lens)]), type=pa.int32()) + + # Concat all the chunks into a single contiguous array + combined = pa.concat_arrays( + itertools.chain( + *[ + v.chunks if isinstance(v, pa.ChunkedArray) else [v] + for v in column_values + ] + ) + ) + + # TODO support null masking + return pa.ListArray.from_arrays(offsets, combined, pa.list_(combined.type)) + + +def _coerce_np_datetime_to_pa_timestamp_precision( + column_values: np.ndarray, dtype: pa.TimestampType, column_name: str +): + assert np.issubdtype(column_values.dtype, np.datetime64) + + numpy_precision, _ = np.datetime_data(column_values.dtype) + arrow_precision = dtype.unit + + if arrow_precision != numpy_precision: + # Arrow supports fewer timestamp resolutions than NumPy. So, if Arrow + # doesn't support the resolution, we need to cast the NumPy array to a + # different type. This can be a lossy conversion. + column_values = column_values.astype(f"datetime64[{arrow_precision}]") + + if log_once(f"column_{column_name}_timestamp_warning"): + logger.warning( + f"Converting a {numpy_precision!r} precision datetime NumPy " + f"array to '{arrow_precision}' precision Arrow timestamp. This " + "conversion occurs because Arrow supports fewer precisions " + "than Arrow and might result in a loss of precision or " + "unrepresentable values." + ) + + return column_values + + +def _infer_pyarrow_type( + column_values: Union[List[Any], np.ndarray] +) -> Optional[pa.DataType]: + """Infers target Pyarrow `DataType` based on the provided + columnar values. + + NOTE: This is a wrapper on top of `pa.infer_type(...)` utility + performing up-casting of `binary` and `string` types to + corresponding `large_binary` and `large_string` types in case + any of the array elements exceeds 2Gb in size therefore + making it impossible for original types to accommodate such + values. + + Unfortunately, for unknown reasons PA doesn't perform + that upcasting itself henceforth we have to do perform + it manually + + Args: + column_values: List of columnar values + + Returns: + Instance of PyArrow's `DataType` based on the provided + column values + """ + + if len(column_values) == 0: + return None + + # `pyarrow.infer_type` leaks memory if you pass an array with a datetime64 dtype. + # To avoid this, we handle datetime64 dtypes separately. + # See https://github.com/apache/arrow/issues/45493. + dtype_with_timestamp_type = _try_infer_pa_timestamp_type(column_values) + + if dtype_with_timestamp_type is not None: + return dtype_with_timestamp_type + + inferred_pa_dtype = pa.infer_type(column_values) + + def _len_gt_overflow_threshold(obj: Any) -> bool: + # NOTE: This utility could be seeing objects other than strings or bytes in + # cases when column contains non-scalar non-homogeneous object types as + # column values, therefore making Arrow unable to infer corresponding + # column type appropriately, therefore falling back to assume the type + # of the first element in the list. + # + # Check out test cases for this method for an additional context. + if isinstance(obj, (str, bytes)): + return len(obj) > INT32_MAX + + return False + + if pa.types.is_binary(inferred_pa_dtype) and any( + [_len_gt_overflow_threshold(v) for v in column_values] + ): + return pa.large_binary() + elif pa.types.is_string(inferred_pa_dtype) and any( + [_len_gt_overflow_threshold(v) for v in column_values] + ): + return pa.large_string() + + return inferred_pa_dtype + + +_NUMPY_TO_ARROW_PRECISION_MAP = { + # Coarsest timestamp precision in Arrow is seconds + "Y": "s", + "D": "s", + "M": "s", + "W": "s", + "h": "s", + "m": "s", + "s": "s", + "ms": "ms", + "us": "us", + "ns": "ns", + # Finest timestamp precision in Arrow is nanoseconds + "ps": "ns", + "fs": "ns", + "as": "ns", +} + + +def _try_infer_pa_timestamp_type( + column_values: Union[List[Any], np.ndarray] +) -> Optional[pa.DataType]: + if isinstance(column_values, list) and len(column_values) > 0: + # In case provided column values is a list of elements, this + # utility assumes homogeneity (in line with the behavior of Arrow + # type inference utils) + element_type = _try_infer_pa_timestamp_type(column_values[0]) + return pa.list_(element_type) if element_type else None + + if isinstance(column_values, np.ndarray) and np.issubdtype( + column_values.dtype, np.datetime64 + ): + np_precision, _ = np.datetime_data(column_values.dtype) + return pa.timestamp(_NUMPY_TO_ARROW_PRECISION_MAP[np_precision]) + + else: + return None + + +@DeveloperAPI +def get_arrow_extension_tensor_types(): + """Returns list of extension types of Arrow Array holding + multidimensional tensors + """ + return ( + *get_arrow_extension_fixed_shape_tensor_types(), + *get_arrow_extension_variable_shape_tensor_types(), + ) + + +@DeveloperAPI +def get_arrow_extension_fixed_shape_tensor_types(): + """Returns list of Arrow extension types holding multidimensional + tensors of *fixed* shape + """ + return ArrowTensorType, ArrowTensorTypeV2 + + +@DeveloperAPI +def get_arrow_extension_variable_shape_tensor_types(): + """Returns list of Arrow extension types holding multidimensional + tensors of *fixed* shape + """ + return (ArrowVariableShapedTensorType,) + + +class _BaseFixedShapeArrowTensorType(pa.ExtensionType, abc.ABC): + """ + Arrow ExtensionType for an array of fixed-shaped, homogeneous-typed + tensors. + + This is the Arrow side of TensorDtype. + + See Arrow extension type docs: + https://arrow.apache.org/docs/python/extending_types.html#defining-extension-types-user-defined-types + """ + + def __init__( + self, shape: Tuple[int, ...], tensor_dtype: pa.DataType, ext_type_id: str + ): + self._shape = shape + + super().__init__(tensor_dtype, ext_type_id) + + @property + def shape(self): + """ + Shape of contained tensors. + """ + return self._shape + + @property + def scalar_type(self): + """Returns the type of the underlying tensor elements.""" + return self.storage_type.value_type + + def to_pandas_dtype(self): + """ + Convert Arrow extension type to corresponding Pandas dtype. + + Returns: + An instance of pd.api.extensions.ExtensionDtype. + """ + from ray.air.util.tensor_extensions.pandas import TensorDtype + + return TensorDtype(self._shape, self.scalar_type.to_pandas_dtype()) + + def __reduce__(self): + return self.__arrow_ext_deserialize__, ( + self.storage_type, + self.__arrow_ext_serialize__(), + ) + + def __arrow_ext_serialize__(self): + if ARROW_EXTENSION_SERIALIZATION_FORMAT == _SerializationFormat.CLOUDPICKLE: + return cloudpickle.dumps(self._shape) + elif ARROW_EXTENSION_SERIALIZATION_FORMAT == _SerializationFormat.JSON: + return json.dumps(self._shape).encode() + else: + raise ValueError( + f"Invalid serialization format: {ARROW_EXTENSION_SERIALIZATION_FORMAT}" + ) + + def __arrow_ext_class__(self): + """ + ExtensionArray subclass with custom logic for this array of tensors + type. + + Returns: + A subclass of pd.api.extensions.ExtensionArray. + """ + return ArrowTensorArray + + if _arrow_extension_scalars_are_subclassable(): + # TODO(Clark): Remove this version guard once we only support Arrow 9.0.0+. + def __arrow_ext_scalar_class__(self): + """ + ExtensionScalar subclass with custom logic for this array of tensors type. + """ + return ArrowTensorScalar + + def _extension_scalar_to_ndarray(self, scalar: "pa.ExtensionScalar") -> np.ndarray: + """ + Convert an ExtensionScalar to a tensor element. + """ + raw_values = scalar.value.values + shape = scalar.type.shape + value_type = raw_values.type + offset = raw_values.offset + data_buffer = raw_values.buffers()[1] + return _to_ndarray_helper(shape, value_type, offset, data_buffer) + + def __str__(self) -> str: + return ( + f"numpy.ndarray(shape={self.shape}, dtype={self.storage_type.value_type})" + ) + + def __repr__(self) -> str: + return str(self) + + @classmethod + def _need_variable_shaped_tensor_array( + cls, + array_types: Sequence[ + Union[ + "ArrowTensorType", "ArrowTensorTypeV2", "ArrowVariableShapedTensorType" + ] + ], + ) -> bool: + """ + Whether the provided list of tensor types needs a variable-shaped + representation (i.e. `ArrowVariableShapedTensorType`) when concatenating + or chunking. If one or more of the tensor types in `array_types` are + variable-shaped and/or any of the tensor arrays have a different shape + than the others, a variable-shaped tensor array representation will be + required and this method will return True. + + Args: + array_types: List of tensor types to check if a variable-shaped + representation is required for concatenation + + Returns: + True if concatenating arrays with types `array_types` requires + a variable-shaped representation + """ + shape = None + for arr_type in array_types: + # If at least one of the arrays is variable-shaped, we can immediately + # short-circuit since we require a variable-shaped representation. + if isinstance(arr_type, ArrowVariableShapedTensorType): + return True + if not isinstance(arr_type, get_arrow_extension_fixed_shape_tensor_types()): + raise ValueError( + "All provided array types must be an instance of either " + "ArrowTensorType or ArrowVariableShapedTensorType, but " + f"got {arr_type}" + ) + # We need variable-shaped representation if any of the tensor arrays have + # different shapes. + if shape is not None and arr_type.shape != shape: + return True + shape = arr_type.shape + return False + + def __hash__(self) -> int: + return hash((type(self), self.extension_name, self.storage_type, self._shape)) + + +@PublicAPI(stability="beta") +class ArrowTensorType(_BaseFixedShapeArrowTensorType): + """Arrow ExtensionType (v1) for tensors. + + NOTE: This type does *NOT* support tensors larger than 4Gb (due to + overflow of int32 offsets utilized inside Pyarrow `ListType`) + """ + + OFFSET_DTYPE = np.int32 + __hash__ = _BaseFixedShapeArrowTensorType.__hash__ + + def __init__(self, shape: Tuple[int, ...], dtype: pa.DataType): + """ + Construct the Arrow extension type for array of fixed-shaped tensors. + + Args: + shape: Shape of contained tensors. + dtype: pyarrow dtype of tensor elements. + """ + + super().__init__(shape, pa.list_(dtype), "ray.data.arrow_tensor") + + @classmethod + def __arrow_ext_deserialize__(cls, storage_type, serialized): + shape = tuple(_deserialize_with_fallback(serialized, "shape")) + return cls(shape, storage_type.value_type) + + def __eq__(self, other): + return ( + isinstance(other, ArrowTensorType) + and other.shape == self.shape + and other.scalar_type == self.scalar_type + ) + + +@PublicAPI(stability="alpha") +class ArrowTensorTypeV2(_BaseFixedShapeArrowTensorType): + """Arrow ExtensionType (v2) for tensors (supporting tensors > 4Gb).""" + + OFFSET_DTYPE = np.int64 + __hash__ = _BaseFixedShapeArrowTensorType.__hash__ + + def __init__(self, shape: Tuple[int, ...], dtype: pa.DataType): + """ + Construct the Arrow extension type for array of fixed-shaped tensors. + + Args: + shape: Shape of contained tensors. + dtype: pyarrow dtype of tensor elements. + """ + + super().__init__(shape, pa.large_list(dtype), "ray.data.arrow_tensor_v2") + + @classmethod + def __arrow_ext_deserialize__(cls, storage_type, serialized): + shape = tuple(_deserialize_with_fallback(serialized, "shape")) + return cls(shape, storage_type.value_type) + + def __eq__(self, other): + return ( + isinstance(other, ArrowTensorTypeV2) + and other.shape == self.shape + and other.scalar_type == self.scalar_type + ) + + +if _arrow_extension_scalars_are_subclassable(): + # TODO(Clark): Remove this version guard once we only support Arrow 9.0.0+. + @PublicAPI(stability="beta") + class ArrowTensorScalar(pa.ExtensionScalar): + def as_py(self, **kwargs) -> np.ndarray: + return self.type._extension_scalar_to_ndarray(self) + + def __array__(self) -> np.ndarray: + return self.as_py() + + +# TODO(Clark): Remove this mixin once we only support Arrow 9.0.0+. +class _ArrowTensorScalarIndexingMixin: + """ + A mixin providing support for scalar indexing in tensor extension arrays for + Arrow < 9.0.0, before full ExtensionScalar support was added. This mixin overrides + __getitem__, __iter__, and to_pylist. + """ + + # This mixin will be a no-op (no methods added) for Arrow 9.0.0+. + if not _arrow_extension_scalars_are_subclassable(): + # NOTE: These __iter__ and to_pylist definitions are shared for both + # Arrow < 8.0.0 and Arrow 8.*. + def __iter__(self): + # Override pa.Array.__iter__() in order to return an iterator of + # properly shaped tensors instead of an iterator of flattened tensors. + # See comment in above __getitem__ method. + for i in range(len(self)): + # Use overridden __getitem__ method. + yield self.__getitem__(i) + + def to_pylist(self): + # Override pa.Array.to_pylist() due to a lack of ExtensionScalar + # support (see comment in __getitem__). + return list(self) + + def __getitem__(self, key): + # This __getitem__ hook allows us to support proper indexing when + # accessing a single tensor (a "scalar" item of the array). Without this + # hook for integer keys, the indexing will fail on pyarrow < 9.0.0 due + # to a lack of ExtensionScalar subclassing support. + + # NOTE(Clark): We'd like to override the pa.Array.getitem() helper + # instead, which would obviate the need for overriding __iter__(), but + # unfortunately overriding Cython cdef methods with normal Python + # methods isn't allowed. + item = super().__getitem__(key) + if not isinstance(key, slice): + item = item.type._extension_scalar_to_ndarray(item) + return item + + +# NOTE: We need to inherit from the mixin before pa.ExtensionArray to ensure that the +# mixin's overriding methods appear first in the MRO. +# TODO(Clark): Remove this mixin once we only support Arrow 9.0.0+. +@PublicAPI(stability="beta") +class ArrowTensorArray(_ArrowTensorScalarIndexingMixin, pa.ExtensionArray): + """ + An array of fixed-shape, homogeneous-typed tensors. + + This is the Arrow side of TensorArray. + + See Arrow docs for customizing extension arrays: + https://arrow.apache.org/docs/python/extending_types.html#custom-extension-array-class + """ + + @classmethod + def from_numpy( + cls, + arr: Union[np.ndarray, Iterable[np.ndarray]], + column_name: Optional[str] = None, + ) -> Union["ArrowTensorArray", "ArrowVariableShapedTensorArray"]: + """ + Convert an ndarray or an iterable of ndarrays to an array of homogeneous-typed + tensors. If given fixed-shape tensor elements, this will return an + ``ArrowTensorArray``; if given variable-shape tensor elements, this will return + an ``ArrowVariableShapedTensorArray``. + + Args: + arr: An ndarray or an iterable of ndarrays. + column_name: Optional. Used only in logging outputs to provide + additional details. + + Returns: + - If fixed-shape tensor elements, an ``ArrowTensorArray`` containing + ``len(arr)`` tensors of fixed shape. + - If variable-shaped tensor elements, an ``ArrowVariableShapedTensorArray`` + containing ``len(arr)`` tensors of variable shape. + - If scalar elements, a ``pyarrow.Array``. + """ + if not isinstance(arr, np.ndarray) and isinstance(arr, Iterable): + arr = list(arr) + + if isinstance(arr, (list, tuple)) and arr and isinstance(arr[0], np.ndarray): + # Stack ndarrays and pass through to ndarray handling logic below. + try: + arr = np.stack(arr, axis=0) + except ValueError as ve: + logger.warning( + f"Failed to stack lists due to: {ve}; " + f"falling back to using np.array(..., dtype=object)", + exc_info=ve, + ) + + # ndarray stacking may fail if the arrays are heterogeneously-shaped. + arr = np.array(arr, dtype=object) + + if not isinstance(arr, np.ndarray): + raise ValueError( + f"Must give ndarray or iterable of ndarrays, got {type(arr)} {arr}" + ) + + try: + timestamp_dtype = _try_infer_pa_timestamp_type(arr) + + if timestamp_dtype: + # NOTE: Quirky Arrow behavior will coerce unsupported Numpy `datetime64` + # precisions that are nested inside a list type, but won't do it, + # if these are top-level ndarray. To work this around we have to cast + # ndarray values manually + arr = _coerce_np_datetime_to_pa_timestamp_precision( + arr, timestamp_dtype, column_name + ) + + return cls._from_numpy(arr) + except Exception as e: + data_str = "" + if column_name: + data_str += f"column: '{column_name}', " + data_str += f"shape: {arr.shape}, dtype: {arr.dtype}, data: {arr}" + raise ArrowConversionError(data_str) from e + + @classmethod + def _from_numpy( + cls, + arr: np.ndarray, + ) -> Union["ArrowTensorArray", "ArrowVariableShapedTensorArray"]: + if len(arr) > 0 and np.isscalar(arr[0]): + # Elements are scalar so a plain Arrow Array will suffice. + return pa.array(arr) + if _is_ndarray_variable_shaped_tensor(arr): + # Tensor elements have variable shape, so we delegate to + # ArrowVariableShapedTensorArray. + return ArrowVariableShapedTensorArray.from_numpy(arr) + if not arr.flags.c_contiguous: + # We only natively support C-contiguous ndarrays. + arr = np.ascontiguousarray(arr) + scalar_dtype = pa.from_numpy_dtype(arr.dtype) + if pa.types.is_string(scalar_dtype): + if arr.dtype.byteorder == ">" or ( + arr.dtype.byteorder == "=" and sys.byteorder == "big" + ): + raise ValueError( + "Only little-endian string tensors are supported, " + f"but got: {arr.dtype}", + ) + scalar_dtype = pa.binary(arr.dtype.itemsize) + outer_len = arr.shape[0] + element_shape = arr.shape[1:] + total_num_items = arr.size + num_items_per_element = np.prod(element_shape) if element_shape else 1 + + # Data buffer. + if pa.types.is_boolean(scalar_dtype): + # NumPy doesn't represent boolean arrays as bit-packed, so we manually + # bit-pack the booleans before handing the buffer off to Arrow. + # NOTE: Arrow expects LSB bit-packed ordering. + # NOTE: This creates a copy. + arr = np.packbits(arr, bitorder="little") + data_buffer = pa.py_buffer(arr) + data_array = pa.Array.from_buffers( + scalar_dtype, total_num_items, [None, data_buffer] + ) + + from ray.data import DataContext + + if DataContext.get_current().use_arrow_tensor_v2: + pa_type_ = ArrowTensorTypeV2(element_shape, scalar_dtype) + else: + pa_type_ = ArrowTensorType(element_shape, scalar_dtype) + + # Create Offset buffer + offset_buffer = pa.py_buffer( + pa_type_.OFFSET_DTYPE( + [i * num_items_per_element for i in range(outer_len + 1)] + ) + ) + + storage = pa.Array.from_buffers( + pa_type_.storage_type, + outer_len, + [None, offset_buffer], + children=[data_array], + ) + + return pa.ExtensionArray.from_storage(pa_type_, storage) + + def _to_numpy(self, index: Optional[int] = None, zero_copy_only: bool = False): + """ + Helper for getting either an element of the array of tensors as an + ndarray, or the entire array of tensors as a single ndarray. + + Args: + index: The index of the tensor element that we wish to return as + an ndarray. If not given, the entire array of tensors is + returned as an ndarray. + zero_copy_only: If True, an exception will be raised if the + conversion to a NumPy array would require copying the + underlying data (e.g. in presence of nulls, or for + non-primitive types). This argument is currently ignored, so + zero-copy isn't enforced even if this argument is true. + + Returns: + The corresponding tensor element as an ndarray if an index was + given, or the entire array of tensors as an ndarray otherwise. + """ + # TODO(Clark): Enforce zero_copy_only. + # TODO(Clark): Support strides? + # Buffers schema: + # [None, offset_buffer, None, data_buffer] + buffers = self.buffers() + data_buffer = buffers[3] + storage_list_type = self.storage.type + value_type = storage_list_type.value_type + ext_dtype = value_type.to_pandas_dtype() + shape = self.type.shape + if pa.types.is_boolean(value_type): + # Arrow boolean array buffers are bit-packed, with 8 entries per byte, + # and are accessed via bit offsets. + buffer_item_width = value_type.bit_width + else: + # We assume all other array types are accessed via byte array + # offsets. + buffer_item_width = value_type.bit_width // 8 + # Number of items per inner ndarray. + num_items_per_element = np.prod(shape) if shape else 1 + # Base offset into data buffer, e.g. due to zero-copy slice. + buffer_offset = self.offset * num_items_per_element + # Offset of array data in buffer. + offset = buffer_item_width * buffer_offset + if index is not None: + # Getting a single tensor element of the array. + offset_buffer = buffers[1] + offset_array = np.ndarray( + (len(self),), buffer=offset_buffer, dtype=self.type.OFFSET_DTYPE + ) + # Offset into array to reach logical index. + index_offset = offset_array[index] + # Add the index offset to the base offset. + offset += buffer_item_width * index_offset + else: + # Getting the entire array of tensors. + shape = (len(self),) + shape + if pa.types.is_boolean(value_type): + # Special handling for boolean arrays, since Arrow bit-packs boolean arrays + # while NumPy does not. + # Cast as uint8 array and let NumPy unpack into a boolean view. + # Offset into uint8 array, where each element is a bucket for 8 booleans. + byte_bucket_offset = offset // 8 + # Offset for a specific boolean, within a uint8 array element. + bool_offset = offset % 8 + # The number of uint8 array elements (buckets) that our slice spans. + # Note that, due to the offset for a specific boolean, the slice can span + # byte boundaries even if it contains less than 8 booleans. + num_boolean_byte_buckets = 1 + ((bool_offset + np.prod(shape) - 1) // 8) + # Construct the uint8 array view on the buffer. + arr = np.ndarray( + (num_boolean_byte_buckets,), + dtype=np.uint8, + buffer=data_buffer, + offset=byte_bucket_offset, + ) + # Unpack into a byte per boolean, using LSB bit-packed ordering. + arr = np.unpackbits(arr, bitorder="little") + # Interpret buffer as boolean array. + return np.ndarray(shape, dtype=np.bool_, buffer=arr, offset=bool_offset) + # Special handling of binary/string types. Assumes unicode string tensor columns + if pa.types.is_fixed_size_binary(value_type): + ext_dtype = np.dtype( + f" Union["ArrowTensorArray", "ArrowVariableShapedTensorArray"]: + """ + Concatenate multiple tensor arrays. + + If one or more of the tensor arrays in to_concat are variable-shaped and/or any + of the tensor arrays have a different shape than the others, a variable-shaped + tensor array will be returned. + + Args: + to_concat: Tensor arrays to concat + ensure_copy: Skip copying when ensure_copy is False and there is exactly 1 chunk. + """ + to_concat_types = [arr.type for arr in to_concat] + if ArrowTensorType._need_variable_shaped_tensor_array(to_concat_types): + # Need variable-shaped tensor array. + # TODO(Clark): Eliminate this NumPy roundtrip by directly constructing the + # underlying storage array buffers (NumPy roundtrip will not be zero-copy + # for e.g. boolean arrays). + # NOTE(Clark): Iterating over a tensor extension array converts each element + # to an ndarray view. + return ArrowVariableShapedTensorArray.from_numpy( + [e for a in to_concat for e in a] + ) + elif not ensure_copy and len(to_concat) == 1: + # Skip copying + return to_concat[0] + else: + storage = pa.concat_arrays([c.storage for c in to_concat]) + + return ArrowTensorArray.from_storage(to_concat[0].type, storage) + + @classmethod + def _chunk_tensor_arrays( + cls, arrs: Sequence[Union["ArrowTensorArray", "ArrowVariableShapedTensorArray"]] + ) -> pa.ChunkedArray: + """ + Create a ChunkedArray from multiple tensor arrays. + """ + arrs_types = [arr.type for arr in arrs] + if ArrowTensorType._need_variable_shaped_tensor_array(arrs_types): + new_arrs = [] + for a in arrs: + if isinstance(a.type, get_arrow_extension_fixed_shape_tensor_types()): + a = a.to_variable_shaped_tensor_array() + assert isinstance(a.type, ArrowVariableShapedTensorType) + new_arrs.append(a) + arrs = new_arrs + return pa.chunked_array(arrs) + + def to_variable_shaped_tensor_array(self) -> "ArrowVariableShapedTensorArray": + """ + Convert this tensor array to a variable-shaped tensor array. + + This is primarily used when concatenating multiple chunked tensor arrays where + at least one chunked array is already variable-shaped and/or the shapes of the + chunked arrays differ, in which case the resulting concatenated tensor array + will need to be in the variable-shaped representation. + """ + # TODO(Clark): Eliminate this NumPy roundtrip by directly constructing the + # underlying storage array buffers (NumPy roundtrip will not be zero-copy for + # e.g. boolean arrays). + return ArrowVariableShapedTensorArray.from_numpy(self.to_numpy()) + + +@PublicAPI(stability="alpha") +class ArrowVariableShapedTensorType(pa.ExtensionType): + """ + Arrow ExtensionType for an array of heterogeneous-shaped, homogeneous-typed + tensors. + + This is the Arrow side of TensorDtype for tensor elements with different shapes. + Note that this extension only supports non-ragged tensor elements; i.e., when + considering each tensor element in isolation, they must have a well-defined, + non-ragged shape. + + See Arrow extension type docs: + https://arrow.apache.org/docs/python/extending_types.html#defining-extension-types-user-defined-types + """ + + def __init__(self, dtype: pa.DataType, ndim: int): + """ + Construct the Arrow extension type for array of heterogeneous-shaped tensors. + + Args: + dtype: pyarrow dtype of tensor elements. + ndim: The number of dimensions in the tensor elements. + """ + self._ndim = ndim + super().__init__( + pa.struct( + [("data", pa.large_list(dtype)), ("shape", pa.list_(pa.int64()))] + ), + "ray.data.arrow_variable_shaped_tensor", + ) + + def to_pandas_dtype(self): + """ + Convert Arrow extension type to corresponding Pandas dtype. + + Returns: + An instance of pd.api.extensions.ExtensionDtype. + """ + from ray.air.util.tensor_extensions.pandas import TensorDtype + + return TensorDtype( + (None,) * self.ndim, + self.storage_type["data"].type.value_type.to_pandas_dtype(), + ) + + @property + def ndim(self) -> int: + """Return the number of dimensions in the tensor elements.""" + return self._ndim + + @property + def scalar_type(self): + """Returns the type of the underlying tensor elements.""" + data_field_index = self.storage_type.get_field_index("data") + return self.storage_type[data_field_index].type.value_type + + def __reduce__(self): + return self.__arrow_ext_deserialize__, ( + self.storage_type, + self.__arrow_ext_serialize__(), + ) + + def __arrow_ext_serialize__(self): + if ARROW_EXTENSION_SERIALIZATION_FORMAT == _SerializationFormat.CLOUDPICKLE: + return cloudpickle.dumps(self._ndim) + elif ARROW_EXTENSION_SERIALIZATION_FORMAT == _SerializationFormat.JSON: + return json.dumps(self._ndim).encode() + else: + raise ValueError( + f"Invalid serialization format: {ARROW_EXTENSION_SERIALIZATION_FORMAT}" + ) + + @classmethod + def __arrow_ext_deserialize__(cls, storage_type, serialized): + ndim = _deserialize_with_fallback(serialized, "ndim") + dtype = storage_type["data"].type.value_type + return cls(dtype, ndim) + + def __arrow_ext_class__(self): + """ + ExtensionArray subclass with custom logic for this array of tensors + type. + + Returns: + A subclass of pd.api.extensions.ExtensionArray. + """ + return ArrowVariableShapedTensorArray + + if _arrow_extension_scalars_are_subclassable(): + # TODO(Clark): Remove this version guard once we only support Arrow 9.0.0+. + def __arrow_ext_scalar_class__(self): + """ + ExtensionScalar subclass with custom logic for this array of tensors type. + """ + return ArrowTensorScalar + + def __str__(self) -> str: + dtype = self.storage_type["data"].type.value_type + return f"numpy.ndarray(ndim={self.ndim}, dtype={dtype})" + + def __repr__(self) -> str: + return str(self) + + def _extension_scalar_to_ndarray(self, scalar: "pa.ExtensionScalar") -> np.ndarray: + """ + Convert an ExtensionScalar to a tensor element. + """ + data = scalar.value.get("data") + raw_values = data.values + + shape = tuple(scalar.value.get("shape").as_py()) + value_type = raw_values.type + offset = raw_values.offset + data_buffer = raw_values.buffers()[1] + return _to_ndarray_helper(shape, value_type, offset, data_buffer) + + def __hash__(self) -> int: + return hash((type(self), self.extension_name, self.storage_type, self._ndim)) + + +# NOTE: We need to inherit from the mixin before pa.ExtensionArray to ensure that the +# mixin's overriding methods appear first in the MRO. +# TODO(Clark): Remove this mixin once we only support Arrow 9.0.0+. +@PublicAPI(stability="alpha") +class ArrowVariableShapedTensorArray( + _ArrowTensorScalarIndexingMixin, pa.ExtensionArray +): + """ + An array of heterogeneous-shaped, homogeneous-typed tensors. + + This is the Arrow side of TensorArray for tensor elements that have differing + shapes. Note that this extension only supports non-ragged tensor elements; i.e., + when considering each tensor element in isolation, they must have a well-defined + shape. This extension also only supports tensor elements that all have the same + number of dimensions. + + See Arrow docs for customizing extension arrays: + https://arrow.apache.org/docs/python/extending_types.html#custom-extension-array-class + """ + + @classmethod + def from_numpy( + cls, arr: Union[np.ndarray, List[np.ndarray], Tuple[np.ndarray]] + ) -> "ArrowVariableShapedTensorArray": + """ + Convert an ndarray or an iterable of heterogeneous-shaped ndarrays to an array + of heterogeneous-shaped, homogeneous-typed tensors. + + Args: + arr: An ndarray or an iterable of heterogeneous-shaped ndarrays. + + Returns: + An ArrowVariableShapedTensorArray containing len(arr) tensors of + heterogeneous shape. + """ + # Implementation note - Arrow representation of ragged tensors: + # + # We represent an array of ragged tensors using a struct array containing two + # fields: + # - data: a variable-sized list array, where each element in the array is a + # tensor element stored in a 1D (raveled) variable-sized list of the + # underlying scalar data type. + # - shape: a variable-sized list array containing the shapes of each tensor + # element. + if not isinstance(arr, (list, tuple, np.ndarray)): + raise ValueError( + "ArrowVariableShapedTensorArray can only be constructed from an " + f"ndarray or a list/tuple of ndarrays, but got: {type(arr)}" + ) + if len(arr) == 0: + # Empty ragged tensor arrays are not supported. + raise ValueError("Creating empty ragged tensor arrays is not supported.") + + # Whether all subndarrays are contiguous views of the same ndarray. + shapes, sizes, raveled = [], [], [] + ndim = None + for a in arr: + a = np.asarray(a) + if ndim is not None and a.ndim != ndim: + raise ValueError( + "ArrowVariableShapedTensorArray only supports tensor elements that " + "all have the same number of dimensions, but got tensor elements " + f"with dimensions: {ndim}, {a.ndim}" + ) + ndim = a.ndim + shapes.append(a.shape) + sizes.append(a.size) + # Convert to 1D array view; this should be zero-copy in the common case. + # NOTE: If array is not in C-contiguous order, this will convert it to + # C-contiguous order, incurring a copy. + a = np.ravel(a, order="C") + raveled.append(a) + # Get size offsets and total size. + sizes = np.array(sizes) + size_offsets = np.cumsum(sizes) + total_size = size_offsets[-1] + # Concatenate 1D views into a contiguous 1D array. + if all(_is_contiguous_view(curr, prev) for prev, curr in _pairwise(raveled)): + # An optimized zero-copy path if raveled tensor elements are already + # contiguous in memory, e.g. if this tensor array has already done a + # roundtrip through our Arrow representation. + np_data_buffer = raveled[-1].base + else: + np_data_buffer = np.concatenate(raveled) + dtype = np_data_buffer.dtype + pa_dtype = pa.from_numpy_dtype(dtype) + if pa.types.is_string(pa_dtype): + if dtype.byteorder == ">" or ( + dtype.byteorder == "=" and sys.byteorder == "big" + ): + raise ValueError( + "Only little-endian string tensors are supported, " + f"but got: {dtype}" + ) + pa_dtype = pa.binary(dtype.itemsize) + if dtype.type is np.bool_: + # NumPy doesn't represent boolean arrays as bit-packed, so we manually + # bit-pack the booleans before handing the buffer off to Arrow. + # NOTE: Arrow expects LSB bit-packed ordering. + # NOTE: This creates a copy. + np_data_buffer = np.packbits(np_data_buffer, bitorder="little") + data_buffer = pa.py_buffer(np_data_buffer) + # Construct underlying data array. + value_array = pa.Array.from_buffers(pa_dtype, total_size, [None, data_buffer]) + # Construct array for offsets into the 1D data array, where each offset + # corresponds to a tensor element. + size_offsets = np.insert(size_offsets, 0, 0) + offset_array = pa.array(size_offsets) + data_array = pa.LargeListArray.from_arrays(offset_array, value_array) + # We store the tensor element shapes so we can reconstruct each tensor when + # converting back to NumPy ndarrays. + shape_array = pa.array(shapes) + # Build storage array containing tensor data and the tensor element shapes. + storage = pa.StructArray.from_arrays( + [data_array, shape_array], + ["data", "shape"], + ) + type_ = ArrowVariableShapedTensorType(pa_dtype, ndim) + return pa.ExtensionArray.from_storage(type_, storage) + + def _to_numpy(self, index: Optional[int] = None, zero_copy_only: bool = False): + """ + Helper for getting either an element of the array of tensors as an ndarray, or + the entire array of tensors as a single ndarray. + + Args: + index: The index of the tensor element that we wish to return as an + ndarray. If not given, the entire array of tensors is returned as an + ndarray. + zero_copy_only: If True, an exception will be raised if the conversion to a + NumPy array would require copying the underlying data (e.g. in presence + of nulls, or for non-primitive types). This argument is currently + ignored, so zero-copy isn't enforced even if this argument is true. + + Returns: + The corresponding tensor element as an ndarray if an index was given, or + the entire array of tensors as an ndarray otherwise. + """ + # TODO(Clark): Enforce zero_copy_only. + # TODO(Clark): Support strides? + if index is None: + # Get individual ndarrays for each tensor element. + arrs = [self._to_numpy(i, zero_copy_only) for i in range(len(self))] + # Return ragged NumPy ndarray in the ndarray of ndarray pointers + # representation. + return create_ragged_ndarray(arrs) + data = self.storage.field("data") + shapes = self.storage.field("shape") + + shape = shapes[index].as_py() + value_type = data.type.value_type + offset = data.offsets[index].as_py() + data_buffer = data.buffers()[3] + return _to_ndarray_helper(shape, value_type, offset, data_buffer) + + def to_numpy(self, zero_copy_only: bool = True): + """ + Convert the entire array of tensors into a single ndarray. + + Args: + zero_copy_only: If True, an exception will be raised if the conversion to a + NumPy array would require copying the underlying data (e.g. in presence + of nulls, or for non-primitive types). This argument is currently + ignored, so zero-copy isn't enforced even if this argument is true. + + Returns: + A single ndarray representing the entire array of tensors. + """ + return self._to_numpy(zero_copy_only=zero_copy_only) + + +def _is_contiguous_view(curr: np.ndarray, prev: Optional[np.ndarray]) -> bool: + """Check if the provided tensor element is contiguous with the previous tensor + element. + + Args: + curr: The tensor element whose contiguity that we wish to check. + prev: The previous tensor element in the tensor array. + + Returns: + Whether the provided tensor element is contiguous with the previous tensor + element. + """ + if ( + curr.base is None + or not curr.data.c_contiguous + or (prev is not None and curr.base is not prev.base) + ): + # curr is either: + # - not a view, + # - not in C-contiguous order, + # - a view that does not share its base with the other subndarrays. + return False + else: + # curr is a C-contiguous view that shares the same base with the seen + # subndarrays, but we need to confirm that it is contiguous with the + # previous subndarray. + if prev is not None and ( + _get_buffer_address(curr) - _get_buffer_address(prev) + != prev.base.dtype.itemsize * prev.size + ): + # This view is not contiguous with the previous view. + return False + else: + return True + + +def _get_buffer_address(arr: np.ndarray) -> int: + """Get the address of the buffer underlying the provided NumPy ndarray.""" + return arr.__array_interface__["data"][0] + + +def _pairwise(iterable): + # pairwise('ABCDEFG') --> AB BC CD DE EF FG + # Backport of itertools.pairwise for Python < 3.10. + a, b = itertools.tee(iterable) + next(b, None) + return zip(a, b) + + +def _to_ndarray_helper(shape, value_type, offset, data_buffer): + if pa.types.is_boolean(value_type): + # Arrow boolean array buffers are bit-packed, with 8 entries per byte, + # and are accessed via bit offsets. + buffer_item_width = value_type.bit_width + else: + # We assume all other array types are accessed via byte array + # offsets. + buffer_item_width = value_type.bit_width // 8 + data_offset = buffer_item_width * offset + + if pa.types.is_boolean(value_type): + # Special handling for boolean arrays, since Arrow + # bit-packs boolean arrays while NumPy does not. + # Cast as uint8 array and let NumPy unpack into a boolean view. + # Offset into uint8 array, where each element is + # a bucket for 8 booleans. + byte_bucket_offset = data_offset // 8 + # Offset for a specific boolean, within a uint8 array element. + bool_offset = data_offset % 8 + # The number of uint8 array elements (buckets) that our slice spans. + # Note that, due to the offset for a specific boolean, + # the slice can span byte boundaries even if it contains + # less than 8 booleans. + num_boolean_byte_buckets = 1 + ((bool_offset + np.prod(shape) - 1) // 8) + # Construct the uint8 array view on the buffer. + arr = np.ndarray( + (num_boolean_byte_buckets,), + dtype=np.uint8, + buffer=data_buffer, + offset=byte_bucket_offset, + ) + # Unpack into a byte per boolean, using LSB bit-packed ordering. + arr = np.unpackbits(arr, bitorder="little") + # Interpret buffer as boolean array. + return np.ndarray(shape, dtype=np.bool_, buffer=arr, offset=bool_offset) + ext_dtype = value_type.to_pandas_dtype() + # Special handling of ragged string tensors + if pa.types.is_fixed_size_binary(value_type): + ext_dtype = np.dtype(f" List[str]: + from pandas.core.construction import extract_array + from pandas.io.formats.format import format_array + + if not isinstance(self.values, TensorArray): + return self._format_strings_orig() + + values = extract_array(self.values, extract_numpy=True) + array = np.asarray(values) + + if array.ndim == 1: + return self._format_strings_orig() + + def format_array_wrap(array_, formatter_): + fmt_values = format_array( + array_, + formatter_, + float_format=self.float_format, + na_rep=self.na_rep, + digits=self.digits, + space=self.space, + justify=self.justify, + decimal=self.decimal, + leading_space=self.leading_space, + quoting=self.quoting, + ) + return fmt_values + + flat_formatter = self.formatter + if flat_formatter is None: + flat_formatter = values._formatter(boxed=True) + + # Flatten array, call function, reshape (use ravel_compat in v1.3.0) + flat_array = array.ravel("K") + fmt_flat_array = np.asarray(format_array_wrap(flat_array, flat_formatter)) + order = "F" if array.flags.f_contiguous else "C" + fmt_array = fmt_flat_array.reshape(array.shape, order=order) + + # Format the array of nested strings, use default formatter + return format_array_wrap(fmt_array, None) + + +def _format_strings_patched_v1_0_0(self) -> List[str]: + from functools import partial + + from pandas.core.construction import extract_array + from pandas.io.formats.format import format_array + from pandas.io.formats.printing import pprint_thing + + if not isinstance(self.values, TensorArray): + return self._format_strings_orig() + + values = extract_array(self.values, extract_numpy=True) + array = np.asarray(values) + + if array.ndim == 1: + return self._format_strings_orig() + + def format_array_wrap(array_, formatter_): + fmt_values = format_array( + array_, + formatter_, + float_format=self.float_format, + na_rep=self.na_rep, + digits=self.digits, + space=self.space, + justify=self.justify, + decimal=self.decimal, + leading_space=self.leading_space, + ) + return fmt_values + + flat_formatter = self.formatter + if flat_formatter is None: + flat_formatter = values._formatter(boxed=True) + + # Flatten array, call function, reshape (use ravel_compat in v1.3.0) + flat_array = array.ravel("K") + fmt_flat_array = np.asarray(format_array_wrap(flat_array, flat_formatter)) + order = "F" if array.flags.f_contiguous else "C" + fmt_array = fmt_flat_array.reshape(array.shape, order=order) + + # Slimmed down version of GenericArrayFormatter due to: + # https://github.com/pandas-dev/pandas/issues/33770 + def format_strings_slim(array_, leading_space): + formatter = partial( + pprint_thing, + escape_chars=("\t", "\r", "\n"), + ) + + def _format(x): + return str(formatter(x)) + + fmt_values = [] + for v in array_: + tpl = "{v}" if leading_space is False else " {v}" + fmt_values.append(tpl.format(v=_format(v))) + return fmt_values + + return format_strings_slim(fmt_array, self.leading_space) + + +_FORMATTER_ENABLED_ENV_VAR = "TENSOR_COLUMN_EXTENSION_FORMATTER_ENABLED" + +if os.getenv(_FORMATTER_ENABLED_ENV_VAR, "1") == "1": + if Version(pd.__version__) < Version("2.2.0"): + from pandas.io.formats.format import ExtensionArrayFormatter + + formatter_cls = ExtensionArrayFormatter + else: + from pandas.io.formats.format import _ExtensionArrayFormatter + + formatter_cls = _ExtensionArrayFormatter + formatter_cls._format_strings_orig = formatter_cls._format_strings + if Version("1.1.0") <= Version(pd.__version__) < Version("1.3.0"): + formatter_cls._format_strings = _format_strings_patched + else: + formatter_cls._format_strings = _format_strings_patched_v1_0_0 + formatter_cls._patched_by_ray_datasets = True + +########################################### +# End patching of ExtensionArrayFormatter # +########################################### + + +@PublicAPI(stability="beta") +@pd.api.extensions.register_extension_dtype +class TensorDtype(pd.api.extensions.ExtensionDtype): + """ + Pandas extension type for a column of homogeneous-typed tensors. + + This extension supports tensors in which the elements have different shapes. + However, each tensor element must be non-ragged, i.e. each tensor element must have + a well-defined, non-ragged shape. + + See: + https://github.com/pandas-dev/pandas/blob/master/pandas/core/dtypes/base.py + for up-to-date interface documentation and the subclassing contract. The + docstrings of the below properties and methods were copied from the base + ExtensionDtype. + + Examples: + >>> # Create a DataFrame with a list of ndarrays as a column. + >>> import pandas as pd + >>> import numpy as np + >>> import ray + >>> df = pd.DataFrame({ + ... "one": [1, 2, 3], + ... "two": list(np.arange(24).reshape((3, 2, 2, 2)))}) + >>> # Note the opaque np.object dtype for this column. + >>> df.dtypes # doctest: +SKIP + one int64 + two object + dtype: object + >>> # Cast column to our TensorDtype extension type. + >>> from ray.data.extensions import TensorDtype + >>> df["two"] = df["two"].astype(TensorDtype(np.int64, (3, 2, 2, 2))) + >>> # Note that the column dtype is now TensorDtype instead of + >>> # np.object. + >>> df.dtypes # doctest: +SKIP + one int64 + two TensorDtype(shape=(3, 2, 2, 2), dtype=int64) + dtype: object + >>> # Pandas is now aware of this tensor column, and we can do the + >>> # typical DataFrame operations on this column. + >>> col = 2 * (df["two"] + 10) + >>> # The ndarrays underlying the tensor column will be manipulated, + >>> # but the column itself will continue to be a Pandas type. + >>> type(col) # doctest: +SKIP + pandas.core.series.Series + >>> col # doctest: +SKIP + 0 [[[ 2 4] + [ 6 8]] + [[10 12] + [14 16]]] + 1 [[[18 20] + [22 24]] + [[26 28] + [30 32]]] + 2 [[[34 36] + [38 40]] + [[42 44] + [46 48]]] + Name: two, dtype: TensorDtype(shape=(3, 2, 2, 2), dtype=int64) + >>> # Once you do an aggregation on that column that returns a single + >>> # row's value, you get back our TensorArrayElement type. + >>> tensor = col.mean() + >>> type(tensor) # doctest: +SKIP + ray.data.extensions.tensor_extension.TensorArrayElement + >>> tensor # doctest: +SKIP + array([[[18., 20.], + [22., 24.]], + [[26., 28.], + [30., 32.]]]) + >>> # This is a light wrapper around a NumPy ndarray, and can easily + >>> # be converted to an ndarray. + >>> type(tensor.to_numpy()) # doctest: +SKIP + numpy.ndarray + >>> # In addition to doing Pandas operations on the tensor column, + >>> # you can now put the DataFrame into a Dataset. + >>> ds = ray.data.from_pandas(df) # doctest: +SKIP + >>> # Internally, this column is represented the corresponding + >>> # Arrow tensor extension type. + >>> ds.schema() # doctest: +SKIP + one: int64 + two: extension> + >>> # You can write the dataset to Parquet. + >>> ds.write_parquet("/some/path") # doctest: +SKIP + >>> # And you can read it back. + >>> read_ds = ray.data.read_parquet("/some/path") # doctest: +SKIP + >>> read_ds.schema() # doctest: +SKIP + one: int64 + two: extension> + >>> read_df = ray.get(read_ds.to_pandas_refs())[0] # doctest: +SKIP + >>> read_df.dtypes # doctest: +SKIP + one int64 + two TensorDtype(shape=(3, 2, 2, 2), dtype=int64) + dtype: object + >>> # The tensor extension type is preserved along the + >>> # Pandas --> Arrow --> Parquet --> Arrow --> Pandas + >>> # conversion chain. + >>> read_df.equals(df) # doctest: +SKIP + True + """ + + # NOTE(Clark): This is apparently required to prevent integer indexing + # errors, but is an undocumented ExtensionDtype attribute. See issue: + # https://github.com/CODAIT/text-extensions-for-pandas/issues/166 + base = None + + def __init__(self, shape: Tuple[Optional[int], ...], dtype: np.dtype): + self._shape = shape + self._dtype = dtype + + @property + def type(self): + """ + The scalar type for the array, e.g. ``int`` + It's expected ``ExtensionArray[item]`` returns an instance + of ``ExtensionDtype.type`` for scalar ``item``, assuming + that value is valid (not NA). NA values do not need to be + instances of `type`. + """ + return TensorArrayElement + + @property + def element_dtype(self): + """ + The dtype of the underlying tensor elements. + """ + return self._dtype + + @property + def element_shape(self): + """ + The shape of the underlying tensor elements. This will be a tuple of Nones if + the corresponding TensorArray for this TensorDtype holds variable-shaped tensor + elements. + """ + return self._shape + + @property + def is_variable_shaped(self): + """ + Whether the corresponding TensorArray for this TensorDtype holds variable-shaped + tensor elements. + """ + return all(dim_size is None for dim_size in self.shape) + + @property + def name(self) -> str: + """ + A string identifying the data type. + Will be used for display in, e.g. ``Series.dtype`` + """ + return f"numpy.ndarray(shape={self._shape}, dtype={self._dtype})" + + @classmethod + def construct_from_string(cls, string: str): + r""" + Construct this type from a string. + + This is useful mainly for data types that accept parameters. + For example, a period dtype accepts a frequency parameter that + can be set as ``period[H]`` (where H means hourly frequency). + + By default, in the abstract class, just the name of the type is + expected. But subclasses can overwrite this method to accept + parameters. + + Parameters + ---------- + string : str + The name of the type, for example ``category``. + + Returns + ------- + ExtensionDtype + Instance of the dtype. + + Raises + ------ + TypeError + If a class cannot be constructed from this 'string'. + + Examples + -------- + For extension dtypes with arguments the following may be an + adequate implementation. + + >>> import re + >>> @classmethod + ... def construct_from_string(cls, string): + ... pattern = re.compile(r"^my_type\[(?P.+)\]$") + ... match = pattern.match(string) + ... if match: + ... return cls(**match.groupdict()) + ... else: + ... raise TypeError( + ... f"Cannot construct a '{cls.__name__}' from '{string}'" + ... ) + """ + import ast + import re + + if not isinstance(string, str): + raise TypeError( + f"'construct_from_string' expects a string, got {type(string)}" + ) + # Upstream code uses exceptions as part of its normal control flow and + # will pass this method bogus class names. + regex = ( + r"^(TensorDtype|numpy.ndarray)" + r"\(shape=(\((?:(?:\d+|None),?\s?)*\)), dtype=(\w+)\)$" + ) + m = re.search(regex, string) + err_msg = ( + f"Cannot construct a '{cls.__name__}' from '{string}'; expected a string " + "like 'TensorDtype(shape=(1, 2, 3), dtype=int64)'." + ) + if m is None: + raise TypeError(err_msg) + groups = m.groups() + if len(groups) != 3: + raise TypeError(err_msg) + _, shape, dtype = groups + shape = ast.literal_eval(shape) + dtype = np.dtype(dtype) + return cls(shape, dtype) + + @classmethod + def construct_array_type(cls): + """ + Return the array type associated with this dtype. + + Returns + ------- + type + """ + return TensorArray + + def __from_arrow__(self, array: Union[pa.Array, pa.ChunkedArray]): + """ + Convert a pyarrow (chunked) array to a TensorArray. + + This and TensorArray.__arrow_array__ make up the + Pandas extension type + array <--> Arrow extension type + array + interoperability protocol. See + https://pandas.pydata.org/pandas-docs/stable/development/extending.html#compatibility-with-apache-arrow + for more information. + """ + if isinstance(array, pa.ChunkedArray): + if array.num_chunks > 1: + # TODO(Clark): Remove concat and construct from list with + # shape. + values = np.concatenate( + [chunk.to_numpy() for chunk in array.iterchunks()] + ) + else: + values = array.chunk(0).to_numpy() + else: + values = array.to_numpy() + + return TensorArray(values) + + def __str__(self) -> str: + return self.name + + def __repr__(self) -> str: + return str(self) + + @property + def _is_boolean(self): + """ + Whether this extension array should be considered boolean. + + By default, ExtensionArrays are assumed to be non-numeric. + Setting this to True will affect the behavior of several places, + e.g. + + * is_bool + * boolean indexing + + Returns + ------- + bool + """ + # This is needed to support returning a TensorArray from .isnan(). + from pandas.core.dtypes.common import is_bool_dtype + + return is_bool_dtype(self._dtype) + + +class _TensorOpsMixin(pd.api.extensions.ExtensionScalarOpsMixin): + """ + Mixin for TensorArray operator support, applying operations on the + underlying ndarrays. + """ + + @classmethod + def _create_method(cls, op, coerce_to_dtype=True, result_dtype=None): + """ + Add support for binary operators by unwrapping, applying, and + rewrapping. + """ + + # NOTE(Clark): This overrides, but coerce_to_dtype, result_dtype might + # not be needed + + def _binop(self, other): + lvalues = self._tensor + + if isinstance(other, (ABCDataFrame, ABCSeries, ABCIndex)): + # Rely on Pandas to unbox and dispatch to us. + return NotImplemented + + # divmod returns a tuple + if op_name in ["__divmod__", "__rdivmod__"]: + # TODO(Clark): Add support for divmod and rdivmod. + # div, mod = result + raise NotImplementedError + + if isinstance(other, (TensorArray, TensorArrayElement)): + rvalues = other._tensor + else: + rvalues = other + + result = op(lvalues, rvalues) + + # Force a TensorArray if rvalue is not a scalar. + if isinstance(self, TensorArrayElement) and ( + not isinstance(other, TensorArrayElement) or not np.isscalar(other) + ): + result_wrapped = TensorArray(result) + else: + result_wrapped = cls(result) + + return result_wrapped + + op_name = f"__{op.__name__}__" + return set_function_name(_binop, op_name, cls) + + @classmethod + def _create_logical_method(cls, op): + return cls._create_method(op) + + +class _TensorScalarCastMixin: + """ + Mixin for casting scalar tensors to a particular numeric type. + """ + + def _scalarfunc(self, func: Callable[[Any], Any]): + return func(self._tensor) + + def __complex__(self): + return self._scalarfunc(complex) + + def __float__(self): + return self._scalarfunc(float) + + def __int__(self): + return self._scalarfunc(int) + + def __hex__(self): + return self._scalarfunc(hex) + + def __oct__(self): + return self._scalarfunc(oct) + + +@PublicAPI(stability="beta") +class TensorArrayElement(_TensorOpsMixin, _TensorScalarCastMixin): + """ + Single element of a TensorArray, wrapping an underlying ndarray. + """ + + def __init__(self, values: np.ndarray): + """ + Construct a TensorArrayElement from a NumPy ndarray. + + Args: + values: ndarray that underlies this TensorArray element. + """ + self._tensor = values + + def __repr__(self): + return self._tensor.__repr__() + + def __str__(self): + return self._tensor.__str__() + + @property + def numpy_dtype(self): + """ + Get the dtype of the tensor. + :return: The numpy dtype of the backing ndarray + """ + return self._tensor.dtype + + @property + def numpy_ndim(self): + """ + Get the number of tensor dimensions. + :return: integer for the number of dimensions + """ + return self._tensor.ndim + + @property + def numpy_shape(self): + """ + Get the shape of the tensor. + :return: A tuple of integers for the numpy shape of the backing ndarray + """ + return self._tensor.shape + + @property + def numpy_size(self): + """ + Get the size of the tensor. + :return: integer for the number of elements in the tensor + """ + return self._tensor.size + + def to_numpy(self): + """ + Return the values of this element as a NumPy ndarray. + """ + return np.asarray(self._tensor) + + def __array__(self, dtype: np.dtype = None, **kwargs) -> np.ndarray: + return np.asarray(self._tensor, dtype=dtype, **kwargs) + + +@PublicAPI(stability="beta") +class TensorArray( + pd.api.extensions.ExtensionArray, + _TensorOpsMixin, + _TensorScalarCastMixin, +): + """ + Pandas `ExtensionArray` representing a tensor column, i.e. a column + consisting of ndarrays as elements. + + This extension supports tensors in which the elements have different shapes. + However, each tensor element must be non-ragged, i.e. each tensor element must have + a well-defined, non-ragged shape. + + Examples: + >>> # Create a DataFrame with a list of ndarrays as a column. + >>> import pandas as pd + >>> import numpy as np + >>> import ray + >>> from ray.data.extensions import TensorArray + >>> df = pd.DataFrame({ + ... "one": [1, 2, 3], + ... "two": TensorArray(np.arange(24).reshape((3, 2, 2, 2)))}) + >>> # Note that the column dtype is TensorDtype. + >>> df.dtypes # doctest: +SKIP + one int64 + two TensorDtype(shape=(3, 2, 2, 2), dtype=int64) + dtype: object + >>> # Pandas is aware of this tensor column, and we can do the + >>> # typical DataFrame operations on this column. + >>> col = 2 * (df["two"] + 10) + >>> # The ndarrays underlying the tensor column will be manipulated, + >>> # but the column itself will continue to be a Pandas type. + >>> type(col) # doctest: +SKIP + pandas.core.series.Series + >>> col # doctest: +SKIP + 0 [[[ 2 4] + [ 6 8]] + [[10 12] + [14 16]]] + 1 [[[18 20] + [22 24]] + [[26 28] + [30 32]]] + 2 [[[34 36] + [38 40]] + [[42 44] + [46 48]]] + Name: two, dtype: TensorDtype(shape=(3, 2, 2, 2), dtype=int64) + >>> # Once you do an aggregation on that column that returns a single + >>> # row's value, you get back our TensorArrayElement type. + >>> tensor = col.mean() # doctest: +SKIP + >>> type(tensor) # doctest: +SKIP + ray.data.extensions.tensor_extension.TensorArrayElement + >>> tensor # doctest: +SKIP + array([[[18., 20.], + [22., 24.]], + [[26., 28.], + [30., 32.]]]) + >>> # This is a light wrapper around a NumPy ndarray, and can easily + >>> # be converted to an ndarray. + >>> type(tensor.to_numpy()) # doctest: +SKIP + numpy.ndarray + >>> # In addition to doing Pandas operations on the tensor column, + >>> # you can now put the DataFrame into a Dataset. + >>> ds = ray.data.from_pandas(df) # doctest: +SKIP + >>> # Internally, this column is represented the corresponding + >>> # Arrow tensor extension type. + >>> ds.schema() # doctest: +SKIP + one: int64 + two: extension> + >>> # You can write the dataset to Parquet. + >>> ds.write_parquet("/some/path") # doctest: +SKIP + >>> # And you can read it back. + >>> read_ds = ray.data.read_parquet("/some/path") # doctest: +SKIP + >>> read_ds.schema() # doctest: +SKIP + one: int64 + two: extension> + + >>> read_df = ray.get(read_ds.to_pandas_refs())[0] # doctest: +SKIP + >>> read_df.dtypes # doctest: +SKIP + one int64 + two TensorDtype(shape=(3, 2, 2, 2), dtype=int64) + dtype: object + >>> # The tensor extension type is preserved along the + >>> # Pandas --> Arrow --> Parquet --> Arrow --> Pandas + >>> # conversion chain. + >>> read_df.equals(df) # doctest: +SKIP + True + """ + + SUPPORTED_REDUCERS = { + "sum": np.sum, + "all": np.all, + "any": np.any, + "min": np.min, + "max": np.max, + "mean": np.mean, + "median": np.median, + "prod": np.prod, + "std": np.std, + "var": np.var, + } + + # See https://github.com/pandas-dev/pandas/blob/master/pandas/core/arrays/base.py + # for interface documentation and the subclassing contract. + def __init__( + self, + values: Union[ + np.ndarray, + ABCSeries, + Sequence[Union[np.ndarray, TensorArrayElement]], + TensorArrayElement, + Any, + ], + ): + """ + Args: + values: A NumPy ndarray or sequence of NumPy ndarrays of equal + shape. + """ + # Try to convert some well-known objects to ndarrays before handing off to + # ndarray handling logic. + if isinstance(values, ABCSeries): + values = _create_possibly_ragged_ndarray(values) + elif isinstance(values, Sequence): + values = [ + np.asarray(v) if isinstance(v, TensorArrayElement) else v + for v in values + ] + values = _create_possibly_ragged_ndarray(values) + elif isinstance(values, TensorArrayElement): + values = np.array([np.asarray(values)], copy=False) + + if isinstance(values, np.ndarray): + if values.dtype.type is np.object_: + if len(values) == 0: + # Tensor is empty, pass through to create empty TensorArray. + pass + elif all( + isinstance(v, (np.ndarray, TensorArrayElement, Sequence)) + and not isinstance(v, str) + for v in values + ): + values = [np.asarray(v) for v in values] + # Try to convert ndarrays of ndarrays/TensorArrayElements with an + # opaque object type to a properly typed ndarray of ndarrays. + values = _create_possibly_ragged_ndarray(values) + else: + raise TypeError( + "Expected a well-typed ndarray or an object-typed ndarray of " + "ndarray pointers, but got an object-typed ndarray whose " + f"subndarrays are of type {type(values[0])}." + ) + elif isinstance(values, TensorArray): + raise TypeError("Use the copy() method to create a copy of a TensorArray.") + else: + raise TypeError( + "Expected a numpy.ndarray or sequence of numpy.ndarray, " + f"but received {values} of type {type(values).__name__} instead." + ) + assert isinstance(values, np.ndarray) + self._tensor = values + self._is_variable_shaped = None + + @classmethod + def _from_sequence( + cls, scalars, *, dtype: Optional[Dtype] = None, copy: bool = False + ): + """ + Construct a new ExtensionArray from a sequence of scalars. + + Parameters + ---------- + scalars : Sequence + Each element will be an instance of the scalar type for this + array, ``cls.dtype.type`` or be converted into this type in this + method. + dtype : dtype, optional + Construct for this particular dtype. This should be a Dtype + compatible with the ExtensionArray. + copy : bool, default False + If True, copy the underlying data. + + Returns + ------- + ExtensionArray + """ + if copy and isinstance(scalars, np.ndarray): + scalars = scalars.copy() + elif isinstance(scalars, TensorArray): + scalars = scalars._tensor.copy() if copy else scalars._tensor + return TensorArray(scalars) + + @classmethod + def _from_factorized( + cls, values: np.ndarray, original: pd.api.extensions.ExtensionArray + ): + """ + Reconstruct an ExtensionArray after factorization. + + Parameters + ---------- + values : ndarray + An integer ndarray with the factorized values. + original : ExtensionArray + The original ExtensionArray that factorize was called on. + + See Also + -------- + factorize : Top-level factorize method that dispatches here. + ExtensionArray.factorize : Encode the extension array as an enumerated + type. + """ + raise NotImplementedError + + def __getitem__( + self, item: Union[int, slice, np.ndarray] + ) -> Union["TensorArray", "TensorArrayElement"]: + """ + Select a subset of self. + + Parameters + ---------- + item : int, slice, or ndarray + * int: The position in 'self' to get. + * slice: A slice object, where 'start', 'stop', and 'step' are + integers or None + * ndarray: A 1-d boolean NumPy ndarray the same length as 'self' + + Returns + ------- + item : scalar or ExtensionArray + + Notes + ----- + For scalar ``item``, return a scalar value suitable for the array's + type. This should be an instance of ``self.dtype.type``. + For slice ``key``, return an instance of ``ExtensionArray``, even + if the slice is length 0 or 1. + For a boolean mask, return an instance of ``ExtensionArray``, filtered + to the values where ``item`` is True. + """ + # Return scalar if single value is selected, a TensorArrayElement for + # single array element, or TensorArray for slice. + if isinstance(item, int): + value = self._tensor[item] + if np.isscalar(value): + return value + else: + return TensorArrayElement(value) + else: + # BEGIN workaround for Pandas issue #42430 + if isinstance(item, tuple) and len(item) > 1 and item[0] == Ellipsis: + if len(item) > 2: + # Hopefully this case is not possible, but can't be sure + raise ValueError( + "Workaround Pandas issue #42430 not " + "implemented for tuple length > 2" + ) + item = item[1] + # END workaround for issue #42430 + if isinstance(item, TensorArray): + item = np.asarray(item) + item = check_array_indexer(self, item) + return TensorArray(self._tensor[item]) + + def __len__(self) -> int: + """ + Length of this array. + + Returns + ------- + length : int + """ + return len(self._tensor) + + @property + def dtype(self) -> pd.api.extensions.ExtensionDtype: + """ + An instance of 'ExtensionDtype'. + """ + if self.is_variable_shaped: + # A tensor is only considered variable-shaped if it's non-empty, so no + # non-empty check is needed here. + dtype = self._tensor[0].dtype + shape = (None,) * self._tensor[0].ndim + else: + dtype = self.numpy_dtype + shape = self.numpy_shape[1:] + return TensorDtype(shape, dtype) + + @property + def is_variable_shaped(self): + """ + Whether this TensorArray holds variable-shaped tensor elements. + """ + if self._is_variable_shaped is None: + self._is_variable_shaped = _is_ndarray_variable_shaped_tensor(self._tensor) + return self._is_variable_shaped + + @property + def nbytes(self) -> int: + """ + The number of bytes needed to store this object in memory. + """ + return self._tensor.nbytes + + def isna(self) -> "TensorArray": + """ + A 1-D array indicating if each value is missing. + + Returns + ------- + na_values : Union[np.ndarray, ExtensionArray] + In most cases, this should return a NumPy ndarray. For + exceptional cases like ``SparseArray``, where returning + an ndarray would be expensive, an ExtensionArray may be + returned. + + Notes + ----- + If returning an ExtensionArray, then + + * ``na_values._is_boolean`` should be True + * `na_values` should implement :func:`ExtensionArray._reduce` + * ``na_values.any`` and ``na_values.all`` should be implemented + """ + if self._tensor.dtype.type is np.object_: + # Avoid comparing with __eq__ because the elements of the tensor + # may do something funny with that operation. + return np.array( + [self._tensor[i] is None for i in range(len(self))], dtype=bool + ) + elif self._tensor.dtype.type is np.str_: + return np.all(self._tensor == "", axis=tuple(range(1, self._tensor.ndim))) + else: + return np.all( + np.isnan(self._tensor), axis=tuple(range(1, self._tensor.ndim)) + ) + + def take( + self, indices: Sequence[int], allow_fill: bool = False, fill_value: Any = None + ) -> "TensorArray": + """ + Take elements from an array. + + Parameters + ---------- + indices : sequence of int + Indices to be taken. + allow_fill : bool, default False + How to handle negative values in `indices`. + + * False: negative values in `indices` indicate positional indices + from the right (the default). This is similar to + :func:`numpy.take`. + + * True: negative values in `indices` indicate + missing values. These values are set to `fill_value`. Any other + other negative values raise a ``ValueError``. + + fill_value : any, optional + Fill value to use for NA-indices when `allow_fill` is True. + This may be ``None``, in which case the default NA value for + the type, ``self.dtype.na_value``, is used. + + For many ExtensionArrays, there will be two representations of + `fill_value`: a user-facing "boxed" scalar, and a low-level + physical NA value. `fill_value` should be the user-facing version, + and the implementation should handle translating that to the + physical version for processing the take if necessary. + + Returns + ------- + ExtensionArray + + Raises + ------ + IndexError + When the indices are out of bounds for the array. + ValueError + When `indices` contains negative values other than ``-1`` + and `allow_fill` is True. + + See Also + -------- + numpy.take : Take elements from an array along an axis. + api.extensions.take : Take elements from an array. + + Notes + ----- + ExtensionArray.take is called by ``Series.__getitem__``, ``.loc``, + ``iloc``, when `indices` is a sequence of values. Additionally, + it's called by :meth:`Series.reindex`, or any other method + that causes realignment, with a `fill_value`. + + Examples + -------- + Here's an example implementation, which relies on casting the + extension array to object dtype. This uses the helper method + :func:`pandas.api.extensions.take`. + + .. code-block:: python + + def take(self, indices, allow_fill=False, fill_value=None): + from pandas.core.algorithms import take + + # If the ExtensionArray is backed by an ndarray, then + # just pass that here instead of coercing to object. + data = self.astype(object) + + if allow_fill and fill_value is None: + fill_value = self.dtype.na_value + + # fill value should always be translated from the scalar + # type for the array, to the physical storage type for + # the data, before passing to take. + + result = take(data, indices, fill_value=fill_value, + allow_fill=allow_fill) + return self._from_sequence(result, dtype=self.dtype) + """ + if allow_fill: + # With allow_fill being True, negative values in `indices` indicate + # missing values and should be set to `fill_value`. + indices = np.asarray(indices, dtype=np.intp) + validate_indices(indices, len(self._tensor)) + + # Check if there are missing indices to fill, otherwise we can + # delegate to NumPy ndarray .take(). + has_missing = np.any(indices < 0) + if has_missing: + if fill_value is None: + fill_value = np.nan + + # Create an array populated with fill value. + values = np.full((len(indices),) + self._tensor.shape[1:], fill_value) + + # Put tensors at the given positive indices into array. + is_nonneg = indices >= 0 + np.put(values, np.where(is_nonneg)[0], self._tensor[indices[is_nonneg]]) + + return TensorArray(values) + + # Delegate take to NumPy array. + values = self._tensor.take(indices, axis=0) + + return TensorArray(values) + + def copy(self) -> "TensorArray": + """ + Return a copy of the array. + + Returns + ------- + ExtensionArray + """ + # TODO(Clark): Copy cached properties. + return TensorArray(self._tensor.copy()) + + @classmethod + def _concat_same_type(cls, to_concat: Sequence["TensorArray"]) -> "TensorArray": + """ + Concatenate multiple array of this dtype. + + Parameters + ---------- + to_concat : sequence of this type + + Returns + ------- + ExtensionArray + """ + should_flatten = False + shape = None + for a in to_concat: + if shape is None: + shape = a.dtype.element_shape + if a.is_variable_shaped or a.dtype.element_shape != shape: + should_flatten = True + break + if should_flatten: + concated = TensorArray( + np.array([e for a in to_concat for e in a._tensor], dtype=object) + ) + else: + concated = TensorArray(np.concatenate([a._tensor for a in to_concat])) + return concated + + def __setitem__(self, key: Union[int, np.ndarray], value: Any) -> None: + """ + Set one or more values inplace. + + This method is not required to satisfy the pandas extension array + interface. + + Parameters + ---------- + key : int, ndarray, or slice + When called from, e.g. ``Series.__setitem__``, ``key`` will be + one of + + * scalar int + * ndarray of integers. + * boolean ndarray + * slice object + + value : ExtensionDtype.type, Sequence[ExtensionDtype.type], or object + value or values to be set of ``key``. + + Returns + ------- + None + """ + key = check_array_indexer(self, key) + if isinstance(value, TensorArrayElement) or np.isscalar(value): + value = np.asarray(value) + if isinstance(value, list): + value = [ + np.asarray(v) if isinstance(v, TensorArrayElement) else v for v in value + ] + if isinstance(value, ABCSeries) and isinstance(value.dtype, TensorDtype): + value = value.values + if value is None or isinstance(value, Sequence) and len(value) == 0: + self._tensor[key] = np.full_like(self._tensor[key], np.nan) + elif isinstance(key, (int, slice, np.ndarray)): + self._tensor[key] = value + else: + raise NotImplementedError( + f"__setitem__ with key type '{type(key)}' not implemented" + ) + + def __contains__(self, item) -> bool: + """ + Return for `item in self`. + """ + if isinstance(item, TensorArrayElement): + np_item = np.asarray(item) + if np_item.size == 1 and np.isnan(np_item).all(): + return self.isna().any() + return super().__contains__(item) + + def __repr__(self): + return self._tensor.__repr__() + + def __str__(self): + return self._tensor.__str__() + + def _values_for_factorize(self) -> Tuple[np.ndarray, Any]: + # TODO(Clark): return self._tensor, np.nan + raise NotImplementedError + + def _reduce(self, name: str, skipna: bool = True, **kwargs): + """ + Return a scalar result of performing the reduction operation. + + Parameters + ---------- + name : str + Name of the function, supported values are: + { any, all, min, max, sum, mean, median, prod, + std, var, sem, kurt, skew }. + skipna : bool, default True + If True, skip NaN values. + **kwargs + Additional keyword arguments passed to the reduction function. + Currently, `ddof` is the only supported kwarg. + + Returns + ------- + scalar + + Raises + ------ + TypeError : subclass does not define reductions + """ + supported_kwargs = ["ddof"] + reducer_kwargs = {} + for kw in supported_kwargs: + try: + reducer_kwargs[kw] = kwargs[kw] + except KeyError: + pass + try: + return TensorArrayElement( + self.SUPPORTED_REDUCERS[name](self._tensor, axis=0, **reducer_kwargs) + ) + except KeyError: + raise NotImplementedError(f"'{name}' aggregate not implemented.") from None + + def __array__(self, dtype: np.dtype = None, **kwargs) -> np.ndarray: + return np.asarray(self._tensor, dtype=dtype, **kwargs) + + def __array_ufunc__(self, ufunc: Callable, method: str, *inputs, **kwargs): + """ + Supports NumPy ufuncs without requiring sloppy coercion to an + ndarray. + """ + out = kwargs.get("out", ()) + for x in inputs + out: + if not isinstance(x, (TensorArray, np.ndarray, numbers.Number)): + return NotImplemented + + # Defer to the implementation of the ufunc on unwrapped values. + inputs = tuple(x._tensor if isinstance(x, TensorArray) else x for x in inputs) + if out: + kwargs["out"] = tuple( + x._tensor if isinstance(x, TensorArray) else x for x in out + ) + result = getattr(ufunc, method)(*inputs, **kwargs) + + if type(result) is tuple: + # Multiple return values. + return tuple(type(self)(x) for x in result) + elif method == "at": + # No return value. + return None + else: + # One return value. + return type(self)(result) + + def to_numpy( + self, + dtype: np.dtype = None, + copy: bool = False, + na_value: Any = pd.api.extensions.no_default, + ): + """ + Convert to a NumPy ndarray. + + .. versionadded:: 1.0.0 + + This is similar to :meth:`numpy.asarray`, but may provide additional + control over how the conversion is done. + + Parameters + ---------- + dtype : str or numpy.dtype, optional + The dtype to pass to :meth:`numpy.asarray`. + copy : bool, default False + Whether to ensure that the returned value is a not a view on + another array. Note that ``copy=False`` does not *ensure* that + ``to_numpy()`` is no-copy. Rather, ``copy=True`` ensure that + a copy is made, even if not strictly necessary. + na_value : Any, optional + The value to use for missing values. The default value depends + on `dtype` and the type of the array. + + Returns + ------- + numpy.ndarray + """ + if dtype is not None: + dtype = pd.api.types.pandas_dtype(dtype) + if copy: + values = np.array(self._tensor, dtype=dtype, copy=True) + else: + values = self._tensor.astype(dtype) + elif copy: + values = self._tensor.copy() + else: + values = self._tensor + return values + + @property + def numpy_dtype(self): + """ + Get the dtype of the tensor. + :return: The numpy dtype of the backing ndarray + """ + return self._tensor.dtype + + @property + def numpy_ndim(self): + """ + Get the number of tensor dimensions. + :return: integer for the number of dimensions + """ + return self._tensor.ndim + + @property + def numpy_shape(self): + """ + Get the shape of the tensor. + :return: A tuple of integers for the numpy shape of the backing ndarray + """ + return self._tensor.shape + + @property + def numpy_size(self): + """ + Get the size of the tensor. + :return: integer for the number of elements in the tensor + """ + return self._tensor.size + + def astype(self, dtype, copy=True): + """ + Cast to a NumPy array with 'dtype'. + + Parameters + ---------- + dtype : str or dtype + Typecode or data-type to which the array is cast. + copy : bool, default True + Whether to copy the data, even if not necessary. If False, + a copy is made only if the old dtype does not match the + new dtype. + + Returns + ------- + array : ndarray + NumPy ndarray with 'dtype' for its dtype. + """ + dtype = pd.api.types.pandas_dtype(dtype) + + if isinstance(dtype, TensorDtype): + values = TensorArray(self._tensor.copy()) if copy else self + elif not ( + pd.api.types.is_object_dtype(dtype) and pd.api.types.is_string_dtype(dtype) + ): + values = np.array([str(t) for t in self._tensor]) + if isinstance(dtype, pd.StringDtype): + return dtype.construct_array_type()._from_sequence(values, copy=False) + else: + return values + elif pd.api.types.is_object_dtype(dtype): + # Interpret astype(object) as "cast to an array of numpy arrays" + values = np.empty(len(self), dtype=object) + for i in range(len(self)): + values[i] = self._tensor[i] + else: + values = self._tensor.astype(dtype, copy=copy) + return values + + def any(self, axis=None, out=None, keepdims=False): + """ + Test whether any array element along a given axis evaluates to True. + + See numpy.any() documentation for more information + https://numpy.org/doc/stable/reference/generated/numpy.any.html#numpy.any + + :param axis: Axis or axes along which a logical OR reduction is + performed. + :param out: Alternate output array in which to place the result. + :param keepdims: If this is set to True, the axes which are reduced are + left in the result as dimensions with size one. + :return: single boolean unless axis is not None else TensorArray + """ + result = self._tensor.any(axis=axis, out=out, keepdims=keepdims) + return result if axis is None else TensorArray(result) + + def all(self, axis=None, out=None, keepdims=False): + """ + Test whether all array elements along a given axis evaluate to True. + + :param axis: Axis or axes along which a logical AND reduction is + performed. + :param out: Alternate output array in which to place the result. + :param keepdims: If this is set to True, the axes which are reduced are + left in the result as dimensions with size one. + :return: single boolean unless axis is not None else TensorArray + """ + result = self._tensor.all(axis=axis, out=out, keepdims=keepdims) + return result if axis is None else TensorArray(result) + + def __arrow_array__(self, type=None): + """ + Convert this TensorArray to an ArrowTensorArray extension array. + + This and TensorDtype.__from_arrow__ make up the + Pandas extension type + array <--> Arrow extension type + array + interoperability protocol. See + https://pandas.pydata.org/pandas-docs/stable/development/extending.html#compatibility-with-apache-arrow + for more information. + """ + from ray.air.util.tensor_extensions.arrow import ( + ArrowTensorArray, + ArrowVariableShapedTensorArray, + ) + + if self.is_variable_shaped: + return ArrowVariableShapedTensorArray.from_numpy(self._tensor) + else: + return ArrowTensorArray.from_numpy(self._tensor) + + @property + def _is_boolean(self): + """ + Whether this extension array should be considered boolean. + + By default, ExtensionArrays are assumed to be non-numeric. + Setting this to True will affect the behavior of several places, + e.g. + + * is_bool + * boolean indexing + + Returns + ------- + bool + """ + # This is needed to support returning a TensorArray from .isnan(). + return self.dtype._is_boolean() + + +# Add operators from the mixin to the TensorArrayElement and TensorArray +# classes. +TensorArrayElement._add_arithmetic_ops() +TensorArrayElement._add_comparison_ops() +TensorArrayElement._add_logical_ops() +TensorArray._add_arithmetic_ops() +TensorArray._add_comparison_ops() +TensorArray._add_logical_ops() + + +@PublicAPI(stability="beta") +def column_needs_tensor_extension(s: pd.Series) -> bool: + """Return whether the provided pandas Series column needs a tensor extension + representation. This tensor extension representation provides more efficient slicing + and interop with ML frameworks. + + Args: + s: The pandas Series column that may need to be represented using the tensor + extension. + + Returns: + Whether the provided Series needs a tensor extension representation. + """ + # NOTE: This is an O(1) check. + return ( + s.dtype.type is np.object_ and not s.empty and isinstance(s.iloc[0], np.ndarray) + ) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/utils.py b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..8468f721751e751e44a9a12919a839b350dc6e80 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/air/util/tensor_extensions/utils.py @@ -0,0 +1,206 @@ +import warnings +from typing import TYPE_CHECKING, Any, Sequence, Union, List, Protocol + +import numpy as np + +from ray.air.constants import TENSOR_COLUMN_NAME +from ray.util import PublicAPI +from ray.util.annotations import DeveloperAPI + +if TYPE_CHECKING: + from pandas.core.dtypes.generic import ABCSeries + + +@DeveloperAPI(stability="beta") +class ArrayLike(Protocol): + """Protocol matching ndarray-like objects (like torch.Tensor)""" + + def __array__(self): + ... + + def __len__(self): + ... + + +@DeveloperAPI(stability="beta") +def is_ndarray_like(value: ArrayLike) -> bool: + """Checks whether objects are ndarray-like (for ex, torch.Tensor) + but NOT and ndarray itself""" + return ( + hasattr(value, "__array__") + and hasattr(value, "__len__") + and not isinstance(value, np.ndarray) + ) + + +def _is_arrow_array(value: ArrayLike) -> bool: + import pyarrow as pa + + return isinstance(value, (pa.Array, pa.ChunkedArray)) + + +def _should_convert_to_tensor( + column_values: Union[List[Any], np.ndarray, ArrayLike], column_name: str +) -> bool: + assert len(column_values) > 0 + + # We convert passed in column values into a tensor representation (involving + # Arrow/Pandas extension types) in either of the following cases: + return ( + # - Column name is `TENSOR_COLUMN_NAME` (for compatibility) + column_name == TENSOR_COLUMN_NAME + # - Provided column values are already represented by a Numpy tensor (ie + # ndarray with ndim > 1) + or _is_ndarray_tensor(column_values) + # - Provided collection is already implementing Ndarray protocol like + # `torch.Tensor`, `pd.Series`, etc (but *excluding* `pyarrow.Array`, + # `pyarrow.ChunkedArray`) + or _is_ndarray_like_not_pyarrow_array(column_values) + # - Provided column values is a list of a) ndarrays or b) ndarray-like objects + # (excluding Pyarrow arrays). This is done for compatibility with previous + # existing behavior where all column values were blindly converted to Numpy + # leading to list of ndarrays being converted a tensor): + or isinstance(column_values[0], np.ndarray) + or _is_ndarray_like_not_pyarrow_array(column_values[0]) + ) + + +def _is_ndarray_like_not_pyarrow_array(column_values): + return is_ndarray_like(column_values) and not _is_arrow_array(column_values) + + +def _is_ndarray_tensor(t: Any) -> bool: + """Return whether provided ndarray is a tensor (ie ndim > 1). + + NOTE: Tensor is defined as a NumPy array such that `len(arr.shape) > 1` + """ + + if not isinstance(t, np.ndarray): + return False + + # Case of uniform-shaped (ie non-ragged) tensor + if t.ndim > 1: + return True + + # Case of ragged tensor (as produced by `create_ragged_ndarray` utility) + elif t.dtype.type is np.object_ and len(t) > 0 and isinstance(t[0], np.ndarray): + return True + + return False + + +def _is_ndarray_variable_shaped_tensor(arr: np.ndarray) -> bool: + """Return whether the provided NumPy ndarray is comprised of variable-shaped + tensors. + + NOTE: This is an O(rows) check. + """ + if arr.dtype.type is not np.object_: + return False + if len(arr) == 0: + return False + if not isinstance(arr[0], np.ndarray): + return False + shape = arr[0].shape + for a in arr[1:]: + if not isinstance(a, np.ndarray): + return False + if a.shape != shape: + return True + return True + + +def _create_possibly_ragged_ndarray( + values: Union[np.ndarray, "ABCSeries", Sequence[Any]] +) -> np.ndarray: + """ + Create a possibly ragged ndarray. + Using the np.array() constructor will fail to construct a ragged ndarray that has a + uniform first dimension (e.g. uniform channel dimension in imagery). This function + catches this failure and tries a create-and-fill method to construct the ragged + ndarray. + """ + try: + with warnings.catch_warnings(): + # For NumPy < 1.24, constructing a ragged ndarray directly via + # `np.array(...)` without the `dtype=object` parameter will raise a + # VisibleDeprecationWarning which we suppress. + # More details: https://stackoverflow.com/q/63097829 + if np.lib.NumpyVersion(np.__version__) >= "2.0.0": + copy_if_needed = None + warning_type = np.exceptions.VisibleDeprecationWarning + else: + copy_if_needed = False + warning_type = np.VisibleDeprecationWarning + + warnings.simplefilter("ignore", category=warning_type) + arr = np.array(values, copy=copy_if_needed) + return arr + except ValueError as e: + # Constructing a ragged ndarray directly via `np.array(...)` + # without the `dtype=object` parameter will raise a ValueError. + # For NumPy < 1.24, the message is of the form: + # "could not broadcast input array from shape..." + # For NumPy >= 1.24, the message is of the form: + # "The requested array has an inhomogeneous shape..." + # More details: https://github.com/numpy/numpy/pull/22004 + error_str = str(e) + if ( + "could not broadcast input array from shape" in error_str + or "The requested array has an inhomogeneous shape" in error_str + ): + # Fall back to strictly creating a ragged ndarray. + return create_ragged_ndarray(values) + else: + # Re-raise original error if the failure wasn't a broadcast error. + raise e from None + + +@PublicAPI(stability="alpha") +def create_ragged_ndarray(values: Sequence[Any]) -> np.ndarray: + """Create an array that contains arrays of different length + + If you're working with variable-length arrays like images, use this function to + create ragged arrays instead of ``np.array``. + + .. note:: + ``np.array`` fails to construct ragged arrays if the input arrays have a uniform + first dimension: + + .. testsetup:: + + import numpy as np + from ray.air.util.tensor_extensions.utils import create_ragged_ndarray + + .. doctest:: + + >>> values = [np.zeros((3, 1)), np.zeros((3, 2))] + >>> np.array(values, dtype=object) + Traceback (most recent call last): + ... + ValueError: could not broadcast input array from shape (3,1) into shape (3,) + >>> create_ragged_ndarray(values) + array([array([[0.], + [0.], + [0.]]), array([[0., 0.], + [0., 0.], + [0., 0.]])], dtype=object) + + Or if you're creating a ragged array from a single array: + + .. doctest:: + + >>> values = [np.zeros((3, 1))] + >>> np.array(values, dtype=object)[0].dtype + dtype('O') + >>> create_ragged_ndarray(values)[0].dtype + dtype('float64') + + ``create_ragged_ndarray`` avoids the limitations of ``np.array`` by creating an + empty array and filling it with pointers to the variable-length arrays. + """ # noqa: E501 + # Create an empty object-dtyped 1D array. + arr = np.empty(len(values), dtype=object) + # Try to fill the 1D array of pointers with the (ragged) tensors. + arr[:] = list(values) + return arr diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a07c3e74e1a41be819b7bb9c7fa32d0d530205ae Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/batching_node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/batching_node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..63d60a0feb2cebdb88d11f74e7cdefd32d74b64c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/batching_node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/command_runner.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/command_runner.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d652091c6332b090c1b1b249548131f034de5103 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/command_runner.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/launch_and_verify_cluster.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/launch_and_verify_cluster.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2bba6e18fadde3db0ccbb3fd854ff36216e061e9 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/launch_and_verify_cluster.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/node_launch_exception.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/node_launch_exception.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..194b6104d681c378cd438bad3dcfe31bca51e7a5 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/node_launch_exception.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fcaf166786ddaf96c7260a70904e89171852b118 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/tags.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/tags.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1b1887f60e8821827ef33bdfd12304c977df3a0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/__pycache__/tags.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6a3ed9b7e8050b83cccfbe65f7587dafb642e516 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/autoscaler.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/autoscaler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bcb451751fc5075586e0d077dc68c7eda53cc0f8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/autoscaler.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/cli_logger.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/cli_logger.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c2e636fea830304151f4203c075a08ef1365e574 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/cli_logger.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/cli_logger_demoall.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/cli_logger_demoall.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..059e7401799bddbb8ada5348ec3656b53eb80ecd Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/cli_logger_demoall.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/cluster_dump.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/cluster_dump.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9947492d9003d27a82793f1fb7e3fb518b05d2e7 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/cluster_dump.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/command_runner.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/command_runner.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4cb7ae2b5a82cc86d281ddf3b234fd62463de4ce Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/command_runner.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/commands.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/commands.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ff52695ce2a293827ad27f7e8174dc812f505044 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/commands.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/constants.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/constants.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..18bcecdc450da54d15011035720ab223177ad6f6 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/constants.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/docker.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/docker.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f21561945ba204d5153025fb3116f61f56947e2d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/docker.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/event_summarizer.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/event_summarizer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae4b30734d64d3c557324ac8c6755a663ec827ae Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/event_summarizer.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/event_system.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/event_system.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3660169ab7c0468e7a92c1bdfe1f47e0b2e25996 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/event_system.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/legacy_info_string.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/legacy_info_string.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..28eb61ed3d3d75e7ecb011178865166f64cbec8e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/legacy_info_string.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/load_metrics.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/load_metrics.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9e58348407cd8469628edfe50890f9a880490c3d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/load_metrics.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/loader.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/loader.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..50ef57f090df60f36e2e5ede3c917d6fd506391a Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/loader.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/log_timer.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/log_timer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4deb2c1704059a584a0ed426f84222314e4ff476 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/log_timer.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/monitor.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/monitor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b79b2f4e5090fa70f355e045b2a2968e1832c1d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/monitor.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/node_launcher.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/node_launcher.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eeb0b94246b24299276e4070283d313f39d894b3 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/node_launcher.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/node_provider_availability_tracker.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/node_provider_availability_tracker.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..888c9cc1aca6703ccc4e844b35586a75a718d427 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/node_provider_availability_tracker.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/node_tracker.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/node_tracker.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..656364b38dc54bd9283015c90ff4a4486007f950 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/node_tracker.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/prom_metrics.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/prom_metrics.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2515ddcaed2ff562490babded1fadc68fddd8659 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/prom_metrics.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/providers.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/providers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..717f161617605f9f0462fbcde8f6a54e713522f5 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/providers.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/resource_demand_scheduler.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/resource_demand_scheduler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a76c6bf2d66c2368df331ed068b1db3c997b3ea3 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/resource_demand_scheduler.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/subprocess_output_util.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/subprocess_output_util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa3b3d9f3f37199ab896cfb902c83994a34456a0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/subprocess_output_util.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/updater.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/updater.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f78f4a17f444e56da204e678b9fe1b63a63c5a67 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/updater.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/util.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c493214b48ab2884539fe7865cc3a62883375b54 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/__pycache__/util.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9f4da23829f3e447d4236de2a2c60b1814f2627f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__pycache__/config.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66b7551aefab18999b0580aadfa652c5fc49aac9 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__pycache__/config.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de35cd01e13b150078ac3088b1de1fb8da46d149 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/azure-config-template.json b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/azure-config-template.json new file mode 100644 index 0000000000000000000000000000000000000000..558273f58a6377164581014c4a0099e9a452e7f0 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/azure-config-template.json @@ -0,0 +1,130 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterId": { + "type": "string", + "metadata": { + "description": "Unique string appended to resource names to isolate resources from different ray clusters." + } + }, + "subnet": { + "type": "string", + "metadata": { + "description": "Subnet parameters." + } + }, + "msiName": { + "type": "string", + "metadata": { + "description": "Managed service identity." + } + }, + "msiResourceGroup": { + "type": "string", + "metadata": { + "description": "Managed service identity resource group." + } + }, + "createMsi": { + "type": "bool", + "defaultValue": "true" + } + }, + "variables": { + "contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", + "location": "[resourceGroup().location]", + "roleAssignmentName": "[concat('ray-', parameters('clusterId'), '-ra')]", + "nsgName": "[concat('ray-', parameters('clusterId'), '-nsg')]", + "nsg": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]", + "vnetName": "[concat('ray-', parameters('clusterId'), '-vnet')]", + "subnetName": "[concat('ray-', parameters('clusterId'), '-subnet')]" + }, + "resources": [ + { + "condition": "[parameters('createMsi')]", + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "apiVersion": "2018-11-30", + "location": "[variables('location')]", + "name": "[parameters('msiName')]" + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2020-08-01-preview", + "name": "[guid(variables('roleAssignmentName'))]", + "properties": { + "principalId": "[reference(resourceId(parameters('msiResourceGroup'), 'Microsoft.ManagedIdentity/userAssignedIdentities', parameters('msiName')), '2018-11-30').principalId]", + "roleDefinitionId": "[variables('contributor')]", + "scope": "[resourceGroup().id]", + "principalType": "ServicePrincipal" + }, + "dependsOn": [ + "[parameters('msiName')]" + ] + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2019-02-01", + "name": "[variables('nsgName')]", + "location": "[variables('location')]", + "properties": { + "securityRules": [ + { + "name": "SSH", + "properties": { + "priority": 1000, + "protocol": "TCP", + "access": "Allow", + "direction": "Inbound", + "sourceAddressPrefix": "*", + "sourcePortRange": "*", + "destinationAddressPrefix": "*", + "destinationPortRange": "22" + } + } + ] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2019-11-01", + "name": "[variables('vnetName')]", + "location": "[variables('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('subnet')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[parameters('subnet')]", + "networkSecurityGroup": { + "id": "[variables('nsg')]" + } + } + } + ] + }, + "dependsOn": [ + "[variables('nsg')]" + ] + } + ], + "outputs": { + "subnet": { + "type": "string", + "value": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnetName'))]" + }, + "nsg": { + "type": "string", + "value": "[variables('nsg')]" + }, + "msi": { + "type": "string", + "value": "[resourceId(parameters('msiResourceGroup'), 'Microsoft.ManagedIdentity/userAssignedIdentities', parameters('msiName'))]" + } + } +} diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/azure-vm-template.json b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/azure-vm-template.json new file mode 100644 index 0000000000000000000000000000000000000000..261ed06b268563c48391486978ac0e3066858772 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/azure-vm-template.json @@ -0,0 +1,308 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "metadata": { + "description": "The name of you Virtual Machine." + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } + }, + "publicKey": { + "type": "securestring", + "metadata": { + "description": "SSH Key for the Virtual Machine" + } + }, + "imagePublisher": { + "type": "string", + "metadata": { + "description": "The publisher of the VM image" + }, + "defaultValue": "" + }, + "imageOffer": { + "type": "string", + "metadata": { + "description": "The offer of the VM image" + }, + "defaultValue": "" + }, + "imageSku": { + "type": "string", + "metadata": { + "description": "The sku of the VM image" + }, + "defaultValue": "" + }, + "imageVersion": { + "type": "string", + "metadata": { + "description": "The version of the VM image" + }, + "defaultValue": "" + }, + "imageId": { + "type": "string", + "metadata": { + "description": "The resource id of the VM image. If provided, it will override the imagePublisher, imageOffer, imageSku and imageVersion parameters." + }, + "defaultValue": "" + }, + "vmSize": { + "type": "string", + "metadata": { + "description": "The size of the VM" + } + }, + "vmTags": { + "type": "object", + "metadata": { + "description": "Tags for the VM" + } + }, + "vmCount": { + "type": "int", + "metadata": { + "description": "Number of VMs to deploy" + } + }, + "osDiskSize": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Size of the OS disk in GB" + } + }, + "provisionPublicIp": { + "type": "bool", + "defaultValue": true, + "metadata": { + "description": "If true creates a public ip" + } + }, + "priority": { + "type": "string", + "defaultValue": "Regular", + "metadata": { + "description": "Specifies the priority for the virtual machine." + } + }, + "evictionPolicy": { + "type": "string", + "defaultValue": "Delete", + "metadata": { + "description": "Specifies the eviction policy for the virtual machine." + } + }, + "billingProfile": { + "type": "object", + "defaultValue": {}, + "metadata": { + "description": "Specifies the maximum price to pay for Azure Spot VM." + } + }, + "msi": { + "type": "string", + "metadata": { + "description": "Managed service identity resource id." + } + }, + "nsg": { + "type": "string", + "metadata": { + "description": "Network security group resource id." + } + }, + "subnet": { + "type": "string", + "metadata": { + "descriptions": "Subnet resource id." + } + }, + "enableAcceleratedNetworking": { + "type": "bool", + "defaultValue": false, + "metadata": { + "descriptions": "Whether to enable accelerated networking." + } + } + }, + "variables": { + "location": "[resourceGroup().location]", + "networkInterfaceNamePrivate": "[concat(parameters('vmName'), '-nic')]", + "networkInterfaceNamePublic": "[concat(parameters('vmName'), '-nic-public')]", + "networkInterfaceName": "[if(parameters('provisionPublicIp'), variables('networkInterfaceNamePublic'), variables('networkInterfaceNamePrivate'))]", + "networkIpConfig": "[guid(resourceGroup().id, parameters('vmName'))]", + "osDiskType": "Standard_LRS", + "publicIpAddressName": "[concat(parameters('vmName'), '-ip')]" + }, + "resources": [ + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "name": "[concat(variables('networkInterfaceNamePublic'), copyIndex())]", + "location": "[variables('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIpAddresses/', concat(variables('publicIpAddressName'), copyIndex()))]" + ], + "copy": { + "name": "NICPublicCopy", + "count": "[parameters('vmCount')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "[variables('networkIpConfig')]", + "properties": { + "subnet": { + "id": "[parameters('subnet')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(variables('publicIPAddressName'), copyIndex()))]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[parameters('nsg')]" + }, + "enableAcceleratedNetworking": "[parameters('enableAcceleratedNetworking')]" + }, + "condition": "[parameters('provisionPublicIp')]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-06-01", + "name": "[concat(variables('networkInterfaceNamePrivate'), copyIndex())]", + "location": "[variables('location')]", + "copy": { + "name": "NICPrivateCopy", + "count": "[parameters('vmCount')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "[variables('networkIpConfig')]", + "properties": { + "subnet": { + "id": "[parameters('subnet')]" + }, + "privateIPAllocationMethod": "Dynamic" + } + } + ], + "networkSecurityGroup": { + "id": "[parameters('nsg')]" + }, + "enableAcceleratedNetworking": "[parameters('enableAcceleratedNetworking')]" + }, + "condition": "[not(parameters('provisionPublicIp'))]" + }, + { + "type": "Microsoft.Network/publicIpAddresses", + "apiVersion": "2019-02-01", + "name": "[concat(variables('publicIpAddressName'), copyIndex())]", + "location": "[variables('location')]", + "properties": { + "publicIpAllocationMethod": "Static", + "publicIPAddressVersion": "IPv4" + }, + "copy": { + "name": "PublicIpCopy", + "count": "[parameters('vmCount')]" + }, + "sku": { + "name": "Basic", + "tier": "Regional" + }, + "condition": "[parameters('provisionPublicIp')]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2019-03-01", + "name": "[concat(parameters('vmName'), copyIndex())]", + "location": "[variables('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkInterfaces/', concat(variables('networkInterfaceName'), copyIndex()))]" + ], + "copy": { + "name": "VmCopy", + "count": "[parameters('vmCount')]" + }, + "tags": "[parameters('vmTags')]", + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "storageProfile": { + "osDisk": { + "createOption": "fromImage", + "diskSizeGB": "[if(equals(parameters('osDiskSize'), 0), json('null'), parameters('osDiskSize'))]", + "managedDisk": { + "storageAccountType": "[variables('osDiskType')]" + } + }, + "imageReference": "[if(equals(parameters('imageId'), ''), json(concat('{\"publisher\":\"', parameters('imagePublisher'), '\",\"offer\":\"', parameters('imageOffer'), '\",\"sku\":\"', parameters('imageSku'), '\",\"version\":\"', parameters('imageVersion'), '\"}')), json(concat('{\"id\":\"', parameters('imageId'), '\"}')))]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('networkInterfaceName'), copyIndex()))]" + } + ] + }, + "osProfile": { + "computerName": "[concat(parameters('vmName'), copyIndex())]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('publicKey')]", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", + "keyData": "[parameters('publicKey')]" + } + ] + } + } + }, + "priority": "[parameters('priority')]", + "evictionPolicy": "[if(equals(parameters('priority'), 'Spot'), parameters('evictionPolicy'), '')]", + "billingProfile": "[parameters('billingProfile')]" + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "[parameters('msi')]": { + } + } + } + } + ], + "outputs": { + "publicIp": { + "type": "array", + "copy": { + "count": "[parameters('vmCount')]", + "input": "[reference(concat(variables('publicIpAddressName'), copyIndex())).ipAddress]" + }, + "condition": "[parameters('provisionPublicIp')]" + }, + "privateIp": { + "type": "array", + "copy": { + "count": "[parameters('vmCount')]", + "input": "[reference(concat(variables('networkInterfaceName'), copyIndex())).ipConfigurations[0].properties.privateIPAddress]" + } + } + } +} diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/config.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/config.py new file mode 100644 index 0000000000000000000000000000000000000000..5320b1698ec396231e5ef692ccf20409f1bf0198 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/config.py @@ -0,0 +1,245 @@ +import json +import logging +import random +from hashlib import sha256 +from pathlib import Path +from typing import Any, Callable + +from azure.common.credentials import get_cli_profile +from azure.identity import AzureCliCredential +from azure.mgmt.resource import ResourceManagementClient +from azure.mgmt.resource.resources.models import DeploymentMode + +UNIQUE_ID_LEN = 4 + +logger = logging.getLogger(__name__) + + +def get_azure_sdk_function(client: Any, function_name: str) -> Callable: + """Retrieve a callable function from Azure SDK client object. + + Newer versions of the various client SDKs renamed function names to + have a begin_ prefix. This function supports both the old and new + versions of the SDK by first trying the old name and falling back to + the prefixed new name. + """ + func = getattr( + client, function_name, getattr(client, f"begin_{function_name}", None) + ) + if func is None: + raise AttributeError( + "'{obj}' object has no {func} or begin_{func} attribute".format( + obj={client.__name__}, func=function_name + ) + ) + return func + + +def bootstrap_azure(config): + config = _configure_key_pair(config) + config = _configure_resource_group(config) + return config + + +def _configure_resource_group(config): + # TODO: look at availability sets + # https://docs.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-availability-sets + subscription_id = config["provider"].get("subscription_id") + if subscription_id is None: + subscription_id = get_cli_profile().get_subscription_id() + resource_client = ResourceManagementClient(AzureCliCredential(), subscription_id) + config["provider"]["subscription_id"] = subscription_id + logger.info("Using subscription id: %s", subscription_id) + + assert ( + "resource_group" in config["provider"] + ), "Provider config must include resource_group field" + resource_group = config["provider"]["resource_group"] + + assert ( + "location" in config["provider"] + ), "Provider config must include location field" + params = {"location": config["provider"]["location"]} + + if "tags" in config["provider"]: + params["tags"] = config["provider"]["tags"] + + logger.info("Creating/Updating resource group: %s", resource_group) + rg_create_or_update = get_azure_sdk_function( + client=resource_client.resource_groups, function_name="create_or_update" + ) + rg_create_or_update(resource_group_name=resource_group, parameters=params) + + # load the template file + current_path = Path(__file__).parent + template_path = current_path.joinpath("azure-config-template.json") + with open(template_path, "r") as template_fp: + template = json.load(template_fp) + + logger.info("Using cluster name: %s", config["cluster_name"]) + + # set unique id for resources in this cluster + unique_id = config["provider"].get("unique_id") + if unique_id is None: + hasher = sha256() + hasher.update(config["provider"]["resource_group"].encode("utf-8")) + unique_id = hasher.hexdigest()[:UNIQUE_ID_LEN] + else: + unique_id = str(unique_id) + config["provider"]["unique_id"] = unique_id + logger.info("Using unique id: %s", unique_id) + cluster_id = "{}-{}".format(config["cluster_name"], unique_id) + + subnet_mask = config["provider"].get("subnet_mask") + if subnet_mask is None: + # choose a random subnet, skipping most common value of 0 + random.seed(unique_id) + subnet_mask = "10.{}.0.0/16".format(random.randint(1, 254)) + logger.info("Using subnet mask: %s", subnet_mask) + + # Copy over properties from existing subnet. + # Addresses issue (https://github.com/Azure/azure-quickstart-templates/issues/2786) + # where existing subnet properties will get overwritten unless explicitly specified + # during multiple deployments even if vnet/subnet do not change. + # May eventually be fixed by passing empty subnet list if they already exist: + # https://techcommunity.microsoft.com/t5/azure-networking-blog/azure-virtual-network-now-supports-updates-without-subnet/ba-p/4067952 + list_by_rg = get_azure_sdk_function( + client=resource_client.resources, function_name="list_by_resource_group" + ) + existing_vnets = list( + list_by_rg( + resource_group, + f"substringof('{unique_id}', name) and " + "resourceType eq 'Microsoft.Network/virtualNetworks'", + ) + ) + if len(existing_vnets) > 0: + vnid = existing_vnets[0].id + get_by_id = get_azure_sdk_function( + client=resource_client.resources, function_name="get_by_id" + ) + + # Query for supported API versions for Microsoft.Network/virtualNetworks + # because resource_client.DEFAULT_API_VERSION is not always supported. + # (Example: "2024-11-01" is the default at the time of this writing) + # Use "2024-10-01" as a fallback if we can't determine the latest stable version. + vnet_api_version = "2024-10-01" + try: + # Get supported API versions for Microsoft.Network provider + providers = resource_client.providers.get("Microsoft.Network") + vnet_resource_type = next( + ( + rt + for rt in providers.resource_types + if rt.resource_type == "virtualNetworks" + ), + None, + ) + if vnet_resource_type and vnet_resource_type.api_versions: + stable_versions = [ + v for v in vnet_resource_type.api_versions if "preview" not in v + ] + versions_to_consider = ( + stable_versions or vnet_resource_type.api_versions + ) + vnet_api_version = sorted(versions_to_consider)[-1] + logger.info( + "Using API version: %s for virtualNetworks", vnet_api_version + ) + else: + logger.warning( + "Could not determine supported API versions for virtualNetworks, using fallback version %s", + vnet_api_version, + ) + except Exception as e: + logger.warning( + "Failed to query Microsoft.Network provider: %s. Using fallback API version 2024-10-01", + str(e), + ) + + subnet = get_by_id(vnid, vnet_api_version).properties["subnets"][0] + template_vnet = next( + ( + rs + for rs in template["resources"] + if rs["type"] == "Microsoft.Network/virtualNetworks" + ), + None, + ) + if template_vnet is not None: + template_subnets = template_vnet["properties"].get("subnets") + if template_subnets is not None: + template_subnets[0]["properties"].update(subnet["properties"]) + + # Get or create an MSI name and resource group. + # Defaults to current resource group if not provided. + use_existing_msi = ( + "msi_name" in config["provider"] and "msi_resource_group" in config["provider"] + ) + msi_resource_group = config["provider"].get("msi_resource_group", resource_group) + msi_name = config["provider"].get("msi_name", f"ray-{cluster_id}-msi") + logger.info( + "Using msi_name: %s from msi_resource_group: %s", msi_name, msi_resource_group + ) + + parameters = { + "properties": { + "mode": DeploymentMode.incremental, + "template": template, + "parameters": { + "subnet": {"value": subnet_mask}, + "clusterId": {"value": cluster_id}, + "msiName": {"value": msi_name}, + "msiResourceGroup": {"value": msi_resource_group}, + "createMsi": {"value": not use_existing_msi}, + }, + } + } + + create_or_update = get_azure_sdk_function( + client=resource_client.deployments, function_name="create_or_update" + ) + outputs = ( + create_or_update( + resource_group_name=resource_group, + deployment_name="ray-config", + parameters=parameters, + ) + .result() + .properties.outputs + ) + + # append output resource ids to be used with vm creation + config["provider"]["msi"] = outputs["msi"]["value"] + config["provider"]["nsg"] = outputs["nsg"]["value"] + config["provider"]["subnet"] = outputs["subnet"]["value"] + + return config + + +def _configure_key_pair(config): + ssh_user = config["auth"]["ssh_user"] + public_key = None + # search if the keys exist + for key_type in ["ssh_private_key", "ssh_public_key"]: + try: + key_path = Path(config["auth"][key_type]).expanduser() + except KeyError: + raise Exception("Config must define {}".format(key_type)) + except TypeError: + raise Exception("Invalid config value for {}".format(key_type)) + + assert key_path.is_file(), "Could not find ssh key: {}".format(key_path) + + if key_type == "ssh_public_key": + with open(key_path, "r") as f: + public_key = f.read() + + for node_type in config["available_node_types"].values(): + azure_arm_parameters = node_type["node_config"].setdefault( + "azure_arm_parameters", {} + ) + azure_arm_parameters["adminUsername"] = ssh_user + azure_arm_parameters["publicKey"] = public_key + + return config diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..e07d96deef21bfb70d740638146587920b1642f1 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/_azure/node_provider.py @@ -0,0 +1,492 @@ +import json +import logging +import time +from concurrent.futures import Future, ThreadPoolExecutor +from pathlib import Path +from threading import RLock +from uuid import uuid4 + +from azure.core.exceptions import ResourceNotFoundError +from azure.identity import DefaultAzureCredential +from azure.mgmt.compute import ComputeManagementClient +from azure.mgmt.network import NetworkManagementClient +from azure.mgmt.resource import ResourceManagementClient +from azure.mgmt.resource.resources.models import DeploymentMode + +from ray.autoscaler._private._azure.config import ( + bootstrap_azure, + get_azure_sdk_function, +) +from ray.autoscaler._private.constants import ( + AUTOSCALER_NODE_START_WAIT_S, + AUTOSCALER_NODE_TERMINATE_WAIT_S, + MAX_PARALLEL_SHUTDOWN_WORKERS, +) +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + TAG_RAY_CLUSTER_NAME, + TAG_RAY_LAUNCH_CONFIG, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_USER_NODE_TYPE, +) + +VM_NAME_MAX_LEN = 64 +UNIQUE_ID_LEN = 4 + +logger = logging.getLogger(__name__) +azure_logger = logging.getLogger("azure.core.pipeline.policies.http_logging_policy") +azure_logger.setLevel(logging.WARNING) + + +def synchronized(f): + def wrapper(self, *args, **kwargs): + self.lock.acquire() + try: + return f(self, *args, **kwargs) + finally: + self.lock.release() + + return wrapper + + +class AzureNodeProvider(NodeProvider): + """Node Provider for Azure + + This provider assumes Azure credentials are set by running ``az login`` + and the default subscription is configured through ``az account`` + or set in the ``provider`` field of the autoscaler configuration. + + Nodes may be in one of three states: {pending, running, terminated}. Nodes + appear immediately once started by ``create_node``, and transition + immediately to terminated when ``terminate_node`` is called. + """ + + def __init__(self, provider_config, cluster_name): + NodeProvider.__init__(self, provider_config, cluster_name) + subscription_id = provider_config["subscription_id"] + self.cache_stopped_nodes = provider_config.get("cache_stopped_nodes", True) + credential = DefaultAzureCredential(exclude_shared_token_cache_credential=True) + self.compute_client = ComputeManagementClient(credential, subscription_id) + self.network_client = NetworkManagementClient(credential, subscription_id) + self.resource_client = ResourceManagementClient(credential, subscription_id) + + self.lock = RLock() + + # cache node objects + self.cached_nodes = {} + + # Cache terminating node operations + self.terminating_nodes: dict[str, Future] = {} + self.termination_executor = ThreadPoolExecutor( + max_workers=MAX_PARALLEL_SHUTDOWN_WORKERS + ) + + @synchronized + def _get_filtered_nodes(self, tag_filters): + # add cluster name filter to only get nodes from this cluster + cluster_tag_filters = {**tag_filters, TAG_RAY_CLUSTER_NAME: self.cluster_name} + + def match_tags(tags): + for k, v in cluster_tag_filters.items(): + if tags.get(k) != v: + return False + return True + + vms = self.compute_client.virtual_machines.list( + resource_group_name=self.provider_config["resource_group"] + ) + + nodes = [self._extract_metadata(vm) for vm in vms] + self.cached_nodes = {node["name"]: node for node in nodes} + + # Update terminating nodes list by removing nodes that + # have finished termination. + self.terminating_nodes = { + k: v for k, v in self.terminating_nodes.items() if not v.done() + } + + return { + k: v + for k, v in self.cached_nodes.items() + if v["tags"] is not None and match_tags(v["tags"]) + } + + def _extract_metadata(self, vm): + # get tags + metadata = {"name": vm.name, "tags": vm.tags, "status": ""} + + # get status + resource_group = self.provider_config["resource_group"] + try: + instance = self.compute_client.virtual_machines.instance_view( + resource_group_name=resource_group, vm_name=vm.name + ).as_dict() + except ResourceNotFoundError: + return metadata + + for status in instance["statuses"]: + # If ProvisioningState is "failed" (e.g., + # ProvisioningState/failed/RetryableError), we can get a third + # string here, so we need to limit to the first two outputs. + code, state = status["code"].split("/")[:2] + # skip provisioning status + if code == "PowerState": + metadata["status"] = state + break + + # get ip data + nic_id = vm.network_profile.network_interfaces[0].id + metadata["nic_name"] = nic_id.split("/")[-1] + nic = self.network_client.network_interfaces.get( + resource_group_name=resource_group, + network_interface_name=metadata["nic_name"], + ) + ip_config = nic.ip_configurations[0] + + # Get public IP if not using internal IPs or if this is the + # head node and use_external_head_ip is True + if not self.provider_config.get("use_internal_ips", False) or ( + self.provider_config.get("use_external_head_ip", False) + and metadata["tags"][TAG_RAY_NODE_KIND] == NODE_KIND_HEAD + ): + public_ip_id = ip_config.public_ip_address.id + metadata["public_ip_name"] = public_ip_id.split("/")[-1] + public_ip = self.network_client.public_ip_addresses.get( + resource_group_name=resource_group, + public_ip_address_name=metadata["public_ip_name"], + ) + metadata["external_ip"] = public_ip.ip_address + + metadata["internal_ip"] = ip_config.private_ip_address + + return metadata + + def stopped_nodes(self, tag_filters): + """Return a list of stopped node ids filtered by the specified tags dict.""" + nodes = self._get_filtered_nodes(tag_filters=tag_filters) + return [k for k, v in nodes.items() if v["status"].startswith("deallocat")] + + def non_terminated_nodes(self, tag_filters): + """Return a list of node ids filtered by the specified tags dict. + + This list must not include terminated nodes. For performance reasons, + providers are allowed to cache the result of a call to nodes() to + serve single-node queries (e.g. is_running(node_id)). This means that + nodes() must be called again to refresh results. + + Examples: + >>> from ray.autoscaler.tags import TAG_RAY_NODE_KIND + >>> provider = ... # doctest: +SKIP + >>> provider.non_terminated_nodes( # doctest: +SKIP + ... {TAG_RAY_NODE_KIND: "worker"}) + ["node-1", "node-2"] + """ + nodes = self._get_filtered_nodes(tag_filters=tag_filters) + return [ + k + for k, v in nodes.items() + if not v["status"].startswith("deallocat") or k in self.terminating_nodes + ] + + def is_running(self, node_id): + """Return whether the specified node is running.""" + # always get current status + node = self._get_node(node_id=node_id) + return node["status"] == "running" + + def is_terminated(self, node_id): + """Return whether the specified node is terminated.""" + # always get current status + node = self._get_node(node_id=node_id) + return node["status"].startswith("deallocat") + + def node_tags(self, node_id): + """Returns the tags of the given node (string dict).""" + return self._get_cached_node(node_id=node_id)["tags"] + + def external_ip(self, node_id): + """Returns the external ip of the given node.""" + ip = ( + self._get_cached_node(node_id=node_id)["external_ip"] + or self._get_node(node_id=node_id)["external_ip"] + ) + return ip + + def internal_ip(self, node_id): + """Returns the internal ip (Ray ip) of the given node.""" + ip = ( + self._get_cached_node(node_id=node_id)["internal_ip"] + or self._get_node(node_id=node_id)["internal_ip"] + ) + return ip + + def create_node(self, node_config, tags, count): + resource_group = self.provider_config["resource_group"] + + if self.cache_stopped_nodes: + VALIDITY_TAGS = [ + TAG_RAY_CLUSTER_NAME, + TAG_RAY_NODE_KIND, + TAG_RAY_LAUNCH_CONFIG, + TAG_RAY_USER_NODE_TYPE, + ] + filters = {tag: tags[tag] for tag in VALIDITY_TAGS if tag in tags} + reuse_nodes = self.stopped_nodes(filters)[:count] + logger.info( + f"Reusing nodes {list(reuse_nodes)}. " + "To disable reuse, set `cache_stopped_nodes: False` " + "under `provider` in the cluster configuration.", + ) + start = get_azure_sdk_function( + client=self.compute_client.virtual_machines, function_name="start" + ) + for node_id in reuse_nodes: + start(resource_group_name=resource_group, vm_name=node_id).wait() + self.set_node_tags(node_id, tags) + count -= len(reuse_nodes) + + if count: + self._create_node(node_config, tags, count) + + def _create_node(self, node_config, tags, count): + """Creates a number of nodes within the namespace.""" + resource_group = self.provider_config["resource_group"] + + # load the template file + current_path = Path(__file__).parent + template_path = current_path.joinpath("azure-vm-template.json") + with open(template_path, "r") as template_fp: + template = json.load(template_fp) + + # get the tags + config_tags = node_config.get("tags", {}).copy() + config_tags.update(tags) + config_tags[TAG_RAY_CLUSTER_NAME] = self.cluster_name + + vm_name = "{node}-{unique_id}-{vm_id}".format( + node=config_tags.get(TAG_RAY_NODE_NAME, "node"), + unique_id=self.provider_config["unique_id"], + vm_id=uuid4().hex[:UNIQUE_ID_LEN], + )[:VM_NAME_MAX_LEN] + + template_params = node_config["azure_arm_parameters"].copy() + template_params["vmName"] = vm_name + # Provision public IP if not using internal IPs or if this is the + # head node and use_external_head_ip is True + template_params["provisionPublicIp"] = not self.provider_config.get( + "use_internal_ips", False + ) or ( + self.provider_config.get("use_external_head_ip", False) + and config_tags[TAG_RAY_NODE_KIND] == NODE_KIND_HEAD + ) + template_params["vmTags"] = config_tags + template_params["vmCount"] = count + template_params["msi"] = self.provider_config["msi"] + template_params["nsg"] = self.provider_config["nsg"] + template_params["subnet"] = self.provider_config["subnet"] + + parameters = { + "properties": { + "mode": DeploymentMode.incremental, + "template": template, + "parameters": { + key: {"value": value} for key, value in template_params.items() + }, + } + } + + # TODO: we could get the private/public ips back directly + create_or_update = get_azure_sdk_function( + client=self.resource_client.deployments, function_name="create_or_update" + ) + create_or_update( + resource_group_name=resource_group, + deployment_name=vm_name, + parameters=parameters, + ).wait(timeout=AUTOSCALER_NODE_START_WAIT_S) + + @synchronized + def set_node_tags(self, node_id, tags): + """Sets the tag values (string dict) for the specified node.""" + node_tags = self._get_cached_node(node_id)["tags"] + node_tags.update(tags) + update = get_azure_sdk_function( + client=self.compute_client.virtual_machines, function_name="update" + ) + update( + resource_group_name=self.provider_config["resource_group"], + vm_name=node_id, + parameters={"tags": node_tags}, + ) + self.cached_nodes[node_id]["tags"] = node_tags + + def terminate_node(self, node_id): + """Terminates the specified node. This will delete the VM and + associated resources (NIC, IP, Storage) for the specified node.""" + + resource_group = self.provider_config["resource_group"] + + if self.cache_stopped_nodes: + try: + # stop machine and leave all resources + logger.info( + f"Stopping instance {node_id}" + "(to fully terminate instead, " + "set `cache_stopped_nodes: False` " + "under `provider` in the cluster configuration)" + ) + stop = get_azure_sdk_function( + client=self.compute_client.virtual_machines, + function_name="deallocate", + ) + stop(resource_group_name=resource_group, vm_name=node_id) + except Exception as e: + logger.warning("Failed to stop VM: {}".format(e)) + + # If node_id is in terminating nodes dict, it's already terminating + # Otherwise, kick off termination and add it to the dict + elif node_id not in self.terminating_nodes: + self.terminating_nodes[node_id] = self.termination_executor.submit( + self._delete_node_and_resources, resource_group, node_id + ) + + def _delete_node_and_resources(self, resource_group, node_id): + try: + vm = self.compute_client.virtual_machines.get( + resource_group_name=resource_group, vm_name=node_id + ) + except ResourceNotFoundError as e: + # Node no longer exists + logger.warning("Failed to delete VM: {}".format(e)) + return + + # Gather dependent disks + disks = set() + if vm.storage_profile is not None and vm.storage_profile.data_disks is not None: + for d in vm.storage_profile.data_disks: + if d.name is not None: + disks.add(d.name) + if ( + vm.storage_profile is not None + and vm.storage_profile.os_disk is not None + and vm.storage_profile.os_disk.name is not None + ): + disks.add(vm.storage_profile.os_disk.name) + + # Gather dependent NICs and public IPs + nics = set() + ips = set() + if ( + vm.network_profile is not None + and vm.network_profile.network_interfaces is not None + ): + for nint in vm.network_profile.network_interfaces: + if nint.id is not None: + nic_name = nint.id.split("/")[-1] + nics.add(nic_name) + # Get public IP if not using internal IPs or if this is the + # head node and use_external_head_ip is True + if not self.provider_config.get("use_internal_ips", False) or ( + self.provider_config.get("use_external_head_ip", False) + and vm.tags[TAG_RAY_NODE_KIND] == NODE_KIND_HEAD + ): + nic = self.network_client.network_interfaces.get( + resource_group_name=resource_group, + network_interface_name=nic_name, + ) + if nic.ip_configurations is not None: + for ipc in nic.ip_configurations: + if ipc.public_ip_address.id is not None: + ips.add(ipc.public_ip_address.id.split("/")[-1]) + + # Delete VM + st = time.monotonic() + delete = get_azure_sdk_function( + client=self.compute_client.virtual_machines, + function_name="delete", + ) + try: + delete(resource_group_name=resource_group, vm_name=node_id).wait( + timeout=AUTOSCALER_NODE_TERMINATE_WAIT_S + ) + except Exception as e: + logger.warning("Failed to delete VM: {}".format(e)) + + # Delete disks (no need to wait for these, but gather the LROs for end) + disk_lros = [] + delete = get_azure_sdk_function( + client=self.compute_client.disks, function_name="delete" + ) + for d in disks: + try: + disk_lros.append( + delete( + resource_group_name=resource_group, + disk_name=d, + ) + ) + except Exception as e: + logger.warning("Failed to delete disk: {}".format(e)) + + # Delete NICs + nic_lros = [] + delete = get_azure_sdk_function( + client=self.network_client.network_interfaces, function_name="delete" + ) + for n in nics: + try: + nic_lros.append( + delete( + resource_group_name=resource_group, + network_interface_name=n, + ) + ) + except Exception as e: + logger.warning("Failed to delete NIC: {}".format(e)) + + while ( + not all(nlro.done() for nlro in nic_lros) + and (time.monotonic() - st) < AUTOSCALER_NODE_TERMINATE_WAIT_S + ): + time.sleep(0.1) + + # Delete Public IPs + delete = get_azure_sdk_function( + client=self.network_client.public_ip_addresses, + function_name="delete", + ) + ip_lros = [] + for ip in ips: + try: + ip_lros.append( + delete( + resource_group_name=resource_group, + public_ip_address_name=ip, + ) + ) + except Exception as e: + logger.warning("Failed to delete public IP: {}".format(e)) + + while ( + not all(dlro.done() for dlro in disk_lros) + and (time.monotonic() - st) < AUTOSCALER_NODE_TERMINATE_WAIT_S + ): + time.sleep(0.1) + while ( + not all(iplro.done() for iplro in ip_lros) + and (time.monotonic() - st) < AUTOSCALER_NODE_TERMINATE_WAIT_S + ): + time.sleep(0.1) + + def _get_node(self, node_id): + self._get_filtered_nodes({}) # Side effect: updates cache + return self.cached_nodes[node_id] + + def _get_cached_node(self, node_id): + return self.cached_nodes.get(node_id) or self._get_node(node_id=node_id) + + @staticmethod + def bootstrap_config(cluster_config): + return bootstrap_azure(cluster_config) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..99fe2d5f30681f95162c6a30587df8771386179c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/config.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a0580c719b3c4cde9c79dd5b44f488dd2c200ac Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/config.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..db94cfb282e38353b5171c5cef5fcb29c05e375d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d6061702269361d6c901c9eeb53a1ef6c570794d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/__pycache__/utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/config.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/config.py new file mode 100644 index 0000000000000000000000000000000000000000..464b170ddb646089f84a2bd5b3a053ea11e4d601 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/config.py @@ -0,0 +1,116 @@ +import logging +import os +import stat + +from ray.autoscaler._private.aliyun.utils import AcsClient + +# instance status +PENDING = "Pending" +RUNNING = "Running" +STARTING = "Starting" +STOPPING = "Stopping" +STOPPED = "Stopped" + +logger = logging.getLogger(__name__) + + +def bootstrap_aliyun(config): + # print(config["provider"]) + # create vpc + _get_or_create_vpc(config) + # create security group id + _get_or_create_security_group(config) + # create vswitch + _get_or_create_vswitch(config) + # create key pair + _get_or_import_key_pair(config) + # print(config["provider"]) + return config + + +def _client(config): + return AcsClient( + access_key=config["provider"].get("access_key"), + access_key_secret=config["provider"].get("access_key_secret"), + region_id=config["provider"]["region"], + max_retries=1, + ) + + +def _get_or_create_security_group(config): + cli = _client(config) + security_groups = cli.describe_security_groups(vpc_id=config["provider"]["vpc_id"]) + if security_groups is not None and len(security_groups) > 0: + config["provider"]["security_group_id"] = security_groups[0]["SecurityGroupId"] + return config + + security_group_id = cli.create_security_group(vpc_id=config["provider"]["vpc_id"]) + + for rule in config["provider"].get("security_group_rule", {}): + cli.authorize_security_group( + security_group_id=security_group_id, + port_range=rule["port_range"], + source_cidr_ip=rule["source_cidr_ip"], + ip_protocol=rule["ip_protocol"], + ) + config["provider"]["security_group_id"] = security_group_id + return + + +def _get_or_create_vpc(config): + cli = _client(config) + vpcs = cli.describe_vpcs() + if vpcs is not None and len(vpcs) > 0: + config["provider"]["vpc_id"] = vpcs[0].get("VpcId") + return + + vpc_id = cli.create_vpc() + if vpc_id is not None: + config["provider"]["vpc_id"] = vpc_id + + +def _get_or_create_vswitch(config): + cli = _client(config) + vswitches = cli.describe_v_switches(vpc_id=config["provider"]["vpc_id"]) + if vswitches is not None and len(vswitches) > 0: + config["provider"]["v_switch_id"] = vswitches[0].get("VSwitchId") + return + + v_switch_id = cli.create_v_switch( + vpc_id=config["provider"]["vpc_id"], + zone_id=config["provider"]["zone_id"], + cidr_block=config["provider"]["cidr_block"], + ) + + if v_switch_id is not None: + config["provider"]["v_switch_id"] = v_switch_id + + +def _get_or_import_key_pair(config): + cli = _client(config) + key_name = config["provider"].get("key_name", "ray") + key_path = os.path.expanduser("~/.ssh/{}".format(key_name)) + keypairs = cli.describe_key_pairs(key_pair_name=key_name) + + if keypairs is not None and len(keypairs) > 0: + if "ssh_private_key" not in config["auth"]: + logger.info( + "{} keypair exists, use {} as local ssh key".format(key_name, key_path) + ) + config["auth"]["ssh_private_key"] = key_path + else: + if "ssh_private_key" not in config["auth"]: + # create new keypair + resp = cli.create_key_pair(key_pair_name=key_name) + if resp is not None: + with open(key_path, "w+") as f: + f.write(resp.get("PrivateKeyBody")) + os.chmod(key_path, stat.S_IRUSR) + config["auth"]["ssh_private_key"] = key_path + else: + public_key_file = config["auth"]["ssh_private_key"] + ".pub" + # create new keypair, from local file + with open(public_key_file) as f: + public_key = f.readline().strip("\n") + cli.import_key_pair(key_pair_name=key_name, public_key_body=public_key) + return diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..e9b65a07936f9a1aaf18a9763e2263d542738809 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/node_provider.py @@ -0,0 +1,324 @@ +import logging +import random +import threading +import time +from collections import defaultdict +from typing import Any, Dict, List, Optional + +from ray.autoscaler._private.aliyun.config import ( + PENDING, + RUNNING, + STOPPED, + STOPPING, + bootstrap_aliyun, +) +from ray.autoscaler._private.aliyun.utils import AcsClient +from ray.autoscaler._private.cli_logger import cli_logger +from ray.autoscaler._private.constants import BOTO_MAX_RETRIES +from ray.autoscaler._private.log_timer import LogTimer +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + TAG_RAY_CLUSTER_NAME, + TAG_RAY_LAUNCH_CONFIG, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, + TAG_RAY_USER_NODE_TYPE, +) + +logger = logging.getLogger(__name__) + +TAG_BATCH_DELAY = 1 +STOPPING_NODE_DELAY = 1 + + +class AliyunNodeProvider(NodeProvider): + def __init__(self, provider_config, cluster_name): + NodeProvider.__init__(self, provider_config, cluster_name) + self.cache_stopped_nodes = provider_config.get("cache_stopped_nodes", True) + self.acs = AcsClient( + access_key=provider_config["access_key"], + access_key_secret=provider_config["access_key_secret"], + region_id=provider_config["region"], + max_retries=BOTO_MAX_RETRIES, + ) + + # Try availability zones round-robin, starting from random offset + self.subnet_idx = random.randint(0, 100) + + # Tags that we believe to actually be on the node. + self.tag_cache = {} + # Tags that we will soon upload. + self.tag_cache_pending = defaultdict(dict) + # Number of threads waiting for a batched tag update. + self.batch_thread_count = 0 + self.batch_update_done = threading.Event() + self.batch_update_done.set() + self.ready_for_new_batch = threading.Event() + self.ready_for_new_batch.set() + self.tag_cache_lock = threading.Lock() + self.count_lock = threading.Lock() + + # Cache of node objects from the last nodes() call. This avoids + # excessive DescribeInstances requests. + self.cached_nodes = {} + + def non_terminated_nodes(self, tag_filters: Dict[str, str]) -> List[str]: + tags = [ + { + "Key": TAG_RAY_CLUSTER_NAME, + "Value": self.cluster_name, + }, + ] + for k, v in tag_filters.items(): + tags.append( + { + "Key": k, + "Value": v, + } + ) + + instances = self.acs.describe_instances(tags=tags) + non_terminated_instance = [] + for instance in instances: + if instance.get("Status") == RUNNING or instance.get("Status") == PENDING: + non_terminated_instance.append(instance.get("InstanceId")) + self.cached_nodes[instance.get("InstanceId")] = instance + return non_terminated_instance + + def is_running(self, node_id: str) -> bool: + instances = self.acs.describe_instances(instance_ids=[node_id]) + if instances is not None: + instance = instances[0] + return instance.get("Status") == "Running" + cli_logger.error("Invalid node id: %s", node_id) + return False + + def is_terminated(self, node_id: str) -> bool: + instances = self.acs.describe_instances(instance_ids=[node_id]) + if instances is not None: + assert len(instances) == 1 + instance = instances[0] + return instance.get("Status") == "Stopped" + cli_logger.error("Invalid node id: %s", node_id) + return False + + def node_tags(self, node_id: str) -> Dict[str, str]: + instances = self.acs.describe_instances(instance_ids=[node_id]) + if instances is not None: + assert len(instances) == 1 + instance = instances[0] + if instance.get("Tags") is not None: + node_tags = dict() + for tag in instance.get("Tags").get("Tag"): + node_tags[tag.get("TagKey")] = tag.get("TagValue") + return node_tags + return dict() + + def external_ip(self, node_id: str) -> str: + while True: + instances = self.acs.describe_instances(instance_ids=[node_id]) + if instances is not None: + assert len(instances) + instance = instances[0] + if ( + instance.get("PublicIpAddress") is not None + and instance.get("PublicIpAddress").get("IpAddress") is not None + ): + if len(instance.get("PublicIpAddress").get("IpAddress")) > 0: + return instance.get("PublicIpAddress").get("IpAddress")[0] + cli_logger.error("PublicIpAddress attribute is not exist. %s" % instance) + time.sleep(STOPPING_NODE_DELAY) + + def internal_ip(self, node_id: str) -> str: + while True: + instances = self.acs.describe_instances(instance_ids=[node_id]) + if instances is not None: + assert len(instances) == 1 + instance = instances[0] + if ( + instance.get("VpcAttributes") is not None + and instance.get("VpcAttributes").get("PrivateIpAddress") + is not None + and len( + instance.get("VpcAttributes") + .get("PrivateIpAddress") + .get("IpAddress") + ) + > 0 + ): + return ( + instance.get("VpcAttributes") + .get("PrivateIpAddress") + .get("IpAddress")[0] + ) + cli_logger.error("InnerIpAddress attribute is not exist. %s" % instance) + time.sleep(STOPPING_NODE_DELAY) + + def set_node_tags(self, node_id: str, tags: Dict[str, str]) -> None: + is_batching_thread = False + with self.tag_cache_lock: + if not self.tag_cache_pending: + is_batching_thread = True + # Wait for threads in the last batch to exit + self.ready_for_new_batch.wait() + self.ready_for_new_batch.clear() + self.batch_update_done.clear() + self.tag_cache_pending[node_id].update(tags) + + if is_batching_thread: + time.sleep(TAG_BATCH_DELAY) + with self.tag_cache_lock: + self._update_node_tags() + self.batch_update_done.set() + + with self.count_lock: + self.batch_thread_count += 1 + self.batch_update_done.wait() + + with self.count_lock: + self.batch_thread_count -= 1 + if self.batch_thread_count == 0: + self.ready_for_new_batch.set() + + def _update_node_tags(self): + batch_updates = defaultdict(list) + + for node_id, tags in self.tag_cache_pending.items(): + for x in tags.items(): + batch_updates[x].append(node_id) + self.tag_cache[node_id] = tags + + self.tag_cache_pending = defaultdict(dict) + + self._create_tags(batch_updates) + + def _create_tags(self, batch_updates): + + for (k, v), node_ids in batch_updates.items(): + m = "Set tag {}={} on {}".format(k, v, node_ids) + with LogTimer("AliyunNodeProvider: {}".format(m)): + if k == TAG_RAY_NODE_NAME: + k = "Name" + + self.acs.tag_resource(node_ids, [{"Key": k, "Value": v}]) + + def create_node( + self, node_config: Dict[str, Any], tags: Dict[str, str], count: int + ) -> Optional[Dict[str, Any]]: + filter_tags = [ + { + "Key": TAG_RAY_CLUSTER_NAME, + "Value": self.cluster_name, + }, + {"Key": TAG_RAY_NODE_KIND, "Value": tags[TAG_RAY_NODE_KIND]}, + {"Key": TAG_RAY_USER_NODE_TYPE, "Value": tags[TAG_RAY_USER_NODE_TYPE]}, + {"Key": TAG_RAY_LAUNCH_CONFIG, "Value": tags[TAG_RAY_LAUNCH_CONFIG]}, + {"Key": TAG_RAY_NODE_NAME, "Value": tags[TAG_RAY_NODE_NAME]}, + ] + + reused_nodes_dict = {} + if self.cache_stopped_nodes: + reuse_nodes_candidate = self.acs.describe_instances(tags=filter_tags) + if reuse_nodes_candidate: + with cli_logger.group("Stopping instances to reuse"): + reuse_node_ids = [] + for node in reuse_nodes_candidate: + node_id = node.get("InstanceId") + status = node.get("Status") + if status != STOPPING and status != STOPPED: + continue + if status == STOPPING: + # wait for node stopped + while ( + self.acs.describe_instances(instance_ids=[node_id])[ + 0 + ].get("Status") + == STOPPING + ): + logging.info("wait for %s stop" % node_id) + time.sleep(STOPPING_NODE_DELAY) + # logger.info("reuse %s" % node_id) + reuse_node_ids.append(node_id) + reused_nodes_dict[node.get("InstanceId")] = node + self.acs.start_instance(node_id) + self.tag_cache[node_id] = node.get("Tags") + self.set_node_tags(node_id, tags) + if len(reuse_node_ids) == count: + break + count -= len(reuse_node_ids) + + created_nodes_dict = {} + if count > 0: + filter_tags.append( + {"Key": TAG_RAY_NODE_STATUS, "Value": tags[TAG_RAY_NODE_STATUS]} + ) + instance_id_sets = self.acs.run_instances( + instance_type=node_config["InstanceType"], + image_id=node_config["ImageId"], + tags=filter_tags, + amount=count, + vswitch_id=self.provider_config["v_switch_id"], + security_group_id=self.provider_config["security_group_id"], + key_pair_name=self.provider_config["key_name"], + ) + instances = self.acs.describe_instances(instance_ids=instance_id_sets) + + if instances is not None: + for instance in instances: + created_nodes_dict[instance.get("InstanceId")] = instance + + all_created_nodes = reused_nodes_dict + all_created_nodes.update(created_nodes_dict) + return all_created_nodes + + def terminate_node(self, node_id: str) -> None: + logger.info("terminate node: %s" % node_id) + if self.cache_stopped_nodes: + logger.info( + "Stopping instance {} (to terminate instead, " + "set `cache_stopped_nodes: False` " + "under `provider` in the cluster configuration)" + ).format(node_id) + self.acs.stop_instance(node_id) + else: + self.acs.delete_instance(node_id) + + def terminate_nodes(self, node_ids: List[str]) -> None: + if not node_ids: + return + if self.cache_stopped_nodes: + logger.info( + "Stopping instances {} (to terminate instead, " + "set `cache_stopped_nodes: False` " + "under `provider` in the cluster configuration)".format(node_ids) + ) + + self.acs.stop_instances(node_ids) + else: + self.acs.delete_instances(node_ids) + + def _get_node(self, node_id): + """Refresh and get info for this node, updating the cache.""" + self.non_terminated_nodes({}) # Side effect: updates cache + + if node_id in self.cached_nodes: + return self.cached_nodes[node_id] + + # Node not in {pending, running} -- retry with a point query. This + # usually means the node was recently preempted or terminated. + matches = self.acs.describe_instances(instance_ids=[node_id]) + + assert len(matches) == 1, "Invalid instance id {}".format(node_id) + return matches[0] + + def _get_cached_node(self, node_id): + """Return node info from cache if possible, otherwise fetches it.""" + if node_id in self.cached_nodes: + return self.cached_nodes[node_id] + + return self._get_node(node_id) + + @staticmethod + def bootstrap_config(cluster_config): + return bootstrap_aliyun(cluster_config) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/utils.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..a1bb3c2710a7b73cd965f917d903c785a83bb1a3 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aliyun/utils.py @@ -0,0 +1,461 @@ +import json +import logging + +from aliyunsdkcore import client +from aliyunsdkcore.acs_exception.exceptions import ClientException, ServerException +from aliyunsdkecs.request.v20140526.AllocatePublicIpAddressRequest import ( + AllocatePublicIpAddressRequest, +) +from aliyunsdkecs.request.v20140526.AuthorizeSecurityGroupRequest import ( + AuthorizeSecurityGroupRequest, +) +from aliyunsdkecs.request.v20140526.CreateInstanceRequest import CreateInstanceRequest +from aliyunsdkecs.request.v20140526.CreateKeyPairRequest import CreateKeyPairRequest +from aliyunsdkecs.request.v20140526.CreateSecurityGroupRequest import ( + CreateSecurityGroupRequest, +) +from aliyunsdkecs.request.v20140526.CreateVpcRequest import CreateVpcRequest +from aliyunsdkecs.request.v20140526.CreateVSwitchRequest import CreateVSwitchRequest +from aliyunsdkecs.request.v20140526.DeleteInstanceRequest import DeleteInstanceRequest +from aliyunsdkecs.request.v20140526.DeleteInstancesRequest import DeleteInstancesRequest +from aliyunsdkecs.request.v20140526.DeleteKeyPairsRequest import DeleteKeyPairsRequest +from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import ( + DescribeInstancesRequest, +) +from aliyunsdkecs.request.v20140526.DescribeKeyPairsRequest import ( + DescribeKeyPairsRequest, +) +from aliyunsdkecs.request.v20140526.DescribeSecurityGroupsRequest import ( + DescribeSecurityGroupsRequest, +) +from aliyunsdkecs.request.v20140526.DescribeVpcsRequest import DescribeVpcsRequest +from aliyunsdkecs.request.v20140526.DescribeVSwitchesRequest import ( + DescribeVSwitchesRequest, +) +from aliyunsdkecs.request.v20140526.ImportKeyPairRequest import ImportKeyPairRequest +from aliyunsdkecs.request.v20140526.RunInstancesRequest import RunInstancesRequest +from aliyunsdkecs.request.v20140526.StartInstanceRequest import StartInstanceRequest +from aliyunsdkecs.request.v20140526.StopInstanceRequest import StopInstanceRequest +from aliyunsdkecs.request.v20140526.StopInstancesRequest import StopInstancesRequest +from aliyunsdkecs.request.v20140526.TagResourcesRequest import TagResourcesRequest + + +class AcsClient: + """ + A wrapper around Aliyun SDK. We use this wrapper in aliyun node provider. + + Parameters: + access_key: The AccessKey ID of your aliyun account. + access_key_secret: The AccessKey secret of your aliyun account. + region_id: A region is a geographic area where a data center resides. + Region_id is the ID of region (e.g., cn-hangzhou, + us-west-1, etc.) + max_retries: The maximum number of retries each connection. + """ + + def __init__(self, access_key, access_key_secret, region_id, max_retries): + self.cli = client.AcsClient( + ak=access_key, + secret=access_key_secret, + max_retry_time=max_retries, + region_id=region_id, + ) + + def describe_instances(self, tags=None, instance_ids=None): + """Query the details of one or more Elastic Compute Service (ECS) instances. + + :param tags: The tags of the instance. + :param instance_ids: The IDs of ECS instances + :return: ECS instance list + """ + request = DescribeInstancesRequest() + if tags is not None: + request.set_Tags(tags) + if instance_ids is not None: + request.set_InstanceIds(instance_ids) + response = self._send_request(request) + if response is not None: + instance_list = response.get("Instances").get("Instance") + return instance_list + return None + + def create_instance( + self, + instance_type, + image_id, + tags, + key_pair_name, + optimized="optimized", + instance_charge_type="PostPaid", + spot_strategy="SpotWithPriceLimit", + internet_charge_type="PayByTraffic", + internet_max_bandwidth_out=5, + ): + """Create a subscription or pay-as-you-go ECS instance. + + :param instance_type: The instance type of the ECS. + :param image_id: The ID of the image used to create the instance. + :param tags: The tags of the instance. + :param key_pair_name: The name of the key pair to be bound to + the instance. + :param optimized: Specifies whether the instance is I/O optimized + :param instance_charge_type: The billing method of the instance. + Default value: PostPaid. + :param spot_strategy: The preemption policy for the pay-as-you-go + instance. + :param internet_charge_type: The billing method for network usage. + Default value: PayByTraffic. + :param internet_max_bandwidth_out: The maximum inbound public + bandwidth. Unit: Mbit/s. + :return: The created instance ID. + """ + request = CreateInstanceRequest() + request.set_InstanceType(instance_type) + request.set_ImageId(image_id) + request.set_IoOptimized(optimized) + request.set_InstanceChargeType(instance_charge_type) + request.set_SpotStrategy(spot_strategy) + request.set_InternetChargeType(internet_charge_type) + request.set_InternetMaxBandwidthOut(internet_max_bandwidth_out) + request.set_KeyPairName(key_pair_name) + request.set_Tags(tags) + + response = self._send_request(request) + if response is not None: + instance_id = response.get("InstanceId") + logging.info("instance %s created task submit successfully.", instance_id) + return instance_id + logging.error("instance created failed.") + return None + + def run_instances( + self, + instance_type, + image_id, + tags, + security_group_id, + vswitch_id, + key_pair_name, + amount=1, + optimized="optimized", + instance_charge_type="PostPaid", + spot_strategy="SpotWithPriceLimit", + internet_charge_type="PayByTraffic", + internet_max_bandwidth_out=1, + ): + """Create one or more pay-as-you-go or subscription + Elastic Compute Service (ECS) instances + + :param instance_type: The instance type of the ECS. + :param image_id: The ID of the image used to create the instance. + :param tags: The tags of the instance. + :param security_group_id: The ID of the security group to which to + assign the instance. Instances in the same + security group can communicate with + each other. + :param vswitch_id: The ID of the vSwitch to which to connect + the instance. + :param key_pair_name: The name of the key pair to be bound to + the instance. + :param amount: The number of instances that you want to create. + :param optimized: Specifies whether the instance is I/O optimized + :param instance_charge_type: The billing method of the instance. + Default value: PostPaid. + :param spot_strategy: The preemption policy for the pay-as-you-go + instance. + :param internet_charge_type: The billing method for network usage. + Default value: PayByTraffic. + :param internet_max_bandwidth_out: The maximum inbound public + bandwidth. Unit: Mbit/s. + :return: The created instance IDs. + """ + request = RunInstancesRequest() + request.set_InstanceType(instance_type) + request.set_ImageId(image_id) + request.set_IoOptimized(optimized) + request.set_InstanceChargeType(instance_charge_type) + request.set_SpotStrategy(spot_strategy) + request.set_InternetChargeType(internet_charge_type) + request.set_InternetMaxBandwidthOut(internet_max_bandwidth_out) + request.set_Tags(tags) + request.set_Amount(amount) + request.set_SecurityGroupId(security_group_id) + request.set_VSwitchId(vswitch_id) + request.set_KeyPairName(key_pair_name) + + response = self._send_request(request) + if response is not None: + instance_ids = response.get("InstanceIdSets").get("InstanceIdSet") + return instance_ids + logging.error("instance created failed.") + return None + + def create_security_group(self, vpc_id): + """Create a security group + + :param vpc_id: The ID of the VPC in which to create + the security group. + :return: The created security group ID. + """ + request = CreateSecurityGroupRequest() + request.set_VpcId(vpc_id) + response = self._send_request(request) + if response is not None: + security_group_id = response.get("SecurityGroupId") + return security_group_id + return None + + def describe_security_groups(self, vpc_id=None, tags=None): + """Query basic information of security groups. + + :param vpc_id: The ID of the VPC to which the security group belongs. + :param tags: The tags of the security group. + :return: Security group list. + """ + request = DescribeSecurityGroupsRequest() + if vpc_id is not None: + request.set_VpcId(vpc_id) + if tags is not None: + request.set_Tags(tags) + response = self._send_request(request) + if response is not None: + security_groups = response.get("SecurityGroups").get("SecurityGroup") + return security_groups + logging.error("describe security group failed.") + return None + + def authorize_security_group( + self, ip_protocol, port_range, security_group_id, source_cidr_ip + ): + """Create an inbound security group rule. + + :param ip_protocol: The transport layer protocol. + :param port_range: The range of destination ports relevant to + the transport layer protocol. + :param security_group_id: The ID of the destination security group. + :param source_cidr_ip: The range of source IPv4 addresses. + CIDR blocks and IPv4 addresses are supported. + """ + request = AuthorizeSecurityGroupRequest() + request.set_IpProtocol(ip_protocol) + request.set_PortRange(port_range) + request.set_SecurityGroupId(security_group_id) + request.set_SourceCidrIp(source_cidr_ip) + self._send_request(request) + + def create_v_switch(self, vpc_id, zone_id, cidr_block): + """Create vSwitches to divide the VPC into one or more subnets + + :param vpc_id: The ID of the VPC to which the VSwitch belongs. + :param zone_id: The ID of the zone to which + the target VSwitch belongs. + :param cidr_block: The CIDR block of the VSwitch. + :return: + """ + request = CreateVSwitchRequest() + request.set_ZoneId(zone_id) + request.set_VpcId(vpc_id) + request.set_CidrBlock(cidr_block) + response = self._send_request(request) + if response is not None: + return response.get("VSwitchId") + else: + logging.error("create_v_switch vpc_id %s failed.", vpc_id) + return None + + def create_vpc(self): + """Creates a virtual private cloud (VPC). + + :return: The created VPC ID. + """ + request = CreateVpcRequest() + response = self._send_request(request) + if response is not None: + return response.get("VpcId") + return None + + def describe_vpcs(self): + """Queries one or more VPCs in a region. + + :return: VPC list. + """ + request = DescribeVpcsRequest() + response = self._send_request(request) + if response is not None: + return response.get("Vpcs").get("Vpc") + return None + + def tag_resource(self, resource_ids, tags, resource_type="instance"): + """Create and bind tags to specified ECS resources. + + :param resource_ids: The IDs of N resources. + :param tags: The tags of the resource. + :param resource_type: The type of the resource. + """ + request = TagResourcesRequest() + request.set_Tags(tags) + request.set_ResourceType(resource_type) + request.set_ResourceIds(resource_ids) + response = self._send_request(request) + if response is not None: + logging.info("instance %s create tag successfully.", resource_ids) + else: + logging.error("instance %s create tag failed.", resource_ids) + + def start_instance(self, instance_id): + """Start an ECS instance. + + :param instance_id: The Ecs instance ID. + """ + request = StartInstanceRequest() + request.set_InstanceId(instance_id) + response = self._send_request(request) + + if response is not None: + logging.info("instance %s start successfully.", instance_id) + else: + logging.error("instance %s start failed.", instance_id) + + def stop_instance(self, instance_id, force_stop=False): + """Stop an ECS instance that is in the Running state. + + :param instance_id: The Ecs instance ID. + :param force_stop: Specifies whether to forcibly stop the instance. + :return: + """ + request = StopInstanceRequest() + request.set_InstanceId(instance_id) + request.set_ForceStop(force_stop) + logging.info("Stop %s command submit successfully.", instance_id) + self._send_request(request) + + def stop_instances(self, instance_ids, stopped_mode="StopCharging"): + """Stop one or more ECS instances that are in the Running state. + + :param instance_ids: The IDs of instances. + :param stopped_mode: Specifies whether billing for the instance + continues after the instance is stopped. + """ + request = StopInstancesRequest() + request.set_InstanceIds(instance_ids) + request.set_StoppedMode(stopped_mode) + response = self._send_request(request) + if response is None: + logging.error("stop_instances failed") + + def delete_instance(self, instance_id): + """Release a pay-as-you-go instance or + an expired subscription instance. + + :param instance_id: The ID of the instance that you want to release. + """ + request = DeleteInstanceRequest() + request.set_InstanceId(instance_id) + request.set_Force(True) + logging.info("Delete %s command submit successfully", instance_id) + self._send_request(request) + + def delete_instances(self, instance_ids): + """Release one or more pay-as-you-go instances or + expired subscription instances. + + :param instance_ids: The IDs of instances that you want to release. + """ + request = DeleteInstancesRequest() + request.set_Force(True) + request.set_InstanceIds(instance_ids) + self._send_request(request) + + def allocate_public_address(self, instance_id): + """Assign a public IP address to an ECS instance. + + :param instance_id: The ID of the instance to which you want to + assign a public IP address. + :return: The assigned ip. + """ + request = AllocatePublicIpAddressRequest() + request.set_InstanceId(instance_id) + response = self._send_request(request) + if response is not None: + return response.get("IpAddress") + + def create_key_pair(self, key_pair_name): + """Create an SSH key pair. + + :param key_pair_name: The name of the key pair. + :return: The created keypair data. + """ + request = CreateKeyPairRequest() + request.set_KeyPairName(key_pair_name) + response = self._send_request(request) + if response is not None: + logging.info("Create Key Pair %s Successfully", response.get("KeyPairId")) + return response + else: + logging.error("Create Key Pair Failed") + return None + + def import_key_pair(self, key_pair_name, public_key_body): + """Import the public key of an RSA-encrypted key pair + that is generated by a third-party tool. + + :param key_pair_name: The name of the key pair. + :param public_key_body: The public key of the key pair. + """ + request = ImportKeyPairRequest() + request.set_KeyPairName(key_pair_name) + request.set_PublicKeyBody(public_key_body) + self._send_request(request) + + def delete_key_pairs(self, key_pair_names): + """Delete one or more SSH key pairs. + + :param key_pair_names: The name of the key pair. + :return: + """ + request = DeleteKeyPairsRequest() + request.set_KeyPairNames(key_pair_names) + self._send_request(request) + + def describe_key_pairs(self, key_pair_name=None): + """Query one or more key pairs. + + :param key_pair_name: The name of the key pair. + :return: + """ + request = DescribeKeyPairsRequest() + if key_pair_name is not None: + request.set_KeyPairName(key_pair_name) + response = self._send_request(request) + if response is not None: + return response.get("KeyPairs").get("KeyPair") + else: + return None + + def describe_v_switches(self, vpc_id=None): + """Queries one or more VSwitches. + + :param vpc_id: The ID of the VPC to which the VSwitch belongs. + :return: VSwitch list. + """ + request = DescribeVSwitchesRequest() + if vpc_id is not None: + request.set_VpcId(vpc_id) + response = self._send_request(request) + if response is not None: + return response.get("VSwitches").get("VSwitch") + else: + logging.error("Describe VSwitches Failed.") + return None + + def _send_request(self, request): + """send open api request""" + request.set_accept_format("json") + try: + response_str = self.cli.do_action_with_exception(request) + response_detail = json.loads(response_str) + return response_detail + except (ClientException, ServerException) as e: + logging.error(request.get_action_name()) + logging.error(e) + return None diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/autoscaler.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/autoscaler.py new file mode 100644 index 0000000000000000000000000000000000000000..2051977bf655838d025c00bc602333f409bc1474 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/autoscaler.py @@ -0,0 +1,1522 @@ +import copy +import logging +import math +import operator +import os +import queue +import subprocess +import threading +import time +from collections import Counter, defaultdict, namedtuple +from dataclasses import dataclass, field +from enum import Enum +from typing import Any, Callable, Dict, FrozenSet, List, Optional, Set, Tuple, Union + +import yaml + +import ray +from ray._common.utils import PLACEMENT_GROUP_BUNDLE_RESOURCE_NAME +from ray.autoscaler._private.constants import ( + AUTOSCALER_HEARTBEAT_TIMEOUT_S, + AUTOSCALER_MAX_CONCURRENT_LAUNCHES, + AUTOSCALER_MAX_LAUNCH_BATCH, + AUTOSCALER_MAX_NUM_FAILURES, + AUTOSCALER_STATUS_LOG, + AUTOSCALER_UPDATE_INTERVAL_S, + DISABLE_LAUNCH_CONFIG_CHECK_KEY, + DISABLE_NODE_UPDATERS_KEY, + FOREGROUND_NODE_LAUNCH_KEY, + WORKER_LIVENESS_CHECK_KEY, +) +from ray.autoscaler._private.event_summarizer import EventSummarizer +from ray.autoscaler._private.legacy_info_string import legacy_log_info_string +from ray.autoscaler._private.load_metrics import LoadMetrics +from ray.autoscaler._private.local.node_provider import ( + LocalNodeProvider, + record_local_head_state_if_needed, +) +from ray.autoscaler._private.node_launcher import BaseNodeLauncher, NodeLauncher +from ray.autoscaler._private.node_provider_availability_tracker import ( + NodeAvailabilitySummary, + NodeProviderAvailabilityTracker, +) +from ray.autoscaler._private.node_tracker import NodeTracker +from ray.autoscaler._private.prom_metrics import AutoscalerPrometheusMetrics +from ray.autoscaler._private.providers import _get_node_provider +from ray.autoscaler._private.resource_demand_scheduler import ( + ResourceDemandScheduler, + ResourceDict, + get_bin_pack_residual, + placement_groups_to_resource_demands, +) +from ray.autoscaler._private.updater import NodeUpdaterThread +from ray.autoscaler._private.util import ( + ConcurrentCounter, + NodeCount, + NodeID, + NodeIP, + NodeType, + NodeTypeConfigDict, + format_info_string, + hash_launch_conf, + hash_runtime_conf, + validate_config, + with_head_node_ip, +) +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + NODE_KIND_UNMANAGED, + NODE_KIND_WORKER, + STATUS_UP_TO_DATE, + STATUS_UPDATE_FAILED, + TAG_RAY_FILE_MOUNTS_CONTENTS, + TAG_RAY_LAUNCH_CONFIG, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_STATUS, + TAG_RAY_RUNTIME_CONFIG, + TAG_RAY_USER_NODE_TYPE, +) +from ray.exceptions import RpcError + +logger = logging.getLogger(__name__) + +# Status of a node e.g. "up-to-date", see ray/autoscaler/tags.py +NodeStatus = str + +# Tuple of modified fields for the given node_id returned by should_update +# that will be passed into a NodeUpdaterThread. +UpdateInstructions = namedtuple( + "UpdateInstructions", + ["node_id", "setup_commands", "ray_start_commands", "docker_config"], +) + +NodeLaunchData = Tuple[NodeTypeConfigDict, NodeCount, Optional[NodeType]] + + +@dataclass +class AutoscalerSummary: + active_nodes: Dict[NodeType, int] + idle_nodes: Optional[Dict[NodeType, int]] + pending_nodes: List[Tuple[NodeIP, NodeType, NodeStatus]] + pending_launches: Dict[NodeType, int] + failed_nodes: List[Tuple[NodeIP, NodeType]] + node_availability_summary: NodeAvailabilitySummary = field( + default_factory=lambda: NodeAvailabilitySummary({}) + ) + # A dictionary of node IP to a list of reasons the node is not idle. + node_activities: Optional[Dict[str, Tuple[NodeIP, List[str]]]] = None + pending_resources: Dict[str, int] = field(default_factory=lambda: {}) + # A mapping from node name (the same key as `usage_by_node`) to node type. + # Optional for deployment modes which have the concept of node types and + # backwards compatibility. + node_type_mapping: Optional[Dict[str, str]] = None + # Whether the autoscaler summary is v1 or v2. + legacy: bool = False + + +class NonTerminatedNodes: + """Class to extract and organize information on non-terminated nodes.""" + + def __init__(self, provider: NodeProvider): + start_time = time.time() + # All non-terminated nodes + self.all_node_ids = provider.non_terminated_nodes({}) + + # Managed worker nodes (node kind "worker"): + self.worker_ids: List[NodeID] = [] + # The head node (node kind "head") + self.head_id: Optional[NodeID] = None + + for node in self.all_node_ids: + node_kind = provider.node_tags(node)[TAG_RAY_NODE_KIND] + if node_kind == NODE_KIND_WORKER: + self.worker_ids.append(node) + elif node_kind == NODE_KIND_HEAD: + self.head_id = node + + # Note: For typical use-cases, self.all_node_ids == self.worker_ids + + # [self.head_id]. The difference being in the case of unmanaged nodes. + + # Record the time of the non_terminated nodes call. This typically + # translates to a "describe" or "list" call on most cluster managers + # which can be quite expensive. Note that we include the processing + # time because on some clients, there may be pagination and the + # underlying api calls may be done lazily. + self.non_terminated_nodes_time = time.time() - start_time + logger.info( + f"The autoscaler took {round(self.non_terminated_nodes_time, 3)}" + " seconds to fetch the list of non-terminated nodes." + ) + + def remove_terminating_nodes(self, terminating_nodes: List[NodeID]) -> None: + """Remove nodes we're in the process of terminating from internal + state.""" + + def not_terminating(node): + return node not in terminating_nodes + + self.worker_ids = list(filter(not_terminating, self.worker_ids)) + self.all_node_ids = list(filter(not_terminating, self.all_node_ids)) + + +# Whether a worker should be kept based on the min_workers and +# max_workers constraints. +# +# keep: should keep the worker +# terminate: should terminate the worker +# decide_later: the worker can be terminated if needed +KeepOrTerminate = Enum("KeepOrTerminate", "keep terminate decide_later") + + +class StandardAutoscaler: + """The autoscaling control loop for a Ray cluster. + + There are two ways to start an autoscaling cluster: manually by running + `ray start --head --autoscaling-config=/path/to/config.yaml` on a instance + that has permission to launch other instances, or you can also use `ray up + /path/to/config.yaml` from your laptop, which will configure the right + AWS/Cloud roles automatically. See the Ray documentation + (https://docs.ray.io/en/latest/) for a full definition of autoscaling behavior. + StandardAutoscaler's `update` method is periodically called in + `monitor.py`'s monitoring loop. + + StandardAutoscaler is also used to bootstrap clusters (by adding workers + until the cluster size that can handle the resource demand is met). + """ + + def __init__( + self, + # TODO(ekl): require config reader to be a callable always. + config_reader: Union[str, Callable[[], dict]], + load_metrics: LoadMetrics, + gcs_client: "ray._raylet.GcsClient", + session_name: Optional[str] = None, + max_launch_batch: int = AUTOSCALER_MAX_LAUNCH_BATCH, + max_concurrent_launches: int = AUTOSCALER_MAX_CONCURRENT_LAUNCHES, + max_failures: int = AUTOSCALER_MAX_NUM_FAILURES, + process_runner: Any = subprocess, + update_interval_s: int = AUTOSCALER_UPDATE_INTERVAL_S, + prefix_cluster_info: bool = False, + event_summarizer: Optional[EventSummarizer] = None, + prom_metrics: Optional[AutoscalerPrometheusMetrics] = None, + ): + """Create a StandardAutoscaler. + + Args: + config_reader: Path to a Ray Autoscaler YAML, or a function to read + and return the latest config. + load_metrics: Provides metrics for the Ray cluster. + session_name: The current Ray session name when this autoscaler + is deployed. + max_launch_batch: Max number of nodes to launch in one request. + max_concurrent_launches: Max number of nodes that can be + concurrently launched. This value and `max_launch_batch` + determine the number of batches that are used to launch nodes. + max_failures: Number of failures that the autoscaler will tolerate + before exiting. + process_runner: Subproc-like interface used by the CommandRunner. + update_interval_s: Seconds between running the autoscaling loop. + prefix_cluster_info: Whether to add the cluster name to info strs. + event_summarizer: Utility to consolidate duplicated messages. + prom_metrics: Prometheus metrics for autoscaler-related operations. + gcs_client: client for interactions with the GCS. Used to drain nodes + before termination. + """ + + if isinstance(config_reader, str): + # Auto wrap with file reader. + def read_fn(): + with open(config_reader) as f: + new_config = yaml.safe_load(f.read()) + return new_config + + self.config_reader = read_fn + else: + self.config_reader = config_reader + + self.node_provider_availability_tracker = NodeProviderAvailabilityTracker() + # Prefix each line of info string with cluster name if True + self.prefix_cluster_info = prefix_cluster_info + # Keep this before self.reset (self.provider needs to be created + # exactly once). + self.provider = None + # Keep this before self.reset (if an exception occurs in reset + # then prom_metrics must be instantitiated to increment the + # exception counter) + self.prom_metrics = prom_metrics or AutoscalerPrometheusMetrics( + session_name=session_name + ) # noqa + self.resource_demand_scheduler = None + self.reset(errors_fatal=True) + self.load_metrics = load_metrics + + self.max_failures = max_failures + self.max_launch_batch = max_launch_batch + self.max_concurrent_launches = max_concurrent_launches + self.process_runner = process_runner + self.event_summarizer = event_summarizer or EventSummarizer() + + # Map from node_id to NodeUpdater threads + self.updaters: Dict[NodeID, NodeUpdaterThread] = {} + self.num_failed_updates: Dict[NodeID, int] = defaultdict(int) + self.num_successful_updates: Dict[NodeID, int] = defaultdict(int) + self.num_failures = 0 + self.last_update_time = 0.0 + self.update_interval_s = update_interval_s + + # Keeps track of pending and running nodes + self.non_terminated_nodes: Optional[NonTerminatedNodes] = None + + # Tracks nodes scheduled for termination + self.nodes_to_terminate: List[NodeID] = [] + + # Disable NodeUpdater threads if true. + # Should be set to true in situations where another component, such as + # a Kubernetes operator, is responsible for Ray setup on nodes. + self.disable_node_updaters = self.config["provider"].get( + DISABLE_NODE_UPDATERS_KEY, False + ) + logger.info(f"{DISABLE_NODE_UPDATERS_KEY}:{self.disable_node_updaters}") + + # Disable launch configuration checking if set to true. + # This setting is used in scenarios where there is no meaningful node type + # to enforce, such as in fake multinode situations. When this option is enabled, + # outdated nodes will not be terminated. + self.disable_launch_config_check = self.config["provider"].get( + DISABLE_LAUNCH_CONFIG_CHECK_KEY, False + ) + logger.info( + f"{DISABLE_LAUNCH_CONFIG_CHECK_KEY}:{self.disable_launch_config_check}" + ) + + # By default, the autoscaler launches nodes in batches asynchronously in + # background threads. + # When the following flag is set, that behavior is disabled, so that nodes + # are launched in the main thread, all in one batch, blocking until all + # NodeProvider.create_node calls have returned. + self.foreground_node_launch = self.config["provider"].get( + FOREGROUND_NODE_LAUNCH_KEY, False + ) + logger.info(f"{FOREGROUND_NODE_LAUNCH_KEY}:{self.foreground_node_launch}") + + # By default, the autoscaler kills and/or tries to recover + # a worker node if it hasn't produced a resource heartbeat in the last 30 + # seconds. The worker_liveness_check flag allows disabling this behavior in + # settings where another component, such as a Kubernetes operator, is + # responsible for healthchecks. + self.worker_liveness_check = self.config["provider"].get( + WORKER_LIVENESS_CHECK_KEY, True + ) + logger.info(f"{WORKER_LIVENESS_CHECK_KEY}:{self.worker_liveness_check}") + + # Node launchers + self.foreground_node_launcher: Optional[BaseNodeLauncher] = None + self.launch_queue: Optional[queue.Queue[NodeLaunchData]] = None + self.pending_launches = ConcurrentCounter() + if self.foreground_node_launch: + self.foreground_node_launcher = BaseNodeLauncher( + provider=self.provider, + pending=self.pending_launches, + event_summarizer=self.event_summarizer, + node_provider_availability_tracker=self.node_provider_availability_tracker, # noqa: E501 Flake and black disagree how to format this. + session_name=session_name, + node_types=self.available_node_types, + prom_metrics=self.prom_metrics, + ) + else: + self.launch_queue = queue.Queue() + max_batches = math.ceil(max_concurrent_launches / float(max_launch_batch)) + for i in range(int(max_batches)): + node_launcher = NodeLauncher( + provider=self.provider, + queue=self.launch_queue, + index=i, + pending=self.pending_launches, + event_summarizer=self.event_summarizer, + node_provider_availability_tracker=self.node_provider_availability_tracker, # noqa: E501 Flake and black disagreee how to format this. + session_name=session_name, + node_types=self.available_node_types, + prom_metrics=self.prom_metrics, + ) + node_launcher.daemon = True + node_launcher.start() + + # NodeTracker maintains soft state to track the number of recently + # failed nodes. It is best effort only. + self.node_tracker = NodeTracker() + + # Expand local file_mounts to allow ~ in the paths. This can't be done + # earlier when the config is written since we might be on different + # platform and the expansion would result in wrong path. + self.config["file_mounts"] = { + remote: os.path.expanduser(local) + for remote, local in self.config["file_mounts"].items() + } + + self.gcs_client = gcs_client + + for local_path in self.config["file_mounts"].values(): + assert os.path.exists(local_path) + logger.info("StandardAutoscaler: {}".format(self.config)) + + @property + def all_node_types(self) -> Set[str]: + return self.config["available_node_types"].keys() + + def update(self): + try: + self.reset(errors_fatal=False) + self._update() + except Exception as e: + self.prom_metrics.update_loop_exceptions.inc() + logger.exception("StandardAutoscaler: Error during autoscaling.") + self.num_failures += 1 + if self.num_failures > self.max_failures: + logger.critical("StandardAutoscaler: Too many errors, abort.") + raise e + + def _update(self): + # For type checking, assert that these objects have been instantitiated. + assert self.provider + assert self.resource_demand_scheduler + + now = time.time() + # Throttle autoscaling updates to this interval to avoid exceeding + # rate limits on API calls. + if now - self.last_update_time < self.update_interval_s: + return + + self.last_update_time = now + + # Query the provider to update the list of non-terminated nodes + self.non_terminated_nodes = NonTerminatedNodes(self.provider) + + # Back off the update if the provider says it's not safe to proceed. + if not self.provider.safe_to_scale(): + logger.info( + "Backing off of autoscaler update." + f" Will try again in {self.update_interval_s} seconds." + ) + return + + # This will accumulate the nodes we need to terminate. + self.nodes_to_terminate = [] + + # Update status strings + if AUTOSCALER_STATUS_LOG: + logger.info(self.info_string()) + legacy_log_info_string(self, self.non_terminated_nodes.worker_ids) + + if not self.provider.is_readonly(): + self.terminate_nodes_to_enforce_config_constraints(now) + + if self.disable_node_updaters: + # Don't handle unhealthy nodes if the liveness check is disabled. + # self.worker_liveness_check is True by default. + if self.worker_liveness_check: + self.terminate_unhealthy_nodes(now) + else: + self.process_completed_updates() + self.update_nodes() + # Don't handle unhealthy nodes if the liveness check is disabled. + # self.worker_liveness_check is True by default. + if self.worker_liveness_check: + self.attempt_to_recover_unhealthy_nodes(now) + self.set_prometheus_updater_data() + + # Update running nodes gauge + num_workers = len(self.non_terminated_nodes.worker_ids) + self.prom_metrics.running_workers.set(num_workers) + + # Remove IPs from LoadMetrics that are not known to the NodeProvider. + self.load_metrics.prune_active_ips( + active_ips=[ + self.provider.internal_ip(node_id) + for node_id in self.non_terminated_nodes.all_node_ids + ] + ) + + # Dict[NodeType, int], List[ResourceDict] + to_launch, unfulfilled = self.resource_demand_scheduler.get_nodes_to_launch( + self.non_terminated_nodes.all_node_ids, + self.pending_launches.breakdown(), + self.load_metrics.get_resource_demand_vector(), + self.load_metrics.get_resource_utilization(), + self.load_metrics.get_pending_placement_groups(), + self.load_metrics.get_static_node_resources_by_ip(), + ensure_min_cluster_size=self.load_metrics.get_resource_requests(), + node_availability_summary=self.node_provider_availability_tracker.summary(), + ) + self._report_pending_infeasible(unfulfilled) + + if not self.provider.is_readonly(): + self.launch_required_nodes(to_launch) + + # Execute optional end-of-update logic. + # Keep this method call at the end of autoscaler._update(). + self.provider.post_process() + + # Record the amount of time the autoscaler took for + # this _update() iteration. + update_time = time.time() - self.last_update_time + logger.info( + f"The autoscaler took {round(update_time, 3)}" + " seconds to complete the update iteration." + ) + self.prom_metrics.update_time.observe(update_time) + + def terminate_nodes_to_enforce_config_constraints(self, now: float): + """Terminates nodes to enforce constraints defined by the autoscaling + config. + + (1) Terminates nodes in excess of `max_workers`. + (2) Terminates nodes idle for longer than `idle_timeout_minutes`. + (3) Terminates outdated nodes, + namely nodes whose configs don't match `node_config` for the + relevant node type. + + Avoids terminating non-outdated nodes required by + autoscaler.sdk.request_resources(). + """ + # For type checking, assert that these objects have been instantitiated. + assert self.non_terminated_nodes + assert self.provider + + last_used = self.load_metrics.ray_nodes_last_used_time_by_ip + + idle_timeout_s = 60 * self.config["idle_timeout_minutes"] + + last_used_cutoff = now - idle_timeout_s + + # Sort based on last used to make sure to keep min_workers that + # were most recently used. Otherwise, _keep_min_workers_of_node_type + # might keep a node that should be terminated. + sorted_node_ids = self._sort_based_on_last_used( + self.non_terminated_nodes.worker_ids, last_used + ) + + # Don't terminate nodes needed by request_resources() + nodes_not_allowed_to_terminate = self._get_nodes_needed_for_request_resources( + sorted_node_ids + ) + + # Tracks counts of nodes we intend to keep for each node type. + node_type_counts = defaultdict(int) + + def keep_node(node_id: NodeID) -> None: + assert self.provider + # Update per-type counts. + tags = self.provider.node_tags(node_id) + if TAG_RAY_USER_NODE_TYPE in tags: + node_type = tags[TAG_RAY_USER_NODE_TYPE] + node_type_counts[node_type] += 1 + + # Nodes that we could terminate, if needed. + nodes_we_could_terminate: List[NodeID] = [] + + for node_id in sorted_node_ids: + # Make sure to not kill idle node types if the number of workers + # of that type is lower/equal to the min_workers of that type + # or it is needed for request_resources(). + should_keep_or_terminate, reason = self._keep_worker_of_node_type( + node_id, node_type_counts + ) + if should_keep_or_terminate == KeepOrTerminate.terminate: + self.schedule_node_termination(node_id, reason, logger.info) + continue + if ( + should_keep_or_terminate == KeepOrTerminate.keep + or node_id in nodes_not_allowed_to_terminate + ) and self.launch_config_ok(node_id): + keep_node(node_id) + continue + + node_ip = self.provider.internal_ip(node_id) + + if node_ip in last_used and last_used[node_ip] < last_used_cutoff: + self.schedule_node_termination(node_id, "idle", logger.info) + # Get the local time of the node's last use as a string. + formatted_last_used_time = time.asctime( + time.localtime(last_used[node_ip]) + ) + logger.info(f"Node last used: {formatted_last_used_time}.") + # Note that the current time will appear in the log prefix. + elif not self.launch_config_ok(node_id): + self.schedule_node_termination(node_id, "outdated", logger.info) + else: + keep_node(node_id) + nodes_we_could_terminate.append(node_id) + + # Terminate nodes if there are too many + num_workers = len(self.non_terminated_nodes.worker_ids) + num_extra_nodes_to_terminate = ( + num_workers - len(self.nodes_to_terminate) - self.config["max_workers"] + ) + + if num_extra_nodes_to_terminate > len(nodes_we_could_terminate): + logger.warning( + "StandardAutoscaler: trying to terminate " + f"{num_extra_nodes_to_terminate} nodes, while only " + f"{len(nodes_we_could_terminate)} are safe to terminate." + " Inconsistent config is likely." + ) + num_extra_nodes_to_terminate = len(nodes_we_could_terminate) + + # If num_extra_nodes_to_terminate is negative or zero, + # we would have less than max_workers nodes after terminating + # nodes_to_terminate and we do not need to terminate anything else. + if num_extra_nodes_to_terminate > 0: + extra_nodes_to_terminate = nodes_we_could_terminate[ + -num_extra_nodes_to_terminate: + ] + for node_id in extra_nodes_to_terminate: + self.schedule_node_termination(node_id, "max workers", logger.info) + + self.terminate_scheduled_nodes() + + def schedule_node_termination( + self, node_id: NodeID, reason_opt: Optional[str], logger_method: Callable + ) -> None: + # For type checking, assert that this object has been instantitiated. + assert self.provider + + if reason_opt is None: + raise Exception("reason should be not None.") + reason: str = reason_opt + node_ip = self.provider.internal_ip(node_id) + # Log, record an event, and add node_id to nodes_to_terminate. + logger_method( + "StandardAutoscaler: " + f"Terminating the node with id {node_id}" + f" and ip {node_ip}." + f" ({reason})" + ) + self.event_summarizer.add( + "Removing {} nodes of type " + + self._get_node_type(node_id) + + " ({}).".format(reason), + quantity=1, + aggregate=operator.add, + ) + self.nodes_to_terminate.append(node_id) + + def terminate_scheduled_nodes(self): + """Terminate scheduled nodes and clean associated autoscaler state.""" + # For type checking, assert that these objects have been instantitiated. + assert self.provider + assert self.non_terminated_nodes + + if not self.nodes_to_terminate: + return + + # Drain the nodes + self.drain_nodes_via_gcs(self.nodes_to_terminate) + # Terminate the nodes + self.provider.terminate_nodes(self.nodes_to_terminate) + for node in self.nodes_to_terminate: + self.node_tracker.untrack(node) + self.prom_metrics.stopped_nodes.inc() + + # Update internal node lists + self.non_terminated_nodes.remove_terminating_nodes(self.nodes_to_terminate) + + self.nodes_to_terminate = [] + + def drain_nodes_via_gcs(self, provider_node_ids_to_drain: List[NodeID]): + """Send an RPC request to the GCS to drain (prepare for termination) + the nodes with the given node provider ids. + + note: The current implementation of DrainNode on the GCS side is to + de-register and gracefully shut down the Raylets. In the future, + the behavior may change to better reflect the name "Drain." + See https://github.com/ray-project/ray/pull/19350. + """ + # For type checking, assert that this object has been instantitiated. + assert self.provider + + # The GCS expects Node ids in the request, rather than NodeProvider + # ids. To get the Node ids of the nodes to we're draining, we make + # the following translations of identifiers: + # node provider node id -> ip -> node id + + # Convert node provider node ids to ips. + node_ips = set() + failed_ip_fetch = False + for provider_node_id in provider_node_ids_to_drain: + # If the provider's call to fetch ip fails, the exception is not + # fatal. Log the exception and proceed. + try: + ip = self.provider.internal_ip(provider_node_id) + node_ips.add(ip) + except Exception: + logger.exception( + "Failed to get ip of node with id" + f" {provider_node_id} during scale-down." + ) + failed_ip_fetch = True + if failed_ip_fetch: + self.prom_metrics.drain_node_exceptions.inc() + + # Only attempt to drain connected nodes, i.e. nodes with ips in + # LoadMetrics. + connected_node_ips = node_ips & self.load_metrics.node_id_by_ip.keys() + + # Convert ips to Node ids. + # (The assignment ip->node_id is well-defined under current + # assumptions. See "use_node_id_as_ip" in monitor.py) + node_ids_to_drain = { + self.load_metrics.node_id_by_ip[ip] for ip in connected_node_ips + } + + if not node_ids_to_drain: + return + + logger.info(f"Draining {len(node_ids_to_drain)} raylet(s).") + try: + # A successful response indicates that the GCS has marked the + # desired nodes as "drained." The cloud provider can then terminate + # the nodes without the GCS printing an error. + # Check if we succeeded in draining all of the intended nodes by + # looking at the RPC response. + drained_node_ids = set( + self.gcs_client.drain_nodes(node_ids_to_drain, timeout=5) + ) + failed_to_drain = node_ids_to_drain - drained_node_ids + if failed_to_drain: + self.prom_metrics.drain_node_exceptions.inc() + logger.error(f"Failed to drain {len(failed_to_drain)} raylet(s).") + # If we get a gRPC error with an UNIMPLEMENTED code, fail silently. + # This error indicates that the GCS is using Ray version < 1.8.0, + # for which DrainNode is not implemented. + except RpcError as e: + # If the code is UNIMPLEMENTED, pass. + if e.rpc_code == ray._raylet.GRPC_STATUS_CODE_UNIMPLEMENTED: + pass + # Otherwise, it's a plain old gRPC error and we should log it. + else: + self.prom_metrics.drain_node_exceptions.inc() + logger.exception("Failed to drain Ray nodes. Traceback follows.") + except Exception: + # We don't need to interrupt the autoscaler update with an + # exception, but we should log what went wrong and record the + # failure in Prometheus. + self.prom_metrics.drain_node_exceptions.inc() + logger.exception("Failed to drain Ray nodes. Traceback follows.") + + def launch_required_nodes(self, to_launch: Dict[NodeType, int]) -> None: + if to_launch: + for node_type, count in to_launch.items(): + self.launch_new_node(count, node_type=node_type) + + def update_nodes(self): + """Run NodeUpdaterThreads to run setup commands, sync files, + and/or start Ray. + """ + # Update nodes with out-of-date files. + # TODO(edoakes): Spawning these threads directly seems to cause + # problems. They should at a minimum be spawned as daemon threads. + # See https://github.com/ray-project/ray/pull/5903 for more info. + T = [] + for node_id, setup_commands, ray_start_commands, docker_config in ( + self.should_update(node_id) + for node_id in self.non_terminated_nodes.worker_ids + ): + if node_id is not None: + resources = self._node_resources(node_id) + labels = self._node_labels(node_id) + logger.debug(f"{node_id}: Starting new thread runner.") + T.append( + threading.Thread( + target=self.spawn_updater, + args=( + node_id, + setup_commands, + ray_start_commands, + resources, + labels, + docker_config, + ), + ) + ) + for t in T: + t.start() + for t in T: + t.join() + + def process_completed_updates(self): + """Clean up completed NodeUpdaterThreads.""" + completed_nodes = [] + for node_id, updater in self.updaters.items(): + if not updater.is_alive(): + completed_nodes.append(node_id) + if completed_nodes: + failed_nodes = [] + for node_id in completed_nodes: + updater = self.updaters[node_id] + if updater.exitcode == 0: + self.num_successful_updates[node_id] += 1 + self.prom_metrics.successful_updates.inc() + if updater.for_recovery: + self.prom_metrics.successful_recoveries.inc() + if updater.update_time: + self.prom_metrics.worker_update_time.observe( + updater.update_time + ) + # Mark the node as active to prevent the node recovery + # logic immediately trying to restart Ray on the new node. + self.load_metrics.mark_active(self.provider.internal_ip(node_id)) + else: + failed_nodes.append(node_id) + self.num_failed_updates[node_id] += 1 + self.prom_metrics.failed_updates.inc() + if updater.for_recovery: + self.prom_metrics.failed_recoveries.inc() + self.node_tracker.untrack(node_id) + del self.updaters[node_id] + + if failed_nodes: + # Some nodes in failed_nodes may already have been terminated + # during an update (for being idle after missing a heartbeat). + + # Update the list of non-terminated workers. + for node_id in failed_nodes: + # Check if the node has already been terminated. + if node_id in self.non_terminated_nodes.worker_ids: + self.schedule_node_termination( + node_id, "launch failed", logger.error + ) + else: + logger.warning( + f"StandardAutoscaler: {node_id}:" + " Failed to update node." + " Node has already been terminated." + ) + self.terminate_scheduled_nodes() + + def set_prometheus_updater_data(self): + """Record total number of active NodeUpdaterThreads and how many of + these are being run to recover nodes. + """ + self.prom_metrics.updating_nodes.set(len(self.updaters)) + num_recovering = 0 + for updater in self.updaters.values(): + if updater.for_recovery: + num_recovering += 1 + self.prom_metrics.recovering_nodes.set(num_recovering) + + def _report_pending_infeasible(self, unfulfilled: List[ResourceDict]): + """Emit event messages for infeasible or unschedulable tasks. + + This adds messages to the event summarizer for warning on infeasible + or "cluster full" resource requests. + + Args: + unfulfilled: List of resource demands that would be unfulfilled + even after full scale-up. + """ + # For type checking, assert that this object has been instantitiated. + assert self.resource_demand_scheduler + pending = [] + infeasible = [] + for bundle in unfulfilled: + placement_group = any( + "_group_" in k or k == PLACEMENT_GROUP_BUNDLE_RESOURCE_NAME + for k in bundle + ) + if placement_group: + continue + if self.resource_demand_scheduler.is_feasible(bundle): + pending.append(bundle) + else: + infeasible.append(bundle) + if pending: + if self.load_metrics.cluster_full_of_actors_detected: + for request in pending: + self.event_summarizer.add_once_per_interval( + "Warning: The following resource request cannot be " + "scheduled right now: {}. This is likely due to all " + "cluster resources being claimed by actors. Consider " + "creating fewer actors or adding more nodes " + "to this Ray cluster.".format(request), + key="pending_{}".format(sorted(request.items())), + interval_s=30, + ) + if infeasible: + for request in infeasible: + self.event_summarizer.add_once_per_interval( + "Error: No available node types can fulfill resource " + "request {}. Add suitable node types to this cluster to " + "resolve this issue.".format(request), + key="infeasible_{}".format(sorted(request.items())), + interval_s=30, + ) + + def _sort_based_on_last_used( + self, nodes: List[NodeID], last_used: Dict[str, float] + ) -> List[NodeID]: + """Sort the nodes based on the last time they were used. + + The first item in the return list is the most recently used. + """ + last_used_copy = copy.deepcopy(last_used) + # Add the unconnected nodes as the least recently used (the end of + # list). This prioritizes connected nodes. + least_recently_used = -1 + + def last_time_used(node_id: NodeID): + assert self.provider + node_ip = self.provider.internal_ip(node_id) + if node_ip not in last_used_copy: + return least_recently_used + else: + return last_used_copy[node_ip] + + return sorted(nodes, key=last_time_used, reverse=True) + + def _get_nodes_needed_for_request_resources( + self, sorted_node_ids: List[NodeID] + ) -> FrozenSet[NodeID]: + # TODO(ameer): try merging this with resource_demand_scheduler + # code responsible for adding nodes for get_resource_requests() and get_pending_placement_groups(). + """Returns the nodes NOT allowed to terminate due to get_resource_requests() and get_pending_placement_groups(). + + Args: + sorted_node_ids: the node ids sorted based on last used (LRU last). + + Returns: + FrozenSet[NodeID]: a set of nodes (node ids) that + we should NOT terminate. + """ + # For type checking, assert that this object has been instantitiated. + assert self.provider + + nodes_not_allowed_to_terminate: Set[NodeID] = set() + + resource_demands, strict_spreads = placement_groups_to_resource_demands( + self.load_metrics.get_pending_placement_groups() + ) + resource_demands.extend(self.load_metrics.get_resource_requests()) + if not resource_demands and not strict_spreads: + return frozenset(nodes_not_allowed_to_terminate) + + static_node_resources: Dict[ + NodeIP, ResourceDict + ] = self.load_metrics.get_static_node_resources_by_ip() + + head_node_resources: ResourceDict = copy.deepcopy( + self.available_node_types[self.config["head_node_type"]]["resources"] + ) + # TODO(ameer): this is somewhat duplicated in + # resource_demand_scheduler.py. + if not head_node_resources: + # Legacy yaml might include {} in the resources field. + head_node_ip = self.provider.internal_ip(self.non_terminated_nodes.head_id) + head_node_resources = static_node_resources.get(head_node_ip, {}) + + node_total_resources: List[ResourceDict] = [head_node_resources] + resource_demand_vector_worker_node_ids = [] + # Get max resources on all the non terminated nodes. + for node_id in sorted_node_ids: + tags = self.provider.node_tags(node_id) + if TAG_RAY_USER_NODE_TYPE in tags: + node_type = tags[TAG_RAY_USER_NODE_TYPE] + node_resources: ResourceDict = copy.deepcopy( + self.available_node_types[node_type]["resources"] + ) + if not node_resources: + # Legacy yaml might include {} in the resources field. + node_ip = self.provider.internal_ip(node_id) + node_resources = static_node_resources.get(node_ip, {}) + node_total_resources.append(node_resources) + resource_demand_vector_worker_node_ids.append(node_id) + # Since it is sorted based on last used, we "keep" nodes that are + # most recently used when we binpack. We assume get_bin_pack_residual + # is following the given order here. + node_remaining_resources = copy.deepcopy(node_total_resources) + + for strict_spread in strict_spreads: + unfulfilled, updated_node_remaining_resources = get_bin_pack_residual( + node_remaining_resources, strict_spread, strict_spread=True + ) + if unfulfilled: + continue + node_remaining_resources = updated_node_remaining_resources + + _, node_remaining_resources = get_bin_pack_residual( + node_remaining_resources, resource_demands + ) + # Remove the first entry (the head node). + node_total_resources.pop(0) + # Remove the first entry (the head node). + node_remaining_resources.pop(0) + for i, node_id in enumerate(resource_demand_vector_worker_node_ids): + if ( + node_remaining_resources[i] == node_total_resources[i] + and node_total_resources[i] + ): + # No resources of the node were needed for request_resources(). + # node_total_resources[i] is an empty dict for legacy yamls + # before the node is connected. + pass + else: + nodes_not_allowed_to_terminate.add(node_id) + return frozenset(nodes_not_allowed_to_terminate) + + def _keep_worker_of_node_type( + self, node_id: NodeID, node_type_counts: Dict[NodeType, int] + ) -> Tuple[KeepOrTerminate, Optional[str]]: + """Determines if a worker should be kept based on the min_workers + and max_workers constraint of the worker's node_type. + + Returns KeepOrTerminate.keep when both of the following hold: + (a) The worker's node_type is present among the keys of the current + config's available_node_types dict. + (b) Deleting the node would violate the min_workers constraint for that + worker's node_type. + + Returns KeepOrTerminate.terminate when both the following hold: + (a) The worker's node_type is not present among the keys of the current + config's available_node_types dict. + (b) Keeping the node would violate the max_workers constraint for that + worker's node_type. + + Return KeepOrTerminate.decide_later otherwise. + + Args: + node_type_counts(Dict[NodeType, int]): The non_terminated node + types counted so far. + Returns: + KeepOrTerminate: keep if the node should be kept, terminate if the + node should be terminated, decide_later if we are allowed + to terminate it, but do not have to. + Optional[str]: reason for termination. Not None on + KeepOrTerminate.terminate, None otherwise. + """ + # For type checking, assert that this object has been instantitiated. + assert self.provider + + tags = self.provider.node_tags(node_id) + if TAG_RAY_USER_NODE_TYPE in tags: + node_type = tags[TAG_RAY_USER_NODE_TYPE] + + min_workers = self.available_node_types.get(node_type, {}).get( + "min_workers", 0 + ) + max_workers = self.available_node_types.get(node_type, {}).get( + "max_workers", 0 + ) + if node_type not in self.available_node_types: + # The node type has been deleted from the cluster config. + # Allow terminating it if needed. + available_node_types = list(self.available_node_types.keys()) + return ( + KeepOrTerminate.terminate, + f"not in available_node_types: {available_node_types}", + ) + new_count = node_type_counts[node_type] + 1 + if new_count <= min(min_workers, max_workers): + return KeepOrTerminate.keep, None + if new_count > max_workers: + return KeepOrTerminate.terminate, "max_workers_per_type" + + return KeepOrTerminate.decide_later, None + + def _node_resources(self, node_id): + node_type = self.provider.node_tags(node_id).get(TAG_RAY_USER_NODE_TYPE) + if self.available_node_types: + return self.available_node_types.get(node_type, {}).get("resources", {}) + else: + return {} + + def _node_labels(self, node_id): + node_type = self.provider.node_tags(node_id).get(TAG_RAY_USER_NODE_TYPE) + if self.available_node_types: + return self.available_node_types.get(node_type, {}).get("labels", {}) + else: + return {} + + def reset(self, errors_fatal=False): + sync_continuously = False + if hasattr(self, "config"): + sync_continuously = self.config.get("file_mounts_sync_continuously", False) + try: + new_config = self.config_reader() + if new_config != getattr(self, "config", None): + try: + validate_config(new_config) + except Exception as e: + self.prom_metrics.config_validation_exceptions.inc() + logger.debug( + "Cluster config validation failed. The version of " + "the ray CLI you launched this cluster with may " + "be higher than the version of ray being run on " + "the cluster. Some new features may not be " + "available until you upgrade ray on your cluster.", + exc_info=e, + ) + logger.debug( + f"New config after validation: {new_config}," + f" of type: {type(new_config)}" + ) + (new_runtime_hash, new_file_mounts_contents_hash) = hash_runtime_conf( + new_config["file_mounts"], + new_config["cluster_synced_files"], + [ + new_config["worker_setup_commands"], + new_config["worker_start_ray_commands"], + ], + generate_file_mounts_contents_hash=sync_continuously, + ) + self.config = new_config + self.runtime_hash = new_runtime_hash + self.file_mounts_contents_hash = new_file_mounts_contents_hash + if not self.provider: + self.provider = _get_node_provider( + self.config["provider"], self.config["cluster_name"] + ) + + # If using the LocalNodeProvider, make sure the head node is marked + # non-terminated. + if isinstance(self.provider, LocalNodeProvider): + record_local_head_state_if_needed(self.provider) + + self.available_node_types = self.config["available_node_types"] + upscaling_speed = self.config.get("upscaling_speed") + aggressive = self.config.get("autoscaling_mode") == "aggressive" + target_utilization_fraction = self.config.get("target_utilization_fraction") + if upscaling_speed: + upscaling_speed = float(upscaling_speed) + # TODO(ameer): consider adding (if users ask) an option of + # initial_upscaling_num_workers. + elif aggressive: + upscaling_speed = 99999 + logger.warning( + "Legacy aggressive autoscaling mode " + "detected. Replacing it by setting upscaling_speed to " + "99999." + ) + elif target_utilization_fraction: + upscaling_speed = 1 / max(target_utilization_fraction, 0.001) - 1 + logger.warning( + "Legacy target_utilization_fraction config " + "detected. Replacing it by setting upscaling_speed to " + + "1 / target_utilization_fraction - 1." + ) + else: + upscaling_speed = 1.0 + if self.resource_demand_scheduler: + # The node types are autofilled internally for legacy yamls, + # overwriting the class will remove the inferred node resources + # for legacy yamls. + self.resource_demand_scheduler.reset_config( + self.provider, + self.available_node_types, + self.config["max_workers"], + self.config["head_node_type"], + upscaling_speed, + ) + else: + self.resource_demand_scheduler = ResourceDemandScheduler( + self.provider, + self.available_node_types, + self.config["max_workers"], + self.config["head_node_type"], + upscaling_speed, + ) + + except Exception as e: + self.prom_metrics.reset_exceptions.inc() + if errors_fatal: + raise e + else: + logger.exception("StandardAutoscaler: Error parsing config.") + + def launch_config_ok(self, node_id): + if self.disable_launch_config_check: + return True + node_tags = self.provider.node_tags(node_id) + tag_launch_conf = node_tags.get(TAG_RAY_LAUNCH_CONFIG) + node_type = node_tags.get(TAG_RAY_USER_NODE_TYPE) + if node_type not in self.available_node_types: + # The node type has been deleted from the cluster config. + # Don't keep the node. + return False + + # The `worker_nodes` field is deprecated in favor of per-node-type + # node_configs. We allow it for backwards-compatibility. + launch_config = copy.deepcopy(self.config.get("worker_nodes", {})) + if node_type: + launch_config.update( + self.config["available_node_types"][node_type]["node_config"] + ) + calculated_launch_hash = hash_launch_conf(launch_config, self.config["auth"]) + + if calculated_launch_hash != tag_launch_conf: + return False + return True + + def files_up_to_date(self, node_id): + node_tags = self.provider.node_tags(node_id) + applied_config_hash = node_tags.get(TAG_RAY_RUNTIME_CONFIG) + applied_file_mounts_contents_hash = node_tags.get(TAG_RAY_FILE_MOUNTS_CONTENTS) + if applied_config_hash != self.runtime_hash or ( + self.file_mounts_contents_hash is not None + and self.file_mounts_contents_hash != applied_file_mounts_contents_hash + ): + logger.info( + "StandardAutoscaler: " + "{}: Runtime state is ({},{}), want ({},{})".format( + node_id, + applied_config_hash, + applied_file_mounts_contents_hash, + self.runtime_hash, + self.file_mounts_contents_hash, + ) + ) + return False + return True + + def heartbeat_on_time(self, node_id: NodeID, now: float) -> bool: + """Determine whether we've received a heartbeat from a node within the + last AUTOSCALER_HEARTBEAT_TIMEOUT_S seconds. + """ + # For type checking, assert that this object has been instantitiated. + assert self.provider + + key = self.provider.internal_ip(node_id) + + if key in self.load_metrics.last_heartbeat_time_by_ip: + last_heartbeat_time = self.load_metrics.last_heartbeat_time_by_ip[key] + delta = now - last_heartbeat_time + if delta < AUTOSCALER_HEARTBEAT_TIMEOUT_S: + return True + return False + + def terminate_unhealthy_nodes(self, now: float): + """Terminated nodes for which we haven't received a heartbeat on time. + These nodes are subsequently terminated. + """ + # For type checking, assert that these objects have been instantitiated. + assert self.provider + assert self.non_terminated_nodes + + for node_id in self.non_terminated_nodes.worker_ids: + node_status = self.provider.node_tags(node_id)[TAG_RAY_NODE_STATUS] + # We're not responsible for taking down + # nodes with pending or failed status: + if not node_status == STATUS_UP_TO_DATE: + continue + # This node is up-to-date. If it hasn't had the chance to produce + # a heartbeat, fake the heartbeat now (see logic for completed node + # updaters). + ip = self.provider.internal_ip(node_id) + if ip not in self.load_metrics.last_heartbeat_time_by_ip: + self.load_metrics.mark_active(ip) + # Heartbeat indicates node is healthy: + if self.heartbeat_on_time(node_id, now): + continue + self.schedule_node_termination( + node_id, "lost contact with raylet", logger.warning + ) + self.terminate_scheduled_nodes() + + def attempt_to_recover_unhealthy_nodes(self, now): + for node_id in self.non_terminated_nodes.worker_ids: + self.recover_if_needed(node_id, now) + + def recover_if_needed(self, node_id, now): + if not self.can_update(node_id): + return + if self.heartbeat_on_time(node_id, now): + return + + logger.warning( + "StandardAutoscaler: " + "{}: No recent heartbeat, " + "restarting Ray to recover...".format(node_id) + ) + self.event_summarizer.add( + "Restarting {} nodes of type " + + self._get_node_type(node_id) + + " (lost contact with raylet).", + quantity=1, + aggregate=operator.add, + ) + head_node_ip = self.provider.internal_ip(self.non_terminated_nodes.head_id) + updater = NodeUpdaterThread( + node_id=node_id, + provider_config=self.config["provider"], + provider=self.provider, + auth_config=self.config["auth"], + cluster_name=self.config["cluster_name"], + file_mounts={}, + initialization_commands=[], + setup_commands=[], + ray_start_commands=with_head_node_ip( + self.config["worker_start_ray_commands"], head_node_ip + ), + runtime_hash=self.runtime_hash, + file_mounts_contents_hash=self.file_mounts_contents_hash, + process_runner=self.process_runner, + use_internal_ip=True, + is_head_node=False, + docker_config=self._get_node_specific_docker_config(node_id), + node_resources=self._node_resources(node_id), + node_labels=self._node_labels(node_id), + for_recovery=True, + ) + updater.start() + self.updaters[node_id] = updater + + def _get_node_type(self, node_id: str) -> str: + # For type checking, assert that this object has been instantitiated. + assert self.provider + + node_tags = self.provider.node_tags(node_id) + if TAG_RAY_USER_NODE_TYPE in node_tags: + return node_tags[TAG_RAY_USER_NODE_TYPE] + else: + return "unknown_node_type" + + def _get_node_type_specific_fields(self, node_id: str, fields_key: str) -> Any: + # For type checking, assert that this object has been instantitiated. + assert self.provider + + fields = self.config[fields_key] + node_tags = self.provider.node_tags(node_id) + if TAG_RAY_USER_NODE_TYPE in node_tags: + node_type = node_tags[TAG_RAY_USER_NODE_TYPE] + if node_type not in self.available_node_types: + raise ValueError(f"Unknown node type tag: {node_type}.") + node_specific_config = self.available_node_types[node_type] + if fields_key in node_specific_config: + fields = node_specific_config[fields_key] + return fields + + def _get_node_specific_docker_config(self, node_id): + if "docker" not in self.config: + return {} + docker_config = copy.deepcopy(self.config.get("docker", {})) + node_specific_docker = self._get_node_type_specific_fields(node_id, "docker") + docker_config.update(node_specific_docker) + return docker_config + + def should_update(self, node_id): + if not self.can_update(node_id): + return UpdateInstructions(None, None, None, None) # no update + + status = self.provider.node_tags(node_id).get(TAG_RAY_NODE_STATUS) + if status == STATUS_UP_TO_DATE and self.files_up_to_date(node_id): + return UpdateInstructions(None, None, None, None) # no update + + successful_updated = self.num_successful_updates.get(node_id, 0) > 0 + if successful_updated and self.config.get("restart_only", False): + setup_commands = [] + ray_start_commands = self.config["worker_start_ray_commands"] + elif successful_updated and self.config.get("no_restart", False): + setup_commands = self._get_node_type_specific_fields( + node_id, "worker_setup_commands" + ) + ray_start_commands = [] + else: + setup_commands = self._get_node_type_specific_fields( + node_id, "worker_setup_commands" + ) + ray_start_commands = self.config["worker_start_ray_commands"] + + docker_config = self._get_node_specific_docker_config(node_id) + return UpdateInstructions( + node_id=node_id, + setup_commands=setup_commands, + ray_start_commands=ray_start_commands, + docker_config=docker_config, + ) + + def spawn_updater( + self, + node_id, + setup_commands, + ray_start_commands, + node_resources, + node_labels, + docker_config, + ): + logger.info( + f"Creating new (spawn_updater) updater thread for node" f" {node_id}." + ) + ip = self.provider.internal_ip(node_id) + node_type = self._get_node_type(node_id) + self.node_tracker.track(node_id, ip, node_type) + head_node_ip = self.provider.internal_ip(self.non_terminated_nodes.head_id) + updater = NodeUpdaterThread( + node_id=node_id, + provider_config=self.config["provider"], + provider=self.provider, + auth_config=self.config["auth"], + cluster_name=self.config["cluster_name"], + file_mounts=self.config["file_mounts"], + initialization_commands=with_head_node_ip( + self._get_node_type_specific_fields(node_id, "initialization_commands"), + head_node_ip, + ), + setup_commands=with_head_node_ip(setup_commands, head_node_ip), + ray_start_commands=with_head_node_ip(ray_start_commands, head_node_ip), + runtime_hash=self.runtime_hash, + file_mounts_contents_hash=self.file_mounts_contents_hash, + is_head_node=False, + cluster_synced_files=self.config["cluster_synced_files"], + rsync_options={ + "rsync_exclude": self.config.get("rsync_exclude"), + "rsync_filter": self.config.get("rsync_filter"), + }, + process_runner=self.process_runner, + use_internal_ip=True, + docker_config=docker_config, + node_resources=node_resources, + node_labels=node_labels, + ) + updater.start() + self.updaters[node_id] = updater + + def can_update(self, node_id): + if self.disable_node_updaters: + return False + if node_id in self.updaters: + return False + if not self.launch_config_ok(node_id): + return False + if self.num_failed_updates.get(node_id, 0) > 0: # TODO(ekl) retry? + return False + logger.debug( + f"{node_id} is not being updated and " + "passes config check (can_update=True)." + ) + return True + + def launch_new_node(self, count: int, node_type: str) -> None: + logger.info("StandardAutoscaler: Queue {} new nodes for launch".format(count)) + self.pending_launches.inc(node_type, count) + config = copy.deepcopy(self.config) + if self.foreground_node_launch: + assert self.foreground_node_launcher is not None + # Launch in the main thread and block. + self.foreground_node_launcher.launch_node(config, count, node_type) + else: + assert self.launch_queue is not None + # Split into individual launch requests of the max batch size. + while count > 0: + # Enqueue launch data for the background NodeUpdater threads. + self.launch_queue.put( + (config, min(count, self.max_launch_batch), node_type) + ) + count -= self.max_launch_batch + + def kill_workers(self): + logger.error("StandardAutoscaler: kill_workers triggered") + nodes = self.workers() + if nodes: + self.provider.terminate_nodes(nodes) + for node in nodes: + self.node_tracker.untrack(node) + self.prom_metrics.stopped_nodes.inc() + logger.error("StandardAutoscaler: terminated {} node(s)".format(len(nodes))) + + def summary(self) -> Optional[AutoscalerSummary]: + """Summarizes the active, pending, and failed node launches. + + An active node is a node whose raylet is actively reporting heartbeats. + A pending node is non-active node whose node tag is uninitialized, + waiting for ssh, syncing files, or setting up. + If a node is not pending or active, it is failed. + + Returns: + AutoscalerSummary: The summary. + """ + # For type checking, assert that this object has been instantitiated. + assert self.provider + + if not self.non_terminated_nodes: + return None + active_nodes: Dict[NodeType, int] = Counter() + pending_nodes = [] + failed_nodes = [] + non_failed = set() + + node_type_mapping = {} + now = time.time() + for node_id in self.non_terminated_nodes.all_node_ids: + ip = self.provider.internal_ip(node_id) + node_tags = self.provider.node_tags(node_id) + + if not all( + tag in node_tags + for tag in ( + TAG_RAY_NODE_KIND, + TAG_RAY_USER_NODE_TYPE, + TAG_RAY_NODE_STATUS, + ) + ): + # In some node providers, creation of a node and tags is not + # atomic, so just skip it. + continue + + if node_tags[TAG_RAY_NODE_KIND] == NODE_KIND_UNMANAGED: + continue + node_type = node_tags[TAG_RAY_USER_NODE_TYPE] + + node_type_mapping[ip] = node_type + + is_active = self.heartbeat_on_time(node_id, now) + if is_active: + active_nodes[node_type] += 1 + non_failed.add(node_id) + else: + status = node_tags[TAG_RAY_NODE_STATUS] + completed_states = [STATUS_UP_TO_DATE, STATUS_UPDATE_FAILED] + is_pending = status not in completed_states + if is_pending: + pending_nodes.append((node_id, ip, node_type, status)) + non_failed.add(node_id) + + failed_nodes = self.node_tracker.get_all_failed_node_info(non_failed) + + # The concurrent counter leaves some 0 counts in, so we need to + # manually filter those out. + pending_launches = {} + for node_type, count in self.pending_launches.breakdown().items(): + if count: + pending_launches[node_type] = count + + pending_resources = {} + for node_resources in self.resource_demand_scheduler.calculate_node_resources( + nodes=[node_id for node_id, _, _, _ in pending_nodes], + pending_nodes=pending_launches, + # We don't fill this field out because we're intentionally only + # passing pending nodes (which aren't tracked by load metrics + # anyways). + unused_resources_by_ip={}, + )[0]: + for key, value in node_resources.items(): + pending_resources[key] = value + pending_resources.get(key, 0) + + return AutoscalerSummary( + # Convert active_nodes from counter to dict for later serialization + active_nodes=dict(active_nodes), + idle_nodes=None, + pending_nodes=[ + (ip, node_type, status) for _, ip, node_type, status in pending_nodes + ], + pending_launches=pending_launches, + failed_nodes=failed_nodes, + node_availability_summary=self.node_provider_availability_tracker.summary(), + pending_resources=pending_resources, + node_type_mapping=node_type_mapping, + legacy=True, + ) + + def info_string(self): + lm_summary = self.load_metrics.summary() + autoscaler_summary = self.summary() + assert autoscaler_summary + return "\n" + format_info_string(lm_summary, autoscaler_summary) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12308f72bc65eb26aba2eb57d80245480b4b7eaf Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/config.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4e1164140a8e3da52e630efceda4f255b631ce6d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/config.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2669b540bb09d46146f1207892986964985494b8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0aa3c4387c8567ab0bacb4c7a194e6a132f43036 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/__pycache__/utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b45d68bbbd95850d059f961ea6002060b9a8a05d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/__pycache__/cloudwatch_helper.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/__pycache__/cloudwatch_helper.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..44ba257cb309ee734141c59b2957810050a80631 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/__pycache__/cloudwatch_helper.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/cloudwatch_helper.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/cloudwatch_helper.py new file mode 100644 index 0000000000000000000000000000000000000000..939d11620eaae694d1d9be0dd88e967cc149c621 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/cloudwatch/cloudwatch_helper.py @@ -0,0 +1,821 @@ +import copy +import hashlib +import json +import logging +import os +import time +from enum import Enum +from typing import Any, Callable, Dict, List, Union + +import botocore + +from ray.autoscaler._private.aws.utils import client_cache, resource_cache +from ray.autoscaler.tags import NODE_KIND_HEAD, TAG_RAY_CLUSTER_NAME, TAG_RAY_NODE_KIND + +logger = logging.getLogger(__name__) + +RAY = "ray-autoscaler" +CLOUDWATCH_RAY_INSTANCE_PROFILE = RAY + "-cloudwatch-v1" +CLOUDWATCH_RAY_IAM_ROLE = RAY + "-cloudwatch-v1" +CLOUDWATCH_AGENT_INSTALLED_AMI_TAG = "T6Iq2faj" +CLOUDWATCH_AGENT_INSTALLED_TAG = "cloudwatch-agent-installed" +CLOUDWATCH_CONFIG_HASH_TAG_BASE = "cloudwatch-config-hash" + + +class CloudwatchConfigType(str, Enum): + AGENT = "agent" + DASHBOARD = "dashboard" + ALARM = "alarm" + + +class CloudwatchHelper: + def __init__( + self, provider_config: Dict[str, Any], node_id: str, cluster_name: str + ) -> None: + self.node_id = node_id + self.cluster_name = cluster_name + self.provider_config = provider_config + region = provider_config["region"] + self.ec2_resource = resource_cache("ec2", region) + self.ec2_client = self.ec2_resource.meta.client + self.ssm_client = client_cache("ssm", region) + cloudwatch_resource = resource_cache("cloudwatch", region) + self.cloudwatch_client = cloudwatch_resource.meta.client + self.CLOUDWATCH_CONFIG_TYPE_TO_CONFIG_VARIABLE_REPLACE_FUNC: Dict[ + str, Callable + ] = { + CloudwatchConfigType.AGENT.value: self._replace_cwa_config_vars, + CloudwatchConfigType.DASHBOARD.value: self._replace_dashboard_config_vars, + CloudwatchConfigType.ALARM.value: self._load_config_file, + } + self.CLOUDWATCH_CONFIG_TYPE_TO_UPDATE_FUNC_HEAD_NODE: Dict[str, Callable] = { + CloudwatchConfigType.AGENT.value: self._restart_cloudwatch_agent, + CloudwatchConfigType.DASHBOARD.value: self._put_cloudwatch_dashboard, + CloudwatchConfigType.ALARM.value: self._put_cloudwatch_alarm, + } + self.CLOUDWATCH_CONFIG_TYPE_TO_UPDATE_FUNC_WORKER_NODE: Dict[str, Callable] = { + CloudwatchConfigType.AGENT.value: self._restart_cloudwatch_agent, + CloudwatchConfigType.ALARM.value: self._put_cloudwatch_alarm, + } + + def update_from_config(self, is_head_node: bool) -> None: + """Discovers and applies CloudWatch config updates as required. + + Args: + is_head_node: whether this node is the head node. + """ + for config_type in CloudwatchConfigType: + if CloudwatchHelper.cloudwatch_config_exists( + self.provider_config, config_type.value + ): + self._update_cloudwatch_config(config_type.value, is_head_node) + + def _ec2_health_check_waiter(self, node_id: str) -> None: + # wait for all EC2 instance checks to complete + try: + logger.info( + "Waiting for EC2 instance health checks to complete before " + "configuring Unified Cloudwatch Agent. This may take a few " + "minutes..." + ) + waiter = self.ec2_client.get_waiter("instance_status_ok") + waiter.wait(InstanceIds=[node_id]) + except botocore.exceptions.WaiterError as e: + logger.error( + "Failed while waiting for EC2 instance checks to complete: {}".format( + e.message + ) + ) + raise e + + def _update_cloudwatch_config(self, config_type: str, is_head_node: bool) -> None: + """ + check whether update operations are needed in + cloudwatch related configs + """ + cwa_installed = self._setup_cwa() + param_name = self._get_ssm_param_name(config_type) + if cwa_installed: + if is_head_node: + cw_config_ssm = self._set_cloudwatch_ssm_config_param( + param_name, config_type + ) + cur_cw_config_hash = self._sha1_hash_file(config_type) + ssm_cw_config_hash = self._sha1_hash_json(cw_config_ssm) + # check if user updated cloudwatch related config files. + # if so, perform corresponding actions. + if cur_cw_config_hash != ssm_cw_config_hash: + logger.info( + "Cloudwatch {} config file has changed.".format(config_type) + ) + self._upload_config_to_ssm_and_set_hash_tag(config_type) + self.CLOUDWATCH_CONFIG_TYPE_TO_UPDATE_FUNC_HEAD_NODE.get( + config_type + )() + else: + head_node_hash = self._get_head_node_config_hash(config_type) + cur_node_hash = self._get_cur_node_config_hash(config_type) + if head_node_hash != cur_node_hash: + logger.info( + "Cloudwatch {} config file has changed.".format(config_type) + ) + update_func = ( + self.CLOUDWATCH_CONFIG_TYPE_TO_UPDATE_FUNC_WORKER_NODE.get( + config_type + ) + ) + if update_func: + update_func() + self._update_cloudwatch_hash_tag_value( + self.node_id, head_node_hash, config_type + ) + + def _put_cloudwatch_dashboard(self) -> Dict[str, Any]: + """put dashboard to cloudwatch console""" + + cloudwatch_config = self.provider_config["cloudwatch"] + dashboard_config = cloudwatch_config.get("dashboard", {}) + dashboard_name_cluster = dashboard_config.get("name", self.cluster_name) + dashboard_name = self.cluster_name + "-" + dashboard_name_cluster + + widgets = self._replace_dashboard_config_vars( + CloudwatchConfigType.DASHBOARD.value + ) + + response = self.cloudwatch_client.put_dashboard( + DashboardName=dashboard_name, DashboardBody=json.dumps({"widgets": widgets}) + ) + issue_count = len(response.get("DashboardValidationMessages", [])) + if issue_count > 0: + for issue in response.get("DashboardValidationMessages"): + logging.error( + "Error in dashboard config: {} - {}".format( + issue["Message"], issue["DataPath"] + ) + ) + raise Exception( + "Errors in dashboard configuration: {} issues raised".format( + issue_count + ) + ) + else: + logger.info("Successfully put dashboard to CloudWatch console") + return response + + def _put_cloudwatch_alarm(self) -> None: + """put CloudWatch metric alarms read from config""" + param_name = self._get_ssm_param_name(CloudwatchConfigType.ALARM.value) + data = json.loads(self._get_ssm_param(param_name)) + for item in data: + item_out = copy.deepcopy(item) + self._replace_all_config_variables( + item_out, + self.node_id, + self.cluster_name, + self.provider_config["region"], + ) + self.cloudwatch_client.put_metric_alarm(**item_out) + logger.info("Successfully put alarms to CloudWatch console") + + def _send_command_to_node( + self, document_name: str, parameters: Dict[str, List[str]], node_id: str + ) -> Dict[str, Any]: + """send SSM command to the given nodes""" + logger.debug( + "Sending SSM command to {} node(s). Document name: {}. " + "Parameters: {}.".format(node_id, document_name, parameters) + ) + response = self.ssm_client.send_command( + InstanceIds=[node_id], + DocumentName=document_name, + Parameters=parameters, + MaxConcurrency="1", + MaxErrors="0", + ) + return response + + def _ssm_command_waiter( + self, + document_name: str, + parameters: Dict[str, List[str]], + node_id: str, + retry_failed: bool = True, + ) -> Dict[str, Any]: + """wait for SSM command to complete on all cluster nodes""" + + # This waiter differs from the built-in SSM.Waiter by + # optimistically waiting for the command invocation to + # exist instead of failing immediately, and by resubmitting + # any failed command until all retry attempts are exhausted + # by default. + response = self._send_command_to_node(document_name, parameters, node_id) + command_id = response["Command"]["CommandId"] + + cloudwatch_config = self.provider_config["cloudwatch"] + agent_retryer_config = cloudwatch_config.get( + CloudwatchConfigType.AGENT.value + ).get("retryer", {}) + max_attempts = agent_retryer_config.get("max_attempts", 120) + delay_seconds = agent_retryer_config.get("delay_seconds", 30) + num_attempts = 0 + cmd_invocation_res = {} + while True: + num_attempts += 1 + logger.debug( + "Listing SSM command ID {} invocations on node {}".format( + command_id, node_id + ) + ) + response = self.ssm_client.list_command_invocations( + CommandId=command_id, + InstanceId=node_id, + ) + cmd_invocations = response["CommandInvocations"] + if not cmd_invocations: + logger.debug( + "SSM Command ID {} invocation does not exist. If " + "the command was just started, it may take a " + "few seconds to register.".format(command_id) + ) + else: + if len(cmd_invocations) > 1: + logger.warning( + "Expected to find 1 SSM command invocation with " + "ID {} on node {} but found {}: {}".format( + command_id, + node_id, + len(cmd_invocations), + cmd_invocations, + ) + ) + cmd_invocation = cmd_invocations[0] + if cmd_invocation["Status"] == "Success": + logger.debug( + "SSM Command ID {} completed successfully.".format(command_id) + ) + cmd_invocation_res[node_id] = True + break + if num_attempts >= max_attempts: + logger.error( + "Max attempts for command {} exceeded on node {}".format( + command_id, node_id + ) + ) + raise botocore.exceptions.WaiterError( + name="ssm_waiter", + reason="Max attempts exceeded", + last_response=cmd_invocation, + ) + if cmd_invocation["Status"] == "Failed": + logger.debug(f"SSM Command ID {command_id} failed.") + if retry_failed: + logger.debug(f"Retrying in {delay_seconds} seconds.") + response = self._send_command_to_node( + document_name, parameters, node_id + ) + command_id = response["Command"]["CommandId"] + logger.debug( + "Sent SSM command ID {} to node {}".format( + command_id, node_id + ) + ) + else: + logger.debug(f"Ignoring Command ID {command_id} failure.") + cmd_invocation_res[node_id] = False + break + time.sleep(delay_seconds) + + return cmd_invocation_res + + def _replace_config_variables( + self, string: str, node_id: str, cluster_name: str, region: str + ) -> str: + """ + replace known config variable occurrences in the input string + does not replace variables with undefined or empty strings + """ + + if node_id: + string = string.replace("{instance_id}", node_id) + if cluster_name: + string = string.replace("{cluster_name}", cluster_name) + if region: + string = string.replace("{region}", region) + return string + + def _replace_all_config_variables( + self, + collection: Union[Dict[str, Any], str], + node_id: str, + cluster_name: str, + region: str, + ) -> Union[str, Dict[str, Any]]: + """ + Replace known config variable occurrences in the input collection. + The input collection must be either a dict or list. + Returns a tuple consisting of the output collection and the number of + modified strings in the collection (which is not necessarily equal to + the number of variables replaced). + """ + + for key in collection: + if type(collection) is dict: + value = collection.get(key) + index_key = key + elif type(collection) is list: + value = key + index_key = collection.index(key) + else: + raise ValueError( + f"Can't replace CloudWatch config variables " + f"in unsupported collection type: {type(collection)}." + f"Please check your CloudWatch JSON config files." + ) + if type(value) is str: + collection[index_key] = self._replace_config_variables( + value, node_id, cluster_name, region + ) + elif type(value) is dict or type(value) is list: + collection[index_key] = self._replace_all_config_variables( + value, node_id, cluster_name, region + ) + return collection + + def _load_config_file(self, config_type: str) -> Dict[str, Any]: + """load JSON config file""" + cloudwatch_config = self.provider_config["cloudwatch"] + json_config_file_section = cloudwatch_config.get(config_type, {}) + json_config_file_path = json_config_file_section.get("config", {}) + json_config_path = os.path.abspath(json_config_file_path) + with open(json_config_path) as f: + data = json.load(f) + return data + + def _set_cloudwatch_ssm_config_param( + self, parameter_name: str, config_type: str + ) -> str: + """ + get cloudwatch config for the given param and config type from SSM + if it exists, put it in the SSM param store if not + """ + try: + parameter_value = self._get_ssm_param(parameter_name) + except botocore.exceptions.ClientError as e: + if e.response["Error"]["Code"] == "ParameterNotFound": + logger.info( + "Cloudwatch {} config file is not found " + "at SSM parameter store. " + "Checking for Unified CloudWatch Agent installation".format( + config_type + ) + ) + return self._get_default_empty_config_file_hash() + else: + logger.info( + "Failed to fetch Unified CloudWatch Agent config from SSM " + "parameter store." + ) + logger.error(e) + raise e + return parameter_value + + def _get_default_empty_config_file_hash(self): + default_cw_config = "{}" + parameter_value = self._sha1_hash_json(default_cw_config) + return parameter_value + + def _get_ssm_param(self, parameter_name: str) -> str: + """ + get the SSM parameter value associated with the given parameter name + """ + response = self.ssm_client.get_parameter(Name=parameter_name) + logger.info("Successfully fetch ssm parameter: {}".format(parameter_name)) + res = response.get("Parameter", {}) + cwa_parameter = res.get("Value", {}) + return cwa_parameter + + def _sha1_hash_json(self, value: str) -> str: + """calculate the json string sha1 hash""" + sha1_hash = hashlib.new("sha1") + binary_value = value.encode("ascii") + sha1_hash.update(binary_value) + sha1_res = sha1_hash.hexdigest() + return sha1_res + + def _sha1_hash_file(self, config_type: str) -> str: + """calculate the config file sha1 hash""" + config = self.CLOUDWATCH_CONFIG_TYPE_TO_CONFIG_VARIABLE_REPLACE_FUNC.get( + config_type + )(config_type) + value = json.dumps(config) + sha1_res = self._sha1_hash_json(value) + return sha1_res + + def _upload_config_to_ssm_and_set_hash_tag(self, config_type: str): + data = self.CLOUDWATCH_CONFIG_TYPE_TO_CONFIG_VARIABLE_REPLACE_FUNC.get( + config_type + )(config_type) + sha1_hash_value = self._sha1_hash_file(config_type) + self._upload_config_to_ssm(data, config_type) + self._update_cloudwatch_hash_tag_value( + self.node_id, sha1_hash_value, config_type + ) + + def _add_cwa_installed_tag(self, node_id: str) -> None: + self.ec2_client.create_tags( + Resources=[node_id], + Tags=[{"Key": CLOUDWATCH_AGENT_INSTALLED_TAG, "Value": "True"}], + ) + logger.info( + "Successfully add Unified CloudWatch Agent installed " + "tag on {}".format(node_id) + ) + + def _update_cloudwatch_hash_tag_value( + self, node_id: str, sha1_hash_value: str, config_type: str + ): + hash_key_value = "-".join([CLOUDWATCH_CONFIG_HASH_TAG_BASE, config_type]) + self.ec2_client.create_tags( + Resources=[node_id], + Tags=[{"Key": hash_key_value, "Value": sha1_hash_value}], + ) + logger.info( + "Successfully update cloudwatch {} hash tag on {}".format( + config_type, node_id + ) + ) + + def _get_ssm_param_name(self, config_type: str) -> str: + """return the parameter name for cloudwatch configs""" + ssm_config_param_name = "AmazonCloudWatch-" + "ray_{}_config_{}".format( + config_type, self.cluster_name + ) + return ssm_config_param_name + + def _put_ssm_param(self, parameter: Dict[str, Any], parameter_name: str) -> None: + """upload cloudwatch config to the SSM parameter store""" + self.ssm_client.put_parameter( + Name=parameter_name, + Type="String", + Value=json.dumps(parameter), + Overwrite=True, + Tier="Intelligent-Tiering", + ) + + def _upload_config_to_ssm(self, param: Dict[str, Any], config_type: str): + param_name = self._get_ssm_param_name(config_type) + self._put_ssm_param(param, param_name) + + def _replace_cwa_config_vars(self, config_type: str) -> Dict[str, Any]: + """ + replace {instance_id}, {region}, {cluster_name} + variable occurrences in Unified Cloudwatch Agent config file + """ + cwa_config = self._load_config_file(config_type) + self._replace_all_config_variables( + cwa_config, + self.node_id, + self.cluster_name, + self.provider_config["region"], + ) + return cwa_config + + def _replace_dashboard_config_vars(self, config_type: str) -> List[str]: + """ + replace known variable occurrences in CloudWatch Dashboard config file + """ + data = self._load_config_file(config_type) + widgets = [] + for item in data: + item_out = self._replace_all_config_variables( + item, + self.node_id, + self.cluster_name, + self.provider_config["region"], + ) + widgets.append(item_out) + return widgets + + def _replace_alarm_config_vars(self, config_type: str) -> List[str]: + """ + replace {instance_id}, {region}, {cluster_name} + variable occurrences in cloudwatch alarm config file + """ + data = self._load_config_file(config_type) + param_data = [] + for item in data: + item_out = copy.deepcopy(item) + self._replace_all_config_variables( + item_out, + self.node_id, + self.cluster_name, + self.provider_config["region"], + ) + param_data.append(item_out) + return param_data + + def _restart_cloudwatch_agent(self) -> None: + """restart Unified CloudWatch Agent""" + cwa_param_name = self._get_ssm_param_name(CloudwatchConfigType.AGENT.value) + logger.info( + "Restarting Unified CloudWatch Agent package on node {}.".format( + self.node_id + ) + ) + self._stop_cloudwatch_agent() + self._start_cloudwatch_agent(cwa_param_name) + + def _stop_cloudwatch_agent(self) -> None: + """stop Unified CloudWatch Agent""" + logger.info( + "Stopping Unified CloudWatch Agent package on node {}.".format(self.node_id) + ) + parameters_stop_cwa = { + "action": ["stop"], + "mode": ["ec2"], + } + # don't retry failed stop commands + # (there's not always an agent to stop) + self._ssm_command_waiter( + "AmazonCloudWatch-ManageAgent", + parameters_stop_cwa, + self.node_id, + False, + ) + logger.info("Unified CloudWatch Agent stopped on node {}.".format(self.node_id)) + + def _start_cloudwatch_agent(self, cwa_param_name: str) -> None: + """start Unified CloudWatch Agent""" + logger.info( + "Starting Unified CloudWatch Agent package on node {}.".format(self.node_id) + ) + parameters_start_cwa = { + "action": ["configure"], + "mode": ["ec2"], + "optionalConfigurationSource": ["ssm"], + "optionalConfigurationLocation": [cwa_param_name], + "optionalRestart": ["yes"], + } + self._ssm_command_waiter( + "AmazonCloudWatch-ManageAgent", parameters_start_cwa, self.node_id + ) + logger.info( + "Unified CloudWatch Agent started successfully on node {}.".format( + self.node_id + ) + ) + + def _setup_cwa(self) -> bool: + cwa_installed = self._check_cwa_installed_ec2_tag() + if cwa_installed == "False": + res_cwa_installed = self._ensure_cwa_installed_ssm(self.node_id) + return res_cwa_installed + else: + return True + + def _get_head_node_config_hash(self, config_type: str) -> str: + hash_key_value = "-".join([CLOUDWATCH_CONFIG_HASH_TAG_BASE, config_type]) + filters = copy.deepcopy( + self._get_current_cluster_session_nodes(self.cluster_name) + ) + filters.append( + { + "Name": "tag:{}".format(TAG_RAY_NODE_KIND), + "Values": [NODE_KIND_HEAD], + } + ) + try: + instance = list(self.ec2_resource.instances.filter(Filters=filters)) + assert len(instance) == 1, "More than 1 head node found!" + for tag in instance[0].tags: + if tag["Key"] == hash_key_value: + return tag["Value"] + except botocore.exceptions.ClientError as e: + logger.warning( + "{} Error caught when getting value of {} tag on head node".format( + e.response["Error"], hash_key_value + ) + ) + + def _get_cur_node_config_hash(self, config_type: str) -> str: + hash_key_value = "-".join([CLOUDWATCH_CONFIG_HASH_TAG_BASE, config_type]) + try: + response = self.ec2_client.describe_instances(InstanceIds=[self.node_id]) + reservations = response["Reservations"] + message = "More than 1 response received from describing current node" + assert len(reservations) == 1, message + instances = reservations[0]["Instances"] + assert len(reservations) == 1, message + tags = instances[0]["Tags"] + hash_value = self._get_default_empty_config_file_hash() + for tag in tags: + if tag["Key"] == hash_key_value: + logger.info( + "Successfully get cloudwatch {} hash tag value from " + "node {}".format(config_type, self.node_id) + ) + hash_value = tag["Value"] + return hash_value + except botocore.exceptions.ClientError as e: + logger.warning( + "{} Error caught when getting hash tag {} tag".format( + e.response["Error"], hash_key_value + ) + ) + + def _ensure_cwa_installed_ssm(self, node_id: str) -> bool: + """ + Check if Unified Cloudwatch Agent is installed via ssm run command. + If not, notify user to use an AMI with + the Unified CloudWatch Agent installed. + """ + logger.info( + "Checking Unified Cloudwatch Agent status on node {}".format(node_id) + ) + parameters_status_cwa = { + "action": ["status"], + "mode": ["ec2"], + } + self._ec2_health_check_waiter(node_id) + cmd_invocation_res = self._ssm_command_waiter( + "AmazonCloudWatch-ManageAgent", parameters_status_cwa, node_id, False + ) + cwa_installed = cmd_invocation_res.get(node_id, False) + if not cwa_installed: + logger.warning( + "Unified CloudWatch Agent not installed on {}. " + "Ray logs, metrics not picked up. " + "Please use an AMI with Unified CloudWatch Agent installed.".format( + node_id + ) + ) + return False + else: + return True + + def _get_current_cluster_session_nodes(self, cluster_name: str) -> List[dict]: + filters = [ + { + "Name": "instance-state-name", + "Values": ["pending", "running"], + }, + { + "Name": "tag:{}".format(TAG_RAY_CLUSTER_NAME), + "Values": [cluster_name], + }, + ] + return filters + + def _check_cwa_installed_ec2_tag(self) -> List[str]: + """ + Filtering all nodes to get nodes + without Unified CloudWatch Agent installed + """ + try: + response = self.ec2_client.describe_instances(InstanceIds=[self.node_id]) + reservations = response["Reservations"] + message = "More than 1 response received from describing current node" + assert len(reservations) == 1, message + instances = reservations[0]["Instances"] + assert len(instances) == 1, message + tags = instances[0]["Tags"] + cwa_installed = str(False) + for tag in tags: + if tag["Key"] == CLOUDWATCH_AGENT_INSTALLED_TAG: + logger.info( + "Unified CloudWatch Agent is installed on " + "node {}".format(self.node_id) + ) + cwa_installed = tag["Value"] + return cwa_installed + except botocore.exceptions.ClientError as e: + logger.warning( + "{} Error caught when getting Unified CloudWatch Agent " + "status based on {} tag".format( + e.response["Error"], CLOUDWATCH_AGENT_INSTALLED_TAG + ) + ) + + @staticmethod + def resolve_instance_profile_name( + config: Dict[str, Any], default_instance_profile_name: str + ) -> str: + """Get default cloudwatch instance profile name. + + Args: + config: provider section of cluster config file. + default_instance_profile_name: default ray instance profile name. + + Returns: + default cloudwatch instance profile name if cloudwatch config file + exists. + default ray instance profile name if cloudwatch config file + doesn't exist. + """ + cwa_cfg_exists = CloudwatchHelper.cloudwatch_config_exists( + config, CloudwatchConfigType.AGENT.value + ) + return ( + CLOUDWATCH_RAY_INSTANCE_PROFILE + if cwa_cfg_exists + else default_instance_profile_name + ) + + @staticmethod + def resolve_iam_role_name( + config: Dict[str, Any], default_iam_role_name: str + ) -> str: + """Get default cloudwatch iam role name. + + Args: + config: provider section of cluster config file. + default_iam_role_name: default ray iam role name. + + Returns: + default cloudwatch iam role name if cloudwatch config file exists. + default ray iam role name if cloudwatch config file doesn't exist. + """ + cwa_cfg_exists = CloudwatchHelper.cloudwatch_config_exists( + config, CloudwatchConfigType.AGENT.value + ) + return CLOUDWATCH_RAY_IAM_ROLE if cwa_cfg_exists else default_iam_role_name + + @staticmethod + def resolve_policy_arns( + config: Dict[str, Any], iam: Any, default_policy_arns: List[str] + ) -> List[str]: + """Attach necessary AWS policies for CloudWatch related operations. + + Args: + config: provider section of cluster config file. + iam: AWS iam resource. + default_policy_arns: List of default ray AWS policies. + + Returns: + list of policy arns including additional policies for CloudWatch + related operations if cloudwatch agent config is specifed in + cluster config file. + """ + cwa_cfg_exists = CloudwatchHelper.cloudwatch_config_exists( + config, CloudwatchConfigType.AGENT.value + ) + if cwa_cfg_exists: + cloudwatch_managed_policy = { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "ssm:SendCommand", + "ssm:ListCommandInvocations", + "iam:PassRole", + ], + "Resource": "*", + } + ], + } + iam_client = iam.meta.client + iam_client.create_policy( + PolicyName="CloudwatchManagedPolicies", + PolicyDocument=json.dumps(cloudwatch_managed_policy), + ) + sts_client = client_cache("sts", config["region"]) + account_id = sts_client.get_caller_identity().get("Account") + managed_policy_arn = ( + "arn:aws:iam::{}:policy/CloudwatchManagedPolicies".format(account_id) + ) + policy_waiter = iam_client.get_waiter("policy_exists") + policy_waiter.wait( + PolicyArn=managed_policy_arn, + WaiterConfig={"Delay": 2, "MaxAttempts": 200}, + ) + new_policy_arns = copy.copy(default_policy_arns) + new_policy_arns.extend( + [ + "arn:aws:iam::aws:policy/CloudWatchAgentAdminPolicy", + "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore", + managed_policy_arn, + ] + ) + return new_policy_arns + else: + return default_policy_arns + + @staticmethod + def cloudwatch_config_exists(config: Dict[str, Any], config_type: str) -> bool: + """Check if CloudWatch configuration was specified by the user + in their cluster config file. + + Specifically, this function checks if a CloudWatch config file is + specified by the user in their cluster config file. + + Args: + config: provider section of cluster config file. + config_type: type of CloudWatch config file. + + Returns: + True if config file is specified by user. + False if config file is not specified. + """ + cfg = config.get("cloudwatch", {}).get(config_type, {}).get("config") + return bool(cfg) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/config.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/config.py new file mode 100644 index 0000000000000000000000000000000000000000..9099b0aacc121a85d8e64b4111cdf851170b0e39 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/config.py @@ -0,0 +1,1226 @@ +import copy +import itertools +import json +import logging +import os +import time +from collections import Counter +from functools import lru_cache, partial +from typing import Any, Dict, List, Optional, Set, Tuple + +import boto3 +import botocore +from packaging.version import Version + +from ray.autoscaler._private.aws.cloudwatch.cloudwatch_helper import ( + CloudwatchHelper as cwh, +) +from ray.autoscaler._private.aws.utils import ( + LazyDefaultDict, + handle_boto_error, + resource_cache, +) +from ray.autoscaler._private.cli_logger import cf, cli_logger +from ray.autoscaler._private.event_system import CreateClusterEvent, global_event_system +from ray.autoscaler._private.providers import _PROVIDER_PRETTY_NAMES +from ray.autoscaler._private.util import check_legacy_fields +from ray.autoscaler.tags import NODE_TYPE_LEGACY_HEAD, NODE_TYPE_LEGACY_WORKER + +logger = logging.getLogger(__name__) + +RAY = "ray-autoscaler" +DEFAULT_RAY_INSTANCE_PROFILE = RAY + "-v1" +DEFAULT_RAY_IAM_ROLE = RAY + "-v1" +SECURITY_GROUP_TEMPLATE = RAY + "-{}" + +# V71.0 has CUDA 11.2 +DEFAULT_AMI_NAME = "AWS Deep Learning AMI (Ubuntu 18.04) V71.0" + +# Obtained with: +# for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do +# echo "Region: $region"; +# aws ec2 describe-images \ +# --region $region \ +# --filters "Name=name,Values=Deep Learning AMI (Ubuntu 18.04) Version 71.0*" \ +# --query "Images[].[ImageId, Name]" \ +# --output text; +# echo "--------------------------"; +# done +# TODO(alex) : write a unit test to make sure we update AMI version used in +# ray/autoscaler/aws/example-full.yaml whenever we update this dict. +DEFAULT_AMI = { + "us-east-1": "ami-0271ce88f6c03e149", # US East (N. Virginia) + "us-east-2": "ami-0ce21b0ce8e0f5a37", # US East (Ohio) + "us-west-1": "ami-030896954b2b72361", # US West (N. California) + "us-west-2": "ami-0a2b85e15b7c0ac34", # US West (Oregon) + "ca-central-1": "ami-044b98bea12677052", # Canada (Central) + "eu-central-1": "ami-004d285ecf53fb335", # EU (Frankfurt) + "eu-west-1": "ami-0e17ed40febe794a6", # EU (Ireland) + "eu-west-2": "ami-0ad9e6b9d4e22df1a", # EU (London) + "eu-west-3": "ami-05698775025146698", # EU (Paris) + "sa-east-1": "ami-004b19c7ed8d790bc", # SA (Sao Paulo) + "ap-northeast-1": "ami-03e45b1f18378ea97", # Asia Pacific (Tokyo) + "ap-northeast-2": "ami-095bae3e623e2ff99", # Asia Pacific (Seoul) + "ap-northeast-3": "ami-02fd0ba69c1ef37ad", # Asia Pacific (Osaka) + "ap-southeast-1": "ami-03ef1223872072e95", # Asia Pacific (Singapore) + "ap-southeast-2": "ami-0bcf4f75e44e0a866", # Asia Pacific (Sydney) +} + +# todo: cli_logger should handle this assert properly +# this should probably also happens somewhere else +assert Version(boto3.__version__) >= Version( + "1.4.8" +), "Boto3 version >= 1.4.8 required, try `pip install -U boto3`" + + +def key_pair(i, region, key_name): + """ + If key_name is not None, key_pair will be named after key_name. + Returns the ith default (aws_key_pair_name, key_pair_path). + """ + if i == 0: + key_pair_name = "{}_{}".format(RAY, region) if key_name is None else key_name + return ( + key_pair_name, + os.path.expanduser("~/.ssh/{}.pem".format(key_pair_name)), + ) + + key_pair_name = ( + "{}_{}_{}".format(RAY, i, region) + if key_name is None + else key_name + "_key-{}".format(i) + ) + return (key_pair_name, os.path.expanduser("~/.ssh/{}.pem".format(key_pair_name))) + + +# Suppress excessive connection dropped logs from boto +logging.getLogger("botocore").setLevel(logging.WARNING) + +_log_info = {} + + +def reload_log_state(override_log_info): + _log_info.update(override_log_info) + + +def get_log_state(): + return _log_info.copy() + + +def _set_config_info(**kwargs): + """Record configuration artifacts useful for logging.""" + + # todo: this is technically fragile iff we ever use multiple configs + + for k, v in kwargs.items(): + _log_info[k] = v + + +def _arn_to_name(arn): + return arn.split(":")[-1].split("/")[-1] + + +def log_to_cli(config: Dict[str, Any]) -> None: + provider_name = _PROVIDER_PRETTY_NAMES.get("aws", None) + + cli_logger.doassert( + provider_name is not None, "Could not find a pretty name for the AWS provider." + ) + + head_node_type = config["head_node_type"] + head_node_config = config["available_node_types"][head_node_type]["node_config"] + + with cli_logger.group("{} config", provider_name): + + def print_info( + resource_string: str, + key: str, + src_key: str, + allowed_tags: Optional[List[str]] = None, + list_value: bool = False, + ) -> None: + if allowed_tags is None: + allowed_tags = ["default"] + + node_tags = {} + + # set of configurations corresponding to `key` + unique_settings = set() + + for node_type_key, node_type in config["available_node_types"].items(): + node_tags[node_type_key] = {} + tag = _log_info[src_key][node_type_key] + if tag in allowed_tags: + node_tags[node_type_key][tag] = True + setting = node_type["node_config"].get(key) + + if list_value: + unique_settings.add(tuple(setting)) + else: + unique_settings.add(setting) + + head_value_str = head_node_config[key] + if list_value: + head_value_str = cli_logger.render_list(head_value_str) + + if len(unique_settings) == 1: + # all node types are configured the same, condense + # log output + cli_logger.labeled_value( + resource_string + " (all available node types)", + "{}", + head_value_str, + _tags=node_tags[config["head_node_type"]], + ) + else: + # do head node type first + cli_logger.labeled_value( + resource_string + f" ({head_node_type})", + "{}", + head_value_str, + _tags=node_tags[head_node_type], + ) + + # go through remaining types + for node_type_key, node_type in config["available_node_types"].items(): + if node_type_key == head_node_type: + continue + workers_value_str = node_type["node_config"][key] + if list_value: + workers_value_str = cli_logger.render_list(workers_value_str) + cli_logger.labeled_value( + resource_string + f" ({node_type_key})", + "{}", + workers_value_str, + _tags=node_tags[node_type_key], + ) + + tags = {"default": _log_info["head_instance_profile_src"] == "default"} + # head_node_config is the head_node_type's config, + # config["head_node"] is a field that gets applied only to the actual + # head node (and not workers of the head's node_type) + assert ( + "IamInstanceProfile" in head_node_config + or "IamInstanceProfile" in config["head_node"] + ) + if "IamInstanceProfile" in head_node_config: + # If the user manually configured the role we're here. + IamProfile = head_node_config["IamInstanceProfile"] + elif "IamInstanceProfile" in config["head_node"]: + # If we filled the default IAM role, we're here. + IamProfile = config["head_node"]["IamInstanceProfile"] + profile_arn = IamProfile.get("Arn") + profile_name = _arn_to_name(profile_arn) if profile_arn else IamProfile["Name"] + cli_logger.labeled_value("IAM Profile", "{}", profile_name, _tags=tags) + + if all( + "KeyName" in node_type["node_config"] + for node_type in config["available_node_types"].values() + ): + print_info("EC2 Key pair", "KeyName", "keypair_src") + + print_info("VPC Subnets", "SubnetIds", "subnet_src", list_value=True) + print_info( + "EC2 Security groups", + "SecurityGroupIds", + "security_group_src", + list_value=True, + ) + print_info("EC2 AMI", "ImageId", "ami_src", allowed_tags=["dlami"]) + + cli_logger.newline() + + +def bootstrap_aws(config): + # create a copy of the input config to modify + config = copy.deepcopy(config) + + # Log warnings if user included deprecated `head_node` or `worker_nodes` + # fields. Raise error if no `available_node_types` + check_legacy_fields(config) + # Used internally to store head IAM role. + config["head_node"] = {} + + # If a LaunchTemplate is provided, extract the necessary fields for the + # config stages below. + config = _configure_from_launch_template(config) + + # If NetworkInterfaces are provided, extract the necessary fields for the + # config stages below. + config = _configure_from_network_interfaces(config) + + # The head node needs to have an IAM role that allows it to create further + # EC2 instances. + config = _configure_iam_role(config) + + # Configure SSH access, using an existing key pair if possible. + config = _configure_key_pair(config) + global_event_system.execute_callback( + CreateClusterEvent.ssh_keypair_downloaded, + {"ssh_key_path": config["auth"]["ssh_private_key"]}, + ) + + # Pick a reasonable subnet if not specified by the user. + config = _configure_subnet(config) + + # Cluster workers should be in a security group that permits traffic within + # the group, and also SSH access from outside. + config = _configure_security_group(config) + + # Provide a helpful message for missing AMI. + _check_ami(config) + + return config + + +def _configure_iam_role(config): + head_node_type = config["head_node_type"] + head_node_config = config["available_node_types"][head_node_type]["node_config"] + if "IamInstanceProfile" in head_node_config: + _set_config_info(head_instance_profile_src="config") + return config + _set_config_info(head_instance_profile_src="default") + + instance_profile_name = cwh.resolve_instance_profile_name( + config["provider"], + DEFAULT_RAY_INSTANCE_PROFILE, + ) + profile = _get_instance_profile(instance_profile_name, config) + + if profile is None: + cli_logger.verbose( + "Creating new IAM instance profile {} for use as the default.", + cf.bold(instance_profile_name), + ) + client = _client("iam", config) + client.create_instance_profile(InstanceProfileName=instance_profile_name) + profile = _get_instance_profile(instance_profile_name, config) + time.sleep(15) # wait for propagation + + cli_logger.doassert( + profile is not None, "Failed to create instance profile." + ) # todo: err msg + assert profile is not None, "Failed to create instance profile" + + if not profile.roles: + role_name = cwh.resolve_iam_role_name(config["provider"], DEFAULT_RAY_IAM_ROLE) + role = _get_role(role_name, config) + if role is None: + cli_logger.verbose( + "Creating new IAM role {} for use as the default instance role.", + cf.bold(role_name), + ) + iam = _resource("iam", config) + policy_doc = { + "Statement": [ + { + "Effect": "Allow", + "Principal": {"Service": "ec2.amazonaws.com"}, + "Action": "sts:AssumeRole", + }, + ] + } + attach_policy_arns = cwh.resolve_policy_arns( + config["provider"], + iam, + [ + "arn:aws:iam::aws:policy/AmazonEC2FullAccess", + "arn:aws:iam::aws:policy/AmazonS3FullAccess", + ], + ) + + iam.create_role( + RoleName=role_name, AssumeRolePolicyDocument=json.dumps(policy_doc) + ) + role = _get_role(role_name, config) + cli_logger.doassert( + role is not None, "Failed to create role." + ) # todo: err msg + + assert role is not None, "Failed to create role" + + for policy_arn in attach_policy_arns: + role.attach_policy(PolicyArn=policy_arn) + + profile.add_role(RoleName=role.name) + time.sleep(15) # wait for propagation + # Add IAM role to "head_node" field so that it is applied only to + # the head node -- not to workers with the same node type as the head. + config["head_node"]["IamInstanceProfile"] = {"Arn": profile.arn} + + return config + + +def _configure_key_pair(config): + node_types = config["available_node_types"] + + # map from node type key -> source of KeyName field + key_pair_src_info = {} + _set_config_info(keypair_src=key_pair_src_info) + + if "ssh_private_key" in config["auth"]: + for node_type_key in node_types: + # keypairs should be provided in the config + key_pair_src_info[node_type_key] = "config" + + # If the key is not configured via the cloudinit + # UserData, it should be configured via KeyName or + # else we will risk starting a node that we cannot + # SSH into: + + for node_type in node_types: + node_config = node_types[node_type]["node_config"] + if "UserData" not in node_config: + cli_logger.doassert( + "KeyName" in node_config, _key_assert_msg(node_type) + ) + assert "KeyName" in node_config + + return config + + for node_type_key in node_types: + key_pair_src_info[node_type_key] = "default" + + ec2 = _resource("ec2", config) + + # Writing the new ssh key to the filesystem fails if the ~/.ssh + # directory doesn't already exist. + os.makedirs(os.path.expanduser("~/.ssh"), exist_ok=True) + + # Try a few times to get or create a good key pair. + MAX_NUM_KEYS = 600 + for i in range(MAX_NUM_KEYS): + + key_name = config["provider"].get("key_pair", {}).get("key_name") + + key_name, key_path = key_pair(i, config["provider"]["region"], key_name) + key = _get_key(key_name, config) + + # Found a good key. + if key and os.path.exists(key_path): + break + + # We can safely create a new key. + if not key and not os.path.exists(key_path): + cli_logger.verbose( + "Creating new key pair {} for use as the default.", cf.bold(key_name) + ) + key = ec2.create_key_pair(KeyName=key_name) + + # We need to make sure to _create_ the file with the right + # permissions. In order to do that we need to change the default + # os.open behavior to include the mode we want. + with open(key_path, "w", opener=partial(os.open, mode=0o600)) as f: + f.write(key.key_material) + break + + if not key: + cli_logger.abort( + "No matching local key file for any of the key pairs in this " + "account with ids from 0..{}. " + "Consider deleting some unused keys pairs from your account.", + key_name, + ) + + cli_logger.doassert( + os.path.exists(key_path), + "Private key file " + cf.bold("{}") + " not found for " + cf.bold("{}"), + key_path, + key_name, + ) # todo: err msg + assert os.path.exists(key_path), "Private key file {} not found for {}".format( + key_path, key_name + ) + + config["auth"]["ssh_private_key"] = key_path + for node_type in node_types.values(): + node_config = node_type["node_config"] + node_config["KeyName"] = key_name + + return config + + +def _key_assert_msg(node_type: str) -> str: + if node_type == NODE_TYPE_LEGACY_WORKER: + return "`KeyName` missing for worker nodes." + elif node_type == NODE_TYPE_LEGACY_HEAD: + return "`KeyName` missing for head node." + else: + return ( + "`KeyName` missing from the `node_config` of" f" node type `{node_type}`." + ) + + +def _usable_subnet_ids( + user_specified_subnets: Optional[List[Any]], + all_subnets: List[Any], + azs: Optional[str], + vpc_id_of_sg: Optional[str], + use_internal_ips: bool, + node_type_key: str, +) -> Tuple[List[str], str]: + """Prunes subnets down to those that meet the following criteria. + + Subnets must be: + * 'Available' according to AWS. + * Public, unless `use_internal_ips` is specified. + * In one of the AZs, if AZs are provided. + * In the given VPC, if a VPC is specified for Security Groups. + + Returns: + List[str]: Subnets that are usable. + str: VPC ID of the first subnet. + """ + + def _are_user_subnets_pruned(current_subnets: List[Any]) -> bool: + return user_specified_subnets is not None and len(current_subnets) != len( + user_specified_subnets + ) + + def _get_pruned_subnets(current_subnets: List[Any]) -> Set[str]: + current_subnet_ids = {s.subnet_id for s in current_subnets} + user_specified_subnet_ids = {s.subnet_id for s in user_specified_subnets} + return user_specified_subnet_ids - current_subnet_ids + + try: + candidate_subnets = ( + user_specified_subnets + if user_specified_subnets is not None + else all_subnets + ) + if vpc_id_of_sg: + candidate_subnets = [ + s for s in candidate_subnets if s.vpc_id == vpc_id_of_sg + ] + subnets = sorted( + ( + s + for s in candidate_subnets + if s.state == "available" + and (use_internal_ips or s.map_public_ip_on_launch) + ), + reverse=True, # sort from Z-A + key=lambda subnet: subnet.availability_zone, + ) + except botocore.exceptions.ClientError as exc: + handle_boto_error(exc, "Failed to fetch available subnets from AWS.") + raise exc + + if not subnets: + cli_logger.abort( + f"No usable subnets found for node type {node_type_key}, try " + "manually creating an instance in your specified region to " + "populate the list of subnets and trying this again.\n" + "Note that the subnet must map public IPs " + "on instance launch unless you set `use_internal_ips: true` in " + "the `provider` config." + ) + elif _are_user_subnets_pruned(subnets): + cli_logger.abort( + f"The specified subnets for node type {node_type_key} are not " + f"usable: {_get_pruned_subnets(subnets)}" + ) + + if azs is not None: + azs = [az.strip() for az in azs.split(",")] + subnets = [ + s + for az in azs # Iterate over AZs first to maintain the ordering + for s in subnets + if s.availability_zone == az + ] + if not subnets: + cli_logger.abort( + f"No usable subnets matching availability zone {azs} found " + f"for node type {node_type_key}.\nChoose a different " + "availability zone or try manually creating an instance in " + "your specified region to populate the list of subnets and " + "trying this again." + ) + elif _are_user_subnets_pruned(subnets): + cli_logger.abort( + f"MISMATCH between specified subnets and Availability Zones! " + "The following Availability Zones were specified in the " + f"`provider section`: {azs}.\n The following subnets for node " + f"type `{node_type_key}` have no matching availability zone: " + f"{list(_get_pruned_subnets(subnets))}." + ) + + # Use subnets in only one VPC, so that _configure_security_groups only + # needs to create a security group in this one VPC. Otherwise, we'd need + # to set up security groups in all of the user's VPCs and set up networking + # rules to allow traffic between these groups. + # See https://github.com/ray-project/ray/pull/14868. + first_subnet_vpc_id = subnets[0].vpc_id + subnets = [s.subnet_id for s in subnets if s.vpc_id == subnets[0].vpc_id] + if _are_user_subnets_pruned(subnets): + subnet_vpcs = {s.subnet_id: s.vpc_id for s in user_specified_subnets} + cli_logger.abort( + f"Subnets specified in more than one VPC for node type `{node_type_key}`! " + f"Please ensure that all subnets share the same VPC and retry your " + "request. Subnet VPCs: {}", + subnet_vpcs, + ) + return subnets, first_subnet_vpc_id + + +def _configure_subnet(config): + ec2 = _resource("ec2", config) + + # If head or worker security group is specified, filter down to subnets + # belonging to the same VPC as the security group. + sg_ids = [] + for node_type in config["available_node_types"].values(): + node_config = node_type["node_config"] + sg_ids.extend(node_config.get("SecurityGroupIds", [])) + if sg_ids: + vpc_id_of_sg = _get_vpc_id_of_sg(sg_ids, config) + else: + vpc_id_of_sg = None + + # map from node type key -> source of SubnetIds field + subnet_src_info = {} + _set_config_info(subnet_src=subnet_src_info) + all_subnets = list(ec2.subnets.all()) + # separate node types with and without user-specified subnets + node_types_subnets = [] + node_types_no_subnets = [] + for key, node_type in config["available_node_types"].items(): + if "SubnetIds" in node_type["node_config"]: + node_types_subnets.append((key, node_type)) + else: + node_types_no_subnets.append((key, node_type)) + + vpc_id = None + + # iterate over node types with user-specified subnets first... + for key, node_type in node_types_subnets: + node_config = node_type["node_config"] + user_subnets = _get_subnets_or_die(ec2, tuple(node_config["SubnetIds"])) + subnet_ids, vpc_id = _usable_subnet_ids( + user_subnets, + all_subnets, + azs=config["provider"].get("availability_zone"), + vpc_id_of_sg=vpc_id_of_sg, + use_internal_ips=config["provider"].get("use_internal_ips", False), + node_type_key=key, + ) + subnet_src_info[key] = "config" + + # lock-in a good VPC shared by the last set of user-specified subnets... + if vpc_id and not vpc_id_of_sg: + vpc_id_of_sg = vpc_id + + # iterate over node types without user-specified subnets last... + for key, node_type in node_types_no_subnets: + node_config = node_type["node_config"] + subnet_ids, vpc_id = _usable_subnet_ids( + None, + all_subnets, + azs=config["provider"].get("availability_zone"), + vpc_id_of_sg=vpc_id_of_sg, + use_internal_ips=config["provider"].get("use_internal_ips", False), + node_type_key=key, + ) + subnet_src_info[key] = "default" + node_config["SubnetIds"] = subnet_ids + + return config + + +def _get_vpc_id_of_sg(sg_ids: List[str], config: Dict[str, Any]) -> str: + """Returns the VPC id of the security groups with the provided security + group ids. + + Errors if the provided security groups belong to multiple VPCs. + Errors if no security group with any of the provided ids is identified. + """ + # sort security group IDs to support deterministic unit test stubbing + sg_ids = sorted(set(sg_ids)) + + ec2 = _resource("ec2", config) + filters = [{"Name": "group-id", "Values": sg_ids}] + security_groups = ec2.security_groups.filter(Filters=filters) + vpc_ids = [sg.vpc_id for sg in security_groups] + vpc_ids = list(set(vpc_ids)) + + multiple_vpc_msg = ( + "All security groups specified in the cluster config " + "should belong to the same VPC." + ) + cli_logger.doassert(len(vpc_ids) <= 1, multiple_vpc_msg) + assert len(vpc_ids) <= 1, multiple_vpc_msg + + no_sg_msg = ( + "Failed to detect a security group with id equal to any of " + "the configured SecurityGroupIds." + ) + cli_logger.doassert(len(vpc_ids) > 0, no_sg_msg) + assert len(vpc_ids) > 0, no_sg_msg + + return vpc_ids[0] + + +def _configure_security_group(config): + # map from node type key -> source of SecurityGroupIds field + security_group_info_src = {} + _set_config_info(security_group_src=security_group_info_src) + + for node_type_key in config["available_node_types"]: + security_group_info_src[node_type_key] = "config" + + node_types_to_configure = [ + node_type_key + for node_type_key, node_type in config["available_node_types"].items() + if "SecurityGroupIds" not in node_type["node_config"] + ] + if not node_types_to_configure: + return config # have user-defined groups + head_node_type = config["head_node_type"] + if config["head_node_type"] in node_types_to_configure: + # configure head node security group last for determinism + # in tests + node_types_to_configure.remove(head_node_type) + node_types_to_configure.append(head_node_type) + security_groups = _upsert_security_groups(config, node_types_to_configure) + + for node_type_key in node_types_to_configure: + node_config = config["available_node_types"][node_type_key]["node_config"] + sg = security_groups[node_type_key] + node_config["SecurityGroupIds"] = [sg.id] + security_group_info_src[node_type_key] = "default" + + return config + + +def _check_ami(config): + """Provide helpful message for missing ImageId for node configuration.""" + + # map from node type key -> source of ImageId field + ami_src_info = {key: "config" for key in config["available_node_types"]} + _set_config_info(ami_src=ami_src_info) + + region = config["provider"]["region"] + default_ami = DEFAULT_AMI.get(region) + + for key, node_type in config["available_node_types"].items(): + node_config = node_type["node_config"] + node_ami = node_config.get("ImageId", "").lower() + if node_ami in ["", "latest_dlami"]: + if not default_ami: + cli_logger.abort( + f"Node type `{key}` has no ImageId in its node_config " + f"and no default AMI is available for the region `{region}`. " + "ImageId will need to be set manually in your cluster config." + ) + else: + node_config["ImageId"] = default_ami + ami_src_info[key] = "dlami" + + +def _upsert_security_groups(config, node_types): + security_groups = _get_or_create_vpc_security_groups(config, node_types) + _upsert_security_group_rules(config, security_groups) + + return security_groups + + +def _get_or_create_vpc_security_groups(conf, node_types): + # Figure out which VPC each node_type is in... + ec2 = _resource("ec2", conf) + node_type_to_vpc = { + node_type: _get_vpc_id_or_die( + ec2, + conf["available_node_types"][node_type]["node_config"]["SubnetIds"][0], + ) + for node_type in node_types + } + + # Generate the name of the security group we're looking for... + expected_sg_name = ( + conf["provider"] + .get("security_group", {}) + .get("GroupName", SECURITY_GROUP_TEMPLATE.format(conf["cluster_name"])) + ) + + # Figure out which security groups with this name exist for each VPC... + vpc_to_existing_sg = { + sg.vpc_id: sg + for sg in _get_security_groups( + conf, + node_type_to_vpc.values(), + [expected_sg_name], + ) + } + + # Lazily create any security group we're missing for each VPC... + vpc_to_sg = LazyDefaultDict( + partial(_create_security_group, conf, group_name=expected_sg_name), + vpc_to_existing_sg, + ) + + # Then return a mapping from each node_type to its security group... + return { + node_type: vpc_to_sg[vpc_id] for node_type, vpc_id in node_type_to_vpc.items() + } + + +def _get_vpc_id_or_die(ec2, subnet_id: str): + subnets = _get_subnets_or_die(ec2, (subnet_id,)) + cli_logger.doassert( + len(subnets) == 1, + f"Expected 1 subnet with ID `{subnet_id}` but found {len(subnets)}", + ) + return subnets[0].vpc_id + + +@lru_cache() +def _get_subnets_or_die(ec2, subnet_ids: Tuple[str]): + # Remove any duplicates as multiple interfaces are allowed to use same subnet + subnet_ids = tuple(Counter(subnet_ids).keys()) + subnets = list( + ec2.subnets.filter(Filters=[{"Name": "subnet-id", "Values": list(subnet_ids)}]) + ) + + # TODO: better error message + cli_logger.doassert( + len(subnets) == len(subnet_ids), "Not all subnet IDs found: {}", subnet_ids + ) + assert len(subnets) == len(subnet_ids), "Subnet ID not found: {}".format(subnet_ids) + return subnets + + +def _get_security_group(config, vpc_id, group_name): + security_group = _get_security_groups(config, [vpc_id], [group_name]) + return None if not security_group else security_group[0] + + +def _get_security_groups(config, vpc_ids, group_names): + unique_vpc_ids = list(set(vpc_ids)) + unique_group_names = set(group_names) + + ec2 = _resource("ec2", config) + existing_groups = list( + ec2.security_groups.filter( + Filters=[{"Name": "vpc-id", "Values": unique_vpc_ids}] + ) + ) + filtered_groups = [ + sg for sg in existing_groups if sg.group_name in unique_group_names + ] + return filtered_groups + + +def _create_security_group(config, vpc_id, group_name): + client = _client("ec2", config) + client.create_security_group( + Description="Auto-created security group for Ray workers", + GroupName=group_name, + VpcId=vpc_id, + TagSpecifications=[ + { + "ResourceType": "security-group", + "Tags": [ + {"Key": RAY, "Value": "true"}, + {"Key": "ray-cluster-name", "Value": config["cluster_name"]}, + ], + }, + ], + ) + security_group = _get_security_group(config, vpc_id, group_name) + cli_logger.doassert(security_group, "Failed to create security group") # err msg + + cli_logger.verbose( + "Created new security group {}", + cf.bold(security_group.group_name), + _tags=dict(id=security_group.id), + ) + cli_logger.doassert(security_group, "Failed to create security group") # err msg + assert security_group, "Failed to create security group" + return security_group + + +def _upsert_security_group_rules(conf, security_groups): + sgids = {sg.id for sg in security_groups.values()} + + # Update sgids to include user-specified security groups. + # This is necessary if the user specifies the head node type's security + # groups but not the worker's, or vice-versa. + for node_type in conf["available_node_types"]: + sgids.update( + conf["available_node_types"][node_type].get("SecurityGroupIds", []) + ) + + # sort security group items for deterministic inbound rule config order + # (mainly supports more precise stub-based boto3 unit testing) + for node_type, sg in sorted(security_groups.items()): + sg = security_groups[node_type] + if not sg.ip_permissions: + _update_inbound_rules(sg, sgids, conf) + + +def _update_inbound_rules(target_security_group, sgids, config): + extended_rules = ( + config["provider"].get("security_group", {}).get("IpPermissions", []) + ) + ip_permissions = _create_default_inbound_rules(sgids, extended_rules) + target_security_group.authorize_ingress(IpPermissions=ip_permissions) + + +def _create_default_inbound_rules(sgids, extended_rules=None): + if extended_rules is None: + extended_rules = [] + intracluster_rules = _create_default_intracluster_inbound_rules(sgids) + ssh_rules = _create_default_ssh_inbound_rules() + merged_rules = itertools.chain( + intracluster_rules, + ssh_rules, + extended_rules, + ) + return list(merged_rules) + + +def _create_default_intracluster_inbound_rules(intracluster_sgids): + return [ + { + "FromPort": -1, + "ToPort": -1, + "IpProtocol": "-1", + "UserIdGroupPairs": [ + {"GroupId": security_group_id} + for security_group_id in sorted(intracluster_sgids) + # sort security group IDs for deterministic IpPermission models + # (mainly supports more precise stub-based boto3 unit testing) + ], + } + ] + + +def _create_default_ssh_inbound_rules(): + return [ + { + "FromPort": 22, + "ToPort": 22, + "IpProtocol": "tcp", + "IpRanges": [{"CidrIp": "0.0.0.0/0"}], + } + ] + + +def _get_role(role_name, config): + iam = _resource("iam", config) + role = iam.Role(role_name) + try: + role.load() + return role + except botocore.exceptions.ClientError as exc: + if exc.response.get("Error", {}).get("Code") == "NoSuchEntity": + return None + else: + handle_boto_error( + exc, + "Failed to fetch IAM role data for {} from AWS.", + cf.bold(role_name), + ) + raise exc + + +def _get_instance_profile(profile_name, config): + iam = _resource("iam", config) + profile = iam.InstanceProfile(profile_name) + try: + profile.load() + return profile + except botocore.exceptions.ClientError as exc: + if exc.response.get("Error", {}).get("Code") == "NoSuchEntity": + return None + else: + handle_boto_error( + exc, + "Failed to fetch IAM instance profile data for {} from AWS.", + cf.bold(profile_name), + ) + raise exc + + +def _get_key(key_name, config): + ec2 = _resource("ec2", config) + try: + for key in ec2.key_pairs.filter( + Filters=[{"Name": "key-name", "Values": [key_name]}] + ): + if key.name == key_name: + return key + except botocore.exceptions.ClientError as exc: + handle_boto_error( + exc, "Failed to fetch EC2 key pair {} from AWS.", cf.bold(key_name) + ) + raise exc + + +def _configure_from_launch_template(config: Dict[str, Any]) -> Dict[str, Any]: + """Merges any launch template data referenced by the node config of all + available node type's into their parent node config. Any parameters + specified in node config override the same parameters in the launch + template, in compliance with the behavior of the ec2.create_instances + API. + + Args: + config (Dict[str, Any]): config to bootstrap + + Returns: + config (Dict[str, Any]): The input config with all launch template + data merged into the node config of all available node types. If no + launch template data is found, then the config is returned + unchanged. + + Raises: + ValueError: When no launch template is found for the given launch template + [name|id] and version, or more than one launch template is found. + """ + # create a copy of the input config to modify + config = copy.deepcopy(config) + node_types = config["available_node_types"] + + # iterate over sorted node types to support deterministic unit test stubs + for name, node_type in sorted(node_types.items()): + node_types[name] = _configure_node_type_from_launch_template(config, node_type) + return config + + +def _configure_node_type_from_launch_template( + config: Dict[str, Any], node_type: Dict[str, Any] +) -> Dict[str, Any]: + """Merges any launch template data referenced by the given node type's + node config into the parent node config. Any parameters specified in + node config override the same parameters in the launch template. + + Args: + config (Dict[str, Any]): config to bootstrap + node_type (Dict[str, Any]): node type config to bootstrap + + Returns: + node_type (Dict[str, Any]): The input config with all launch template + data merged into the node config of the input node type. If no + launch template data is found, then the config is returned + unchanged. + + Raises: + ValueError: When no launch template is found for the given launch template + [name|id] and version, or more than one launch template is found. + """ + # create a copy of the input config to modify + node_type = copy.deepcopy(node_type) + + node_cfg = node_type["node_config"] + if "LaunchTemplate" in node_cfg: + node_type["node_config"] = _configure_node_cfg_from_launch_template( + config, node_cfg + ) + return node_type + + +def _configure_node_cfg_from_launch_template( + config: Dict[str, Any], node_cfg: Dict[str, Any] +) -> Dict[str, Any]: + """Merges any launch template data referenced by the given node type's + node config into the parent node config. Any parameters specified in + node config override the same parameters in the launch template. + + Note that this merge is simply a bidirectional dictionary update, from + the node config to the launch template data, and from the launch + template data to the node config. Thus, the final result captures the + relative complement of launch template data with respect to node config, + and allows all subsequent config bootstrapping code paths to act as + if the complement was explicitly specified in the user's node config. A + deep merge of nested elements like tag specifications isn't required + here, since the AWSNodeProvider's ec2.create_instances call will do this + for us after it fetches the referenced launch template data. + + Args: + config (Dict[str, Any]): config to bootstrap + node_cfg (Dict[str, Any]): node config to bootstrap + + Returns: + node_cfg (Dict[str, Any]): The input node config merged with all launch + template data. If no launch template data is found, then the node + config is returned unchanged. + + Raises: + ValueError: When no launch template is found for the given launch template + [name|id] and version, or more than one launch template is found. + """ + # create a copy of the input config to modify + node_cfg = copy.deepcopy(node_cfg) + + ec2 = _client("ec2", config) + kwargs = copy.deepcopy(node_cfg["LaunchTemplate"]) + template_version = str(kwargs.pop("Version", "$Default")) + # save the launch template version as a string to prevent errors from + # passing an integer to ec2.create_instances in AWSNodeProvider + node_cfg["LaunchTemplate"]["Version"] = template_version + kwargs["Versions"] = [template_version] if template_version else [] + + template = ec2.describe_launch_template_versions(**kwargs) + lt_versions = template["LaunchTemplateVersions"] + if len(lt_versions) != 1: + raise ValueError( + f"Expected to find 1 launch template but found " f"{len(lt_versions)}" + ) + + lt_data = template["LaunchTemplateVersions"][0]["LaunchTemplateData"] + # override launch template parameters with explicit node config parameters + lt_data.update(node_cfg) + # copy all new launch template parameters back to node config + node_cfg.update(lt_data) + + return node_cfg + + +def _configure_from_network_interfaces(config: Dict[str, Any]) -> Dict[str, Any]: + """Copies all network interface subnet and security group IDs up to their + parent node config for each available node type. + + Args: + config (Dict[str, Any]): config to bootstrap + + Returns: + config (Dict[str, Any]): The input config with all network interface + subnet and security group IDs copied into the node config of all + available node types. If no network interfaces are found, then the + config is returned unchanged. + + Raises: + ValueError: If [1] subnet and security group IDs exist at both the + node config and network interface levels, [2] any network interface + doesn't have a subnet defined, or [3] any network interface doesn't + have a security group defined. + """ + # create a copy of the input config to modify + config = copy.deepcopy(config) + + node_types = config["available_node_types"] + for name, node_type in node_types.items(): + node_types[name] = _configure_node_type_from_network_interface(node_type) + return config + + +def _configure_node_type_from_network_interface( + node_type: Dict[str, Any] +) -> Dict[str, Any]: + """Copies all network interface subnet and security group IDs up to the + parent node config for the given node type. + + Args: + node_type (Dict[str, Any]): node type config to bootstrap + + Returns: + node_type (Dict[str, Any]): The input config with all network interface + subnet and security group IDs copied into the node config of the + given node type. If no network interfaces are found, then the + config is returned unchanged. + + Raises: + ValueError: If [1] subnet and security group IDs exist at both the + node config and network interface levels, [2] any network interface + doesn't have a subnet defined, or [3] any network interface doesn't + have a security group defined. + """ + # create a copy of the input config to modify + node_type = copy.deepcopy(node_type) + + node_cfg = node_type["node_config"] + if "NetworkInterfaces" in node_cfg: + node_type[ + "node_config" + ] = _configure_subnets_and_groups_from_network_interfaces(node_cfg) + return node_type + + +def _configure_subnets_and_groups_from_network_interfaces( + node_cfg: Dict[str, Any] +) -> Dict[str, Any]: + """Copies all network interface subnet and security group IDs into their + parent node config. + + Args: + node_cfg (Dict[str, Any]): node config to bootstrap + + Returns: + node_cfg (Dict[str, Any]): node config with all copied network + interface subnet and security group IDs + + Raises: + ValueError: If [1] subnet and security group IDs exist at both the + node config and network interface levels, [2] any network interface + doesn't have a subnet defined, or [3] any network interface doesn't + have a security group defined. + """ + # create a copy of the input config to modify + node_cfg = copy.deepcopy(node_cfg) + + # If NetworkInterfaces are defined, SubnetId and SecurityGroupIds + # can't be specified in the same node type config. + conflict_keys = ["SubnetId", "SubnetIds", "SecurityGroupIds"] + if any(conflict in node_cfg for conflict in conflict_keys): + raise ValueError( + "If NetworkInterfaces are defined, subnets and security groups " + "must ONLY be given in each NetworkInterface." + ) + subnets = _subnets_in_network_config(node_cfg) + if not all(subnets): + raise ValueError( + "NetworkInterfaces are defined but at least one is missing a " + "subnet. Please ensure all interfaces have a subnet assigned." + ) + security_groups = _security_groups_in_network_config(node_cfg) + if not all(security_groups): + raise ValueError( + "NetworkInterfaces are defined but at least one is missing a " + "security group. Please ensure all interfaces have a security " + "group assigned." + ) + node_cfg["SubnetIds"] = subnets + node_cfg["SecurityGroupIds"] = list(itertools.chain(*security_groups)) + + return node_cfg + + +def _subnets_in_network_config(config: Dict[str, Any]) -> List[str]: + """ + Returns all subnet IDs found in the given node config's network interfaces. + + Args: + config (Dict[str, Any]): node config + Returns: + subnet_ids (List[str]): List of subnet IDs for all network interfaces, + or an empty list if no network interfaces are defined. An empty string + is returned for each missing network interface subnet ID. + """ + return [ni.get("SubnetId", "") for ni in config.get("NetworkInterfaces", [])] + + +def _security_groups_in_network_config(config: Dict[str, Any]) -> List[List[str]]: + """ + Returns all security group IDs found in the given node config's network + interfaces. + + Args: + config (Dict[str, Any]): node config + Returns: + security_group_ids (List[List[str]]): List of security group ID lists + for all network interfaces, or an empty list if no network interfaces + are defined. An empty list is returned for each missing network + interface security group list. + """ + return [ni.get("Groups", []) for ni in config.get("NetworkInterfaces", [])] + + +def _client(name, config): + return _resource(name, config).meta.client + + +def _resource(name, config): + region = config["provider"]["region"] + aws_credentials = config["provider"].get("aws_credentials", {}) + return resource_cache(name, region, **aws_credentials) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..f11e8a6dbcdb0109c9f2f92382b2afce18fc578a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/node_provider.py @@ -0,0 +1,708 @@ +import copy +import logging +import sys +import threading +import time +from collections import OrderedDict, defaultdict +from typing import Any, Dict, List + +import botocore +from boto3.resources.base import ServiceResource + +import ray +import ray._private.ray_constants as ray_constants +from ray.autoscaler._private.aws.cloudwatch.cloudwatch_helper import ( + CLOUDWATCH_AGENT_INSTALLED_AMI_TAG, + CLOUDWATCH_AGENT_INSTALLED_TAG, + CloudwatchHelper, +) +from ray.autoscaler._private.aws.config import bootstrap_aws +from ray.autoscaler._private.aws.utils import ( + boto_exception_handler, + client_cache, + resource_cache, +) +from ray.autoscaler._private.cli_logger import cf, cli_logger +from ray.autoscaler._private.constants import BOTO_CREATE_MAX_RETRIES, BOTO_MAX_RETRIES +from ray.autoscaler._private.log_timer import LogTimer +from ray.autoscaler.node_launch_exception import NodeLaunchException +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + TAG_RAY_CLUSTER_NAME, + TAG_RAY_LAUNCH_CONFIG, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_USER_NODE_TYPE, +) + +logger = logging.getLogger(__name__) + +TAG_BATCH_DELAY = 1 +LIST_RETRY_DELAY_SEC = 1 + + +def to_aws_format(tags): + """Convert the Ray node name tag to the AWS-specific 'Name' tag.""" + + if TAG_RAY_NODE_NAME in tags: + tags["Name"] = tags[TAG_RAY_NODE_NAME] + del tags[TAG_RAY_NODE_NAME] + return tags + + +def from_aws_format(tags): + """Convert the AWS-specific 'Name' tag to the Ray node name tag.""" + + if "Name" in tags: + tags[TAG_RAY_NODE_NAME] = tags["Name"] + del tags["Name"] + return tags + + +def make_ec2_resource(region, max_retries, aws_credentials=None) -> ServiceResource: + """Make client, retrying requests up to `max_retries`.""" + aws_credentials = aws_credentials or {} + return resource_cache("ec2", region, max_retries, **aws_credentials) + + +def list_ec2_instances( + region: str, aws_credentials: Dict[str, Any] = None +) -> List[Dict[str, Any]]: + """Get all instance-types/resources available in the user's AWS region. + Args: + region: the region of the AWS provider. e.g., "us-west-2". + Returns: + final_instance_types: a list of instances. An example of one element in + the list: + {'InstanceType': 'm5a.xlarge', 'ProcessorInfo': + {'SupportedArchitectures': ['x86_64'], 'SustainedClockSpeedInGhz': + 2.5},'VCpuInfo': {'DefaultVCpus': 4, 'DefaultCores': 2, + 'DefaultThreadsPerCore': 2, 'ValidCores': [2], + 'ValidThreadsPerCore': [1, 2]}, 'MemoryInfo': {'SizeInMiB': 16384}, + ...} + + """ + final_instance_types = [] + aws_credentials = aws_credentials or {} + ec2 = client_cache("ec2", region, BOTO_MAX_RETRIES, **aws_credentials) + instance_types = ec2.describe_instance_types() + final_instance_types.extend(copy.deepcopy(instance_types["InstanceTypes"])) + while "NextToken" in instance_types: + instance_types = ec2.describe_instance_types( + NextToken=instance_types["NextToken"] + ) + final_instance_types.extend(copy.deepcopy(instance_types["InstanceTypes"])) + + return final_instance_types + + +class AWSNodeProvider(NodeProvider): + max_terminate_nodes = 1000 + + def __init__(self, provider_config, cluster_name): + NodeProvider.__init__(self, provider_config, cluster_name) + self.cache_stopped_nodes = provider_config.get("cache_stopped_nodes", True) + aws_credentials = provider_config.get("aws_credentials") + + self.ec2 = make_ec2_resource( + region=provider_config["region"], + max_retries=BOTO_MAX_RETRIES, + aws_credentials=aws_credentials, + ) + self.ec2_fail_fast = make_ec2_resource( + region=provider_config["region"], + max_retries=0, + aws_credentials=aws_credentials, + ) + + # Tags that we believe to actually be on EC2. + self.tag_cache = {} + # Tags that we will soon upload. + self.tag_cache_pending = defaultdict(dict) + # Number of threads waiting for a batched tag update. + self.batch_thread_count = 0 + self.batch_update_done = threading.Event() + self.batch_update_done.set() + self.ready_for_new_batch = threading.Event() + self.ready_for_new_batch.set() + self.tag_cache_lock = threading.Lock() + self.count_lock = threading.Lock() + + # Cache of node objects from the last nodes() call. This avoids + # excessive DescribeInstances requests. + self.cached_nodes = {} + + def non_terminated_nodes(self, tag_filters): + # Note that these filters are acceptable because they are set on + # node initialization, and so can never be sitting in the cache. + tag_filters = to_aws_format(tag_filters) + filters = [ + { + "Name": "instance-state-name", + "Values": ["pending", "running"], + }, + { + "Name": "tag:{}".format(TAG_RAY_CLUSTER_NAME), + "Values": [self.cluster_name], + }, + ] + for k, v in tag_filters.items(): + filters.append( + { + "Name": "tag:{}".format(k), + "Values": [v], + } + ) + + with boto_exception_handler("Failed to fetch running instances from AWS."): + nodes = list(self.ec2.instances.filter(Filters=filters)) + + # Populate the tag cache with initial information if necessary + for node in nodes: + if node.id in self.tag_cache: + continue + + self.tag_cache[node.id] = from_aws_format( + {x["Key"]: x["Value"] for x in node.tags} + ) + + self.cached_nodes = {node.id: node for node in nodes} + return [node.id for node in nodes] + + def is_running(self, node_id): + node = self._get_cached_node(node_id) + return node.state["Name"] == "running" + + def is_terminated(self, node_id): + node = self._get_cached_node(node_id) + state = node.state["Name"] + return state not in ["running", "pending"] + + def node_tags(self, node_id): + with self.tag_cache_lock: + d1 = self.tag_cache[node_id] + d2 = self.tag_cache_pending.get(node_id, {}) + return dict(d1, **d2) + + def external_ip(self, node_id): + node = self._get_cached_node(node_id) + + if node.public_ip_address is None: + node = self._get_node(node_id) + + return node.public_ip_address + + def internal_ip(self, node_id): + node = self._get_cached_node(node_id) + + if node.private_ip_address is None: + node = self._get_node(node_id) + + return node.private_ip_address + + def set_node_tags(self, node_id, tags): + is_batching_thread = False + with self.tag_cache_lock: + if not self.tag_cache_pending: + is_batching_thread = True + # Wait for threads in the last batch to exit + self.ready_for_new_batch.wait() + self.ready_for_new_batch.clear() + self.batch_update_done.clear() + self.tag_cache_pending[node_id].update(tags) + + if is_batching_thread: + time.sleep(TAG_BATCH_DELAY) + with self.tag_cache_lock: + self._update_node_tags() + self.batch_update_done.set() + + with self.count_lock: + self.batch_thread_count += 1 + self.batch_update_done.wait() + + with self.count_lock: + self.batch_thread_count -= 1 + if self.batch_thread_count == 0: + self.ready_for_new_batch.set() + + def _update_node_tags(self): + batch_updates = defaultdict(list) + + for node_id, tags in self.tag_cache_pending.items(): + for x in tags.items(): + batch_updates[x].append(node_id) + self.tag_cache[node_id].update(tags) + + self.tag_cache_pending = defaultdict(dict) + + self._create_tags(batch_updates) + + def _create_tags(self, batch_updates): + for (k, v), node_ids in batch_updates.items(): + m = "Set tag {}={} on {}".format(k, v, node_ids) + with LogTimer("AWSNodeProvider: {}".format(m)): + if k == TAG_RAY_NODE_NAME: + k = "Name" + self.ec2.meta.client.create_tags( + Resources=node_ids, + Tags=[{"Key": k, "Value": v}], + ) + + def create_node(self, node_config, tags, count) -> Dict[str, Any]: + """Creates instances. + + Returns dict mapping instance id to ec2.Instance object for the created + instances. + """ + # sort tags by key to support deterministic unit test stubbing + tags = OrderedDict(sorted(copy.deepcopy(tags).items())) + + reused_nodes_dict = {} + # Try to reuse previously stopped nodes with compatible configs + if self.cache_stopped_nodes: + # TODO(ekl) this is breaking the abstraction boundary a little by + # peeking into the tag set. + filters = [ + { + "Name": "instance-state-name", + "Values": ["stopped", "stopping"], + }, + { + "Name": "tag:{}".format(TAG_RAY_CLUSTER_NAME), + "Values": [self.cluster_name], + }, + { + "Name": "tag:{}".format(TAG_RAY_NODE_KIND), + "Values": [tags[TAG_RAY_NODE_KIND]], + }, + { + "Name": "tag:{}".format(TAG_RAY_LAUNCH_CONFIG), + "Values": [tags[TAG_RAY_LAUNCH_CONFIG]], + }, + ] + # This tag may not always be present. + if TAG_RAY_USER_NODE_TYPE in tags: + filters.append( + { + "Name": "tag:{}".format(TAG_RAY_USER_NODE_TYPE), + "Values": [tags[TAG_RAY_USER_NODE_TYPE]], + } + ) + + reuse_nodes = list(self.ec2.instances.filter(Filters=filters))[:count] + reuse_node_ids = [n.id for n in reuse_nodes] + reused_nodes_dict = {n.id: n for n in reuse_nodes} + if reuse_nodes: + cli_logger.print( + # todo: handle plural vs singular? + "Reusing nodes {}. " + "To disable reuse, set `cache_stopped_nodes: False` " + "under `provider` in the cluster configuration.", + cli_logger.render_list(reuse_node_ids), + ) + + # todo: timed? + with cli_logger.group("Stopping instances to reuse"): + for node in reuse_nodes: + self.tag_cache[node.id] = from_aws_format( + {x["Key"]: x["Value"] for x in node.tags} + ) + if node.state["Name"] == "stopping": + cli_logger.print("Waiting for instance {} to stop", node.id) + node.wait_until_stopped() + + self.ec2.meta.client.start_instances(InstanceIds=reuse_node_ids) + for node_id in reuse_node_ids: + self.set_node_tags(node_id, tags) + count -= len(reuse_node_ids) + + created_nodes_dict = {} + if count: + created_nodes_dict = self._create_node(node_config, tags, count) + + all_created_nodes = reused_nodes_dict + all_created_nodes.update(created_nodes_dict) + return all_created_nodes + + @staticmethod + def _merge_tag_specs( + tag_specs: List[Dict[str, Any]], user_tag_specs: List[Dict[str, Any]] + ) -> None: + """ + Merges user-provided node config tag specifications into a base + list of node provider tag specifications. The base list of + node provider tag specs is modified in-place. + + This allows users to add tags and override values of existing + tags with their own, and only applies to the resource type + "instance". All other resource types are appended to the list of + tag specs. + + Args: + tag_specs (List[Dict[str, Any]]): base node provider tag specs + user_tag_specs (List[Dict[str, Any]]): user's node config tag specs + """ + + for user_tag_spec in user_tag_specs: + if user_tag_spec["ResourceType"] == "instance": + for user_tag in user_tag_spec["Tags"]: + exists = False + for tag in tag_specs[0]["Tags"]: + if user_tag["Key"] == tag["Key"]: + exists = True + tag["Value"] = user_tag["Value"] + break + if not exists: + tag_specs[0]["Tags"] += [user_tag] + else: + tag_specs += [user_tag_spec] + + def _create_node(self, node_config, tags, count): + created_nodes_dict = {} + + tags = to_aws_format(tags) + conf = node_config.copy() + + tag_pairs = [ + { + "Key": TAG_RAY_CLUSTER_NAME, + "Value": self.cluster_name, + } + ] + for k, v in tags.items(): + tag_pairs.append( + { + "Key": k, + "Value": v, + } + ) + if CloudwatchHelper.cloudwatch_config_exists(self.provider_config, "agent"): + cwa_installed = self._check_ami_cwa_installation(node_config) + if cwa_installed: + tag_pairs.extend( + [ + { + "Key": CLOUDWATCH_AGENT_INSTALLED_TAG, + "Value": "True", + } + ] + ) + tag_specs = [ + { + "ResourceType": "instance", + "Tags": tag_pairs, + } + ] + user_tag_specs = conf.get("TagSpecifications", []) + AWSNodeProvider._merge_tag_specs(tag_specs, user_tag_specs) + + # SubnetIds is not a real config key: we must resolve to a + # single SubnetId before invoking the AWS API. + subnet_ids = conf.pop("SubnetIds") + + # update config with min/max node counts and tag specs + conf.update({"MinCount": 1, "MaxCount": count, "TagSpecifications": tag_specs}) + + # Try to always launch in the first listed subnet. + subnet_idx = 0 + cli_logger_tags = {} + # NOTE: This ensures that we try ALL availability zones before + # throwing an error. + max_tries = max(BOTO_CREATE_MAX_RETRIES, len(subnet_ids)) + for attempt in range(1, max_tries + 1): + try: + if "NetworkInterfaces" in conf: + net_ifs = conf["NetworkInterfaces"] + # remove security group IDs previously copied from network + # interfaces (create_instances call fails otherwise) + conf.pop("SecurityGroupIds", None) + cli_logger_tags["network_interfaces"] = str(net_ifs) + else: + subnet_id = subnet_ids[subnet_idx % len(subnet_ids)] + conf["SubnetId"] = subnet_id + cli_logger_tags["subnet_id"] = subnet_id + + created = self.ec2_fail_fast.create_instances(**conf) + created_nodes_dict = {n.id: n for n in created} + + # todo: timed? + # todo: handle plurality? + with cli_logger.group( + "Launched {} nodes", count, _tags=cli_logger_tags + ): + for instance in created: + # NOTE(maximsmol): This is needed for mocking + # boto3 for tests. This is likely a bug in moto + # but AWS docs don't seem to say. + # You can patch moto/ec2/responses/instances.py + # to fix this (add to EC2_RUN_INSTANCES) + + # The correct value is technically + # {"code": "0", "Message": "pending"} + state_reason = "pending" + if instance.state_reason: + state_reason = ( + instance.state_reason["Message"] or state_reason + ) + + cli_logger.print( + "Launched instance {}", + instance.instance_id, + _tags=dict( + state=instance.state["Name"], + info=state_reason, + ), + ) + break + except botocore.exceptions.ClientError as exc: + # Launch failure may be due to instance type availability in + # the given AZ + subnet_idx += 1 + if attempt == max_tries: + try: + exc = NodeLaunchException( + category=exc.response["Error"]["Code"], + description=exc.response["Error"]["Message"], + src_exc_info=sys.exc_info(), + ) + except Exception: + # In theory, all ClientError's we expect to get should + # have these fields, but just in case we can't parse + # it, it's fine, just throw the original error. + logger.warning("Couldn't parse exception.", exc) + pass + cli_logger.abort( + "Failed to launch instances. Max attempts exceeded.", + exc=exc, + ) + else: + cli_logger.warning( + "create_instances: Attempt failed with {}, retrying.", exc + ) + + return created_nodes_dict + + def terminate_node(self, node_id): + node = self._get_cached_node(node_id) + if self.cache_stopped_nodes: + if node.spot_instance_request_id: + cli_logger.print( + "Terminating instance {} " + + cf.dimmed("(cannot stop spot instances, only terminate)"), + node_id, + ) # todo: show node name? + node.terminate() + else: + cli_logger.print( + "Stopping instance {} " + + cf.dimmed( + "(to terminate instead, " + "set `cache_stopped_nodes: False` " + "under `provider` in the cluster configuration)" + ), + node_id, + ) # todo: show node name? + node.stop() + else: + node.terminate() + + # TODO (Alex): We are leaking the tag cache here. Naively, we would + # want to just remove the cache entry here, but terminating can be + # asyncrhonous or error, which would result in a use after free error. + # If this leak becomes bad, we can garbage collect the tag cache when + # the node cache is updated. + + def _check_ami_cwa_installation(self, config): + response = self.ec2.meta.client.describe_images(ImageIds=[config["ImageId"]]) + cwa_installed = False + images = response.get("Images") + if images: + assert len(images) == 1, ( + f"Expected to find only 1 AMI with the given ID, " + f"but found {len(images)}." + ) + image_name = images[0].get("Name", "") + if CLOUDWATCH_AGENT_INSTALLED_AMI_TAG in image_name: + cwa_installed = True + return cwa_installed + + def terminate_nodes(self, node_ids): + if not node_ids: + return + + terminate_instances_func = self.ec2.meta.client.terminate_instances + stop_instances_func = self.ec2.meta.client.stop_instances + + # In some cases, this function stops some nodes, but terminates others. + # Each of these requires a different EC2 API call. So, we use the + # "nodes_to_terminate" dict below to keep track of exactly which API + # call will be used to stop/terminate which set of nodes. The key is + # the function to use, and the value is the list of nodes to terminate + # with that function. + nodes_to_terminate = {terminate_instances_func: [], stop_instances_func: []} + + if self.cache_stopped_nodes: + spot_ids = [] + on_demand_ids = [] + + for node_id in node_ids: + if self._get_cached_node(node_id).spot_instance_request_id: + spot_ids += [node_id] + else: + on_demand_ids += [node_id] + + if on_demand_ids: + # todo: show node names? + cli_logger.print( + "Stopping instances {} " + + cf.dimmed( + "(to terminate instead, " + "set `cache_stopped_nodes: False` " + "under `provider` in the cluster configuration)" + ), + cli_logger.render_list(on_demand_ids), + ) + + if spot_ids: + cli_logger.print( + "Terminating instances {} " + + cf.dimmed("(cannot stop spot instances, only terminate)"), + cli_logger.render_list(spot_ids), + ) + + nodes_to_terminate[stop_instances_func] = on_demand_ids + nodes_to_terminate[terminate_instances_func] = spot_ids + else: + nodes_to_terminate[terminate_instances_func] = node_ids + + max_terminate_nodes = ( + self.max_terminate_nodes + if self.max_terminate_nodes is not None + else len(node_ids) + ) + + for terminate_func, nodes in nodes_to_terminate.items(): + for start in range(0, len(nodes), max_terminate_nodes): + terminate_func(InstanceIds=nodes[start : start + max_terminate_nodes]) + + def _get_node(self, node_id): + """Refresh and get info for this node, updating the cache.""" + self.non_terminated_nodes({}) # Side effect: updates cache + + if node_id in self.cached_nodes: + return self.cached_nodes[node_id] + + # Node not in {pending, running} -- retry with a point query. This + # usually means the node was recently preempted or terminated. + # The EC2 API is eventually consistent. This means that an instance + # might not be immediately visible. So we need to retry the query a few times. + # See: https://docs.aws.amazon.com/ec2/latest/devguide/eventual-consistency.html + # and https://github.com/ray-project/ray/issues/51861 + for attempts in range(max(BOTO_MAX_RETRIES, 1)): # at least try once. + matches = list(self.ec2.instances.filter(InstanceIds=[node_id])) + if len(matches) == 1: + return matches[0] + cli_logger.warning( + "Attempt to fetch EC2 instances that have instance ID {}. Got {} matching EC2 instances. Will retry after {} second. This is retry number {}, and the maximum number of retries is {}.", + node_id, + len(matches), + LIST_RETRY_DELAY_SEC, + attempts + 1, + BOTO_MAX_RETRIES, + ) + time.sleep(LIST_RETRY_DELAY_SEC) + raise AssertionError("Invalid instance id {}".format(node_id)) + + def _get_cached_node(self, node_id): + """Return node info from cache if possible, otherwise fetches it.""" + if node_id in self.cached_nodes: + return self.cached_nodes[node_id] + + return self._get_node(node_id) + + @staticmethod + def bootstrap_config(cluster_config): + return bootstrap_aws(cluster_config) + + @staticmethod + def fillout_available_node_types_resources( + cluster_config: Dict[str, Any] + ) -> Dict[str, Any]: + """Fills out missing "resources" field for available_node_types.""" + if "available_node_types" not in cluster_config: + return cluster_config + cluster_config = copy.deepcopy(cluster_config) + + instances_list = list_ec2_instances( + cluster_config["provider"]["region"], + cluster_config["provider"].get("aws_credentials"), + ) + instances_dict = { + instance["InstanceType"]: instance for instance in instances_list + } + available_node_types = cluster_config["available_node_types"] + head_node_type = cluster_config["head_node_type"] + for node_type in available_node_types: + instance_type = available_node_types[node_type]["node_config"][ + "InstanceType" + ] + if instance_type in instances_dict: + cpus = instances_dict[instance_type]["VCpuInfo"]["DefaultVCpus"] + + autodetected_resources = {"CPU": cpus} + if node_type != head_node_type: + # we only autodetect worker node type memory resource + memory_total = instances_dict[instance_type]["MemoryInfo"][ + "SizeInMiB" + ] + memory_total = int(memory_total) * 1024 * 1024 + prop = 1 - ray_constants.DEFAULT_OBJECT_STORE_MEMORY_PROPORTION + memory_resources = int(memory_total * prop) + autodetected_resources["memory"] = memory_resources + + for ( + accelerator_manager + ) in ray._private.accelerators.get_all_accelerator_managers(): + num_accelerators = ( + accelerator_manager.get_ec2_instance_num_accelerators( + instance_type, instances_dict + ) + ) + accelerator_type = ( + accelerator_manager.get_ec2_instance_accelerator_type( + instance_type, instances_dict + ) + ) + if num_accelerators: + autodetected_resources[ + accelerator_manager.get_resource_name() + ] = num_accelerators + if accelerator_type: + autodetected_resources[ + f"accelerator_type:{accelerator_type}" + ] = 1 + + autodetected_resources.update( + available_node_types[node_type].get("resources", {}) + ) + if autodetected_resources != available_node_types[node_type].get( + "resources", {} + ): + available_node_types[node_type][ + "resources" + ] = autodetected_resources + logger.debug( + "Updating the resources of {} to {}.".format( + node_type, autodetected_resources + ) + ) + else: + raise ValueError( + "Instance type " + + instance_type + + " is not available in AWS region: " + + cluster_config["provider"]["region"] + + "." + ) + return cluster_config diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/utils.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..72dda831a8093b460f238bb69266da1a35db8037 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/aws/utils.py @@ -0,0 +1,181 @@ +from collections import defaultdict +from functools import lru_cache + +import boto3 +from boto3.exceptions import ResourceNotExistsError +from boto3.resources.base import ServiceResource +from botocore.client import BaseClient +from botocore.config import Config + +from ray.autoscaler._private.cli_logger import cf, cli_logger +from ray.autoscaler._private.constants import BOTO_MAX_RETRIES + + +class LazyDefaultDict(defaultdict): + """ + LazyDefaultDict(default_factory[, ...]) --> dict with default factory + + The default factory is call with the key argument to produce + a new value when a key is not present, in __getitem__ only. + A LazyDefaultDict compares equal to a dict with the same items. + All remaining arguments are treated the same as if they were + passed to the dict constructor, including keyword arguments. + """ + + def __missing__(self, key): + """ + __missing__(key) # Called by __getitem__ for missing key; pseudo-code: + if self.default_factory is None: raise KeyError((key,)) + self[key] = value = self.default_factory(key) + return value + """ + self[key] = self.default_factory(key) + return self[key] + + +def handle_boto_error(exc, msg, *args, **kwargs): + error_code = None + error_info = None + # todo: not sure if these exceptions always have response + if hasattr(exc, "response"): + error_info = exc.response.get("Error", None) + if error_info is not None: + error_code = error_info.get("Code", None) + + generic_message_args = [ + "{}\nError code: {}", + msg.format(*args, **kwargs), + cf.bold(error_code), + ] + + # apparently + # ExpiredTokenException + # ExpiredToken + # RequestExpired + # are all the same pretty much + credentials_expiration_codes = [ + "ExpiredTokenException", + "ExpiredToken", + "RequestExpired", + ] + + if error_code in credentials_expiration_codes: + # "An error occurred (ExpiredToken) when calling the + # GetInstanceProfile operation: The security token + # included in the request is expired" + + # "An error occurred (RequestExpired) when calling the + # DescribeKeyPairs operation: Request has expired." + + token_command = ( + "aws sts get-session-token " + "--serial-number arn:aws:iam::" + + cf.underlined("ROOT_ACCOUNT_ID") + + ":mfa/" + + cf.underlined("AWS_USERNAME") + + " --token-code " + + cf.underlined("TWO_FACTOR_AUTH_CODE") + ) + + secret_key_var = ( + "export AWS_SECRET_ACCESS_KEY = " + + cf.underlined("REPLACE_ME") + + " # found at Credentials.SecretAccessKey" + ) + session_token_var = ( + "export AWS_SESSION_TOKEN = " + + cf.underlined("REPLACE_ME") + + " # found at Credentials.SessionToken" + ) + access_key_id_var = ( + "export AWS_ACCESS_KEY_ID = " + + cf.underlined("REPLACE_ME") + + " # found at Credentials.AccessKeyId" + ) + + # fixme: replace with a Github URL that points + # to our repo + aws_session_script_url = ( + "https://gist.github.com/maximsmol/a0284e1d97b25d417bd9ae02e5f450cf" + ) + + cli_logger.verbose_error(*generic_message_args) + cli_logger.verbose(vars(exc)) + + cli_logger.panic("Your AWS session has expired.") + cli_logger.newline() + cli_logger.panic("You can request a new one using") + cli_logger.panic(cf.bold(token_command)) + cli_logger.panic("then expose it to Ray by setting") + cli_logger.panic(cf.bold(secret_key_var)) + cli_logger.panic(cf.bold(session_token_var)) + cli_logger.panic(cf.bold(access_key_id_var)) + cli_logger.newline() + cli_logger.panic("You can find a script that automates this at:") + cli_logger.panic(cf.underlined(aws_session_script_url)) + # Do not re-raise the exception here because it looks awful + # and we already print all the info in verbose + cli_logger.abort() + + # todo: any other errors that we should catch separately? + + cli_logger.panic(*generic_message_args) + cli_logger.newline() + with cli_logger.verbatim_error_ctx("Boto3 error:"): + cli_logger.verbose("{}", str(vars(exc))) + cli_logger.panic("{}", str(exc)) + cli_logger.abort() + + +def boto_exception_handler(msg, *args, **kwargs): + # todo: implement timer + class ExceptionHandlerContextManager: + def __enter__(self): + pass + + def __exit__(self, type, value, tb): + import botocore + + if type is botocore.exceptions.ClientError: + handle_boto_error(value, msg, *args, **kwargs) + + return ExceptionHandlerContextManager() + + +@lru_cache() +def resource_cache( + name, region, max_retries=BOTO_MAX_RETRIES, **kwargs +) -> ServiceResource: + cli_logger.verbose( + "Creating AWS resource `{}` in `{}`", cf.bold(name), cf.bold(region) + ) + kwargs.setdefault( + "config", + Config(retries={"max_attempts": max_retries}), + ) + return boto3.resource( + name, + region, + **kwargs, + ) + + +@lru_cache() +def client_cache(name, region, max_retries=BOTO_MAX_RETRIES, **kwargs) -> BaseClient: + try: + # try to re-use a client from the resource cache first + return resource_cache(name, region, max_retries, **kwargs).meta.client + except ResourceNotExistsError: + # fall back for clients without an associated resource + cli_logger.verbose( + "Creating AWS client `{}` in `{}`", cf.bold(name), cf.bold(region) + ) + kwargs.setdefault( + "config", + Config(retries={"max_attempts": max_retries}), + ) + return boto3.client( + name, + region, + **kwargs, + ) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/cli_logger.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/cli_logger.py new file mode 100644 index 0000000000000000000000000000000000000000..5172891d311964c281c4e748cb72713dc361a3ed --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/cli_logger.py @@ -0,0 +1,825 @@ +"""Logger implementing the Command Line Interface. + +A replacement for the standard Python `logging` API +designed for implementing a better CLI UX for the cluster launcher. + +Supports color, bold text, italics, underlines, etc. +(depending on TTY features) +as well as indentation and other structured output. +""" +import inspect +import logging +import os +import sys +import time +from contextlib import contextmanager +from functools import wraps +from typing import Any, Callable, Dict, List, Optional, Tuple + +import click +import colorama + +# Import ray first to use the bundled colorama +import ray # noqa: F401 + +if sys.platform == "win32": + import msvcrt +else: + import select + + +class _ColorfulMock: + def __init__(self): + # do not do any color work + self.identity = lambda x: x + + self.colorful = self + self.colormode = None + + self.NO_COLORS = None + self.ANSI_8_COLORS = None + + def disable(self): + pass + + @contextmanager + def with_style(self, x): + class IdentityClass: + def __getattr__(self, name): + return lambda y: y + + yield IdentityClass() + + def __getattr__(self, name): + if name == "with_style": + return self.with_style + + return self.identity + + +try: + import colorful as _cf + from colorful.core import ColorfulString + + _cf.use_8_ansi_colors() +except ModuleNotFoundError: + # We mock Colorful to restrict the colors used for consistency + # anyway, so we also allow for not having colorful at all. + # If the Ray Core dependency on colorful is ever removed, + # the CliLogger code will still work. + class ColorfulString: + pass + + _cf = _ColorfulMock() + + +# We want to only allow specific formatting +# to prevent people from accidentally making bad looking color schemes. +# +# This is especially important since most will look bad on either light +# or dark themes. +class _ColorfulProxy: + _proxy_allowlist = [ + "disable", + "reset", + "bold", + "italic", + "underlined", + # used instead of `gray` as `dimmed` adapts to + # both light and dark themes + "dimmed", + "dodgerBlue", # group + "limeGreen", # success + "red", # error + "orange", # warning + "skyBlue", # label + "magenta", # syntax highlighting key words and symbols + "yellow", # syntax highlighting strings + ] + + def __getattr__(self, name): + res = getattr(_cf, name) + if callable(res) and name not in _ColorfulProxy._proxy_allowlist: + raise ValueError( + "Usage of the colorful method '" + name + "' is forbidden " + "by the proxy to keep a consistent color scheme. " + "Check `cli_logger.py` for allowed methods" + ) + return res + + +cf = _ColorfulProxy() + +colorama.init(strip=False) + + +def _external_caller_info(): + """Get the info from the caller frame. + + Used to override the logging function and line number with the correct + ones. See the comment on _patched_makeRecord for more info. + """ + + frame = inspect.currentframe() + caller = frame + levels = 0 + while caller.f_code.co_filename == __file__: + caller = caller.f_back + levels += 1 + return { + "lineno": caller.f_lineno, + "filename": os.path.basename(caller.f_code.co_filename), + } + + +def _format_msg( + msg: str, + *args: Any, + no_format: bool = None, + _tags: Dict[str, Any] = None, + _numbered: Tuple[str, int, int] = None, + **kwargs: Any, +): + """Formats a message for printing. + + Renders `msg` using the built-in `str.format` and the passed-in + `*args` and `**kwargs`. + + Args: + *args (Any): `.format` arguments for `msg`. + no_format (bool): + If `no_format` is `True`, + `.format` will not be called on the message. + + Useful if the output is user-provided or may otherwise + contain an unexpected formatting string (e.g. "{}"). + _tags (Dict[str, Any]): + key-value pairs to display at the end of + the message in square brackets. + + If a tag is set to `True`, it is printed without the value, + the presence of the tag treated as a "flag". + + E.g. `_format_msg("hello", _tags=dict(from=mom, signed=True))` + `hello [from=Mom, signed]` + _numbered (Tuple[str, int, int]): + `(brackets, i, n)` + + The `brackets` string is composed of two "bracket" characters, + `i` is the index, `n` is the total. + + The string `{i}/{n}` surrounded by the "brackets" is + prepended to the message. + + This is used to number steps in a procedure, with different + brackets specifying different major tasks. + + E.g. `_format_msg("hello", _numbered=("[]", 0, 5))` + `[0/5] hello` + + Returns: + The formatted message. + """ + + if isinstance(msg, str) or isinstance(msg, ColorfulString): + tags_str = "" + if _tags is not None: + tags_list = [] + for k, v in _tags.items(): + if v is True: + tags_list += [k] + continue + if v is False: + continue + + tags_list += [k + "=" + v] + if tags_list: + tags_str = cf.reset(cf.dimmed(" [{}]".format(", ".join(tags_list)))) + + numbering_str = "" + if _numbered is not None: + chars, i, n = _numbered + numbering_str = cf.dimmed(chars[0] + str(i) + "/" + str(n) + chars[1]) + " " + + if no_format: + # todo: throw if given args/kwargs? + return numbering_str + msg + tags_str + return numbering_str + msg.format(*args, **kwargs) + tags_str + + if kwargs: + raise ValueError("We do not support printing kwargs yet.") + + res = [msg, *args] + res = [str(x) for x in res] + return ", ".join(res) + + +# TODO: come up with a plan to unify logging. +# formatter = logging.Formatter( +# # TODO(maximsmol): figure out the required log level padding +# # width automatically +# fmt="[{asctime}] {levelname:6} {message}", +# datefmt="%x %X", +# # We want alignment on our level names +# style="{") + + +def _isatty(): + """More robust check for interactive terminal/tty.""" + try: + # https://stackoverflow.com/questions/6108330/ + # checking-for-interactive-shell-in-a-python-script + return sys.__stdin__.isatty() + except Exception: + # sometimes this can fail due to closed output + # either way, no-tty is generally safe fallback. + return False + + +class _CliLogger: + """Singleton class for CLI logging. + + Without calling 'cli_logger.configure', the CLILogger will default + to 'record' style logging. + + Attributes: + color_mode (str): + Can be "true", "false", or "auto". + + Enables or disables `colorful`. + + If `color_mode` is "auto", is set to `not stdout.isatty()` + indent_level (int): + The current indentation level. + + All messages will be indented by prepending `" " * indent_level` + vebosity (int): + Output verbosity. + + Low verbosity will disable `verbose` and `very_verbose` messages. + """ + + color_mode: str + # color_mode: Union[Literal["auto"], Literal["false"], Literal["true"]] + indent_level: int + interactive: bool + VALID_LOG_STYLES = ("auto", "record", "pretty") + + _autodetected_cf_colormode: int + + def __init__(self): + self.indent_level = 0 + + self._verbosity = 0 + self._verbosity_overriden = False + self._color_mode = "auto" + self._log_style = "record" + self.pretty = False + self.interactive = False + + # store whatever colorful has detected for future use if + # the color ouput is toggled (colorful detects # of supported colors, + # so it has some non-trivial logic to determine this) + self._autodetected_cf_colormode = cf.colorful.colormode + self.set_format() + + def set_format(self, format_tmpl=None): + if not format_tmpl: + from ray.autoscaler._private.constants import LOGGER_FORMAT + + format_tmpl = LOGGER_FORMAT + self._formatter = logging.Formatter(format_tmpl) + + def configure(self, log_style=None, color_mode=None, verbosity=None): + """Configures the logger according to values.""" + if log_style is not None: + self._set_log_style(log_style) + + if color_mode is not None: + self._set_color_mode(color_mode) + + if verbosity is not None: + self._set_verbosity(verbosity) + + self.detect_colors() + + @property + def log_style(self): + return self._log_style + + def _set_log_style(self, x): + """Configures interactivity and formatting.""" + self._log_style = x.lower() + self.interactive = _isatty() + + if self._log_style == "auto": + self.pretty = _isatty() + elif self._log_style == "record": + self.pretty = False + self._set_color_mode("false") + elif self._log_style == "pretty": + self.pretty = True + + @property + def color_mode(self): + return self._color_mode + + def _set_color_mode(self, x): + self._color_mode = x.lower() + self.detect_colors() + + @property + def verbosity(self): + if self._verbosity_overriden: + return self._verbosity + elif not self.pretty: + return 999 + return self._verbosity + + def _set_verbosity(self, x): + self._verbosity = x + self._verbosity_overriden = True + + def detect_colors(self): + """Update color output settings. + + Parse the `color_mode` string and optionally disable or force-enable + color output + (8-color ANSI if no terminal detected to be safe) in colorful. + """ + if self.color_mode == "true": + if self._autodetected_cf_colormode != cf.NO_COLORS: + cf.colormode = self._autodetected_cf_colormode + else: + cf.colormode = cf.ANSI_8_COLORS + return + if self.color_mode == "false": + cf.disable() + return + if self.color_mode == "auto": + # colorful autodetects tty settings + return + + raise ValueError("Invalid log color setting: " + self.color_mode) + + def newline(self): + """Print a line feed.""" + self.print("") + + def _print( + self, + msg: str, + _level_str: str = "INFO", + _linefeed: bool = True, + end: str = None, + ): + """Proxy for printing messages. + + Args: + msg: Message to print. + linefeed (bool): + If `linefeed` is `False` no linefeed is printed at the + end of the message. + """ + if self.pretty: + rendered_message = " " * self.indent_level + msg + else: + if msg.strip() == "": + return + caller_info = _external_caller_info() + record = logging.LogRecord( + name="cli", + # We override the level name later + # TODO(maximsmol): give approximate level #s to our log levels + level=0, + # The user-facing logs do not need this information anyway + # and it would be very tedious to extract since _print + # can be at varying depths in the call stack + # TODO(maximsmol): do it anyway to be extra + pathname=caller_info["filename"], + lineno=caller_info["lineno"], + msg=msg, + args={}, + # No exception + exc_info=None, + ) + record.levelname = _level_str + rendered_message = self._formatter.format(record) + + # We aren't using standard python logging convention, so we hardcode + # the log levels for now. + if _level_str in ["WARNING", "ERROR", "PANIC"]: + stream = sys.stderr + else: + stream = sys.stdout + + if not _linefeed: + stream.write(rendered_message) + stream.flush() + return + + kwargs = {"end": end} + print(rendered_message, file=stream, **kwargs) + + def indented(self): + """Context manager that starts an indented block of output.""" + cli_logger = self + + class IndentedContextManager: + def __enter__(self): + cli_logger.indent_level += 1 + + def __exit__(self, type, value, tb): + cli_logger.indent_level -= 1 + + return IndentedContextManager() + + def group(self, msg: str, *args: Any, **kwargs: Any): + """Print a group title in a special color and start an indented block. + + For arguments, see `_format_msg`. + """ + self.print(cf.dodgerBlue(msg), *args, **kwargs) + + return self.indented() + + def verbatim_error_ctx(self, msg: str, *args: Any, **kwargs: Any): + """Context manager for printing multi-line error messages. + + Displays a start sequence "!!! {optional message}" + and a matching end sequence "!!!". + + The string "!!!" can be used as a "tombstone" for searching. + + For arguments, see `_format_msg`. + """ + cli_logger = self + + class VerbatimErorContextManager: + def __enter__(self): + cli_logger.error(cf.bold("!!! ") + "{}", msg, *args, **kwargs) + + def __exit__(self, type, value, tb): + cli_logger.error(cf.bold("!!!")) + + return VerbatimErorContextManager() + + def labeled_value(self, key: str, msg: str, *args: Any, **kwargs: Any): + """Displays a key-value pair with special formatting. + + Args: + key: Label that is prepended to the message. + + For other arguments, see `_format_msg`. + """ + self._print(cf.skyBlue(key) + ": " + _format_msg(cf.bold(msg), *args, **kwargs)) + + def verbose(self, msg: str, *args: Any, **kwargs: Any): + """Prints a message if verbosity is not 0. + + For arguments, see `_format_msg`. + """ + if self.verbosity > 0: + self.print(msg, *args, _level_str="VINFO", **kwargs) + + def verbose_warning(self, msg, *args, **kwargs): + """Prints a formatted warning if verbosity is not 0. + + For arguments, see `_format_msg`. + """ + if self.verbosity > 0: + self._warning(msg, *args, _level_str="VWARN", **kwargs) + + def verbose_error(self, msg: str, *args: Any, **kwargs: Any): + """Logs an error if verbosity is not 0. + + For arguments, see `_format_msg`. + """ + if self.verbosity > 0: + self._error(msg, *args, _level_str="VERR", **kwargs) + + def very_verbose(self, msg: str, *args: Any, **kwargs: Any): + """Prints if verbosity is > 1. + + For arguments, see `_format_msg`. + """ + if self.verbosity > 1: + self.print(msg, *args, _level_str="VVINFO", **kwargs) + + def success(self, msg: str, *args: Any, **kwargs: Any): + """Prints a formatted success message. + + For arguments, see `_format_msg`. + """ + self.print(cf.limeGreen(msg), *args, _level_str="SUCC", **kwargs) + + def _warning(self, msg: str, *args: Any, _level_str: str = None, **kwargs: Any): + """Prints a formatted warning message. + + For arguments, see `_format_msg`. + """ + if _level_str is None: + raise ValueError("Log level not set.") + self.print(cf.orange(msg), *args, _level_str=_level_str, **kwargs) + + def warning(self, *args, **kwargs): + self._warning(*args, _level_str="WARN", **kwargs) + + def _error(self, msg: str, *args: Any, _level_str: str = None, **kwargs: Any): + """Prints a formatted error message. + + For arguments, see `_format_msg`. + """ + if _level_str is None: + raise ValueError("Log level not set.") + self.print(cf.red(msg), *args, _level_str=_level_str, **kwargs) + + def error(self, *args, **kwargs): + self._error(*args, _level_str="ERR", **kwargs) + + def panic(self, *args, **kwargs): + self._error(*args, _level_str="PANIC", **kwargs) + + # Fine to expose _level_str here, since this is a general log function. + def print( + self, + msg: str, + *args: Any, + _level_str: str = "INFO", + end: str = None, + **kwargs: Any, + ): + """Prints a message. + + For arguments, see `_format_msg`. + """ + self._print(_format_msg(msg, *args, **kwargs), _level_str=_level_str, end=end) + + def info(self, msg: str, no_format=True, *args, **kwargs): + self.print(msg, no_format=no_format, *args, **kwargs) + + def abort( + self, msg: Optional[str] = None, *args: Any, exc: Any = None, **kwargs: Any + ): + """Prints an error and aborts execution. + + Print an error and throw an exception to terminate the program + (the exception will not print a message). + """ + if msg is not None: + self._error(msg, *args, _level_str="PANIC", **kwargs) + + if exc is not None: + raise exc + + exc_cls = click.ClickException + if self.pretty: + exc_cls = SilentClickException + + if msg is None: + msg = "Exiting due to cli_logger.abort()" + raise exc_cls(msg) + + def doassert(self, val: bool, msg: str, *args: Any, **kwargs: Any): + """Handle assertion without throwing a scary exception. + + Args: + val: Value to check. + + For other arguments, see `_format_msg`. + """ + if not val: + exc = None + if not self.pretty: + exc = AssertionError() + + # TODO(maximsmol): rework asserts so that we get the expression + # that triggered the assert + # to do this, install a global try-catch + # for AssertionError and raise them normally + self.abort(msg, *args, exc=exc, **kwargs) + + def render_list(self, xs: List[str], separator: str = cf.reset(", ")): + """Render a list of bolded values using a non-bolded separator.""" + return separator.join([str(cf.bold(x)) for x in xs]) + + def confirm( + self, + yes: bool, + msg: str, + *args: Any, + _abort: bool = False, + _default: bool = False, + _timeout_s: Optional[float] = None, + **kwargs: Any, + ): + """Display a confirmation dialog. + + Valid answers are "y/yes/true/1" and "n/no/false/0". + + Args: + yes: If `yes` is `True` the dialog will default to "yes" + and continue without waiting for user input. + _abort (bool): + If `_abort` is `True`, + "no" means aborting the program. + _default (bool): + The default action to take if the user just presses enter + with no input. + _timeout_s (float): + If user has no input within _timeout_s seconds, the default + action is taken. None means no timeout. + """ + should_abort = _abort + default = _default + + if not self.interactive and not yes: + # no formatting around --yes here since this is non-interactive + self.error( + "This command requires user confirmation. " + "When running non-interactively, supply --yes to skip." + ) + raise ValueError("Non-interactive confirm without --yes.") + + if default: + yn_str = "Y/n" + else: + yn_str = "y/N" + + confirm_str = cf.underlined("Confirm [" + yn_str + "]:") + " " + + rendered_message = _format_msg(msg, *args, **kwargs) + # the rendered message ends with ascii coding + if rendered_message and not msg.endswith("\n"): + rendered_message += " " + + msg_len = len(rendered_message.split("\n")[-1]) + complete_str = rendered_message + confirm_str + + if yes: + self._print(complete_str + "y " + cf.dimmed("[automatic, due to --yes]")) + return True + + self._print(complete_str, _linefeed=False) + + res = None + yes_answers = ["y", "yes", "true", "1"] + no_answers = ["n", "no", "false", "0"] + try: + while True: + if _timeout_s is None: + ans = sys.stdin.readline() + elif sys.platform == "win32": + # Windows doesn't support select + start_time = time.time() + ans = "" + while True: + if (time.time() - start_time) >= _timeout_s: + self.newline() + ans = "\n" + break + elif msvcrt.kbhit(): + ch = msvcrt.getwch() + if ch in ("\n", "\r"): + self.newline() + ans = ans + "\n" + break + elif ch == "\b": + if ans: + ans = ans[:-1] + # Emulate backspace erasing + print("\b \b", end="", flush=True) + else: + ans = ans + ch + print(ch, end="", flush=True) + else: + time.sleep(0.1) + else: + ready, _, _ = select.select([sys.stdin], [], [], _timeout_s) + if not ready: + self.newline() + ans = "\n" + else: + ans = sys.stdin.readline() + + ans = ans.lower() + + if ans == "\n": + res = default + break + + ans = ans.strip() + if ans in yes_answers: + res = True + break + if ans in no_answers: + res = False + break + + indent = " " * msg_len + self.error( + "{}Invalid answer: {}. Expected {} or {}", + indent, + cf.bold(ans.strip()), + self.render_list(yes_answers, "/"), + self.render_list(no_answers, "/"), + ) + self._print(indent + confirm_str, _linefeed=False) + except KeyboardInterrupt: + self.newline() + res = default + + if not res and should_abort: + # todo: make sure we tell the user if they + # need to do cleanup + self._print("Exiting...") + raise SilentClickException( + "Exiting due to the response to confirm(should_abort=True)." + ) + + return res + + def prompt(self, msg: str, *args, **kwargs): + """Prompt the user for some text input. + + Args: + msg: The mesage to display to the user before the prompt. + + Returns: + The string entered by the user. + """ + complete_str = cf.underlined(msg) + rendered_message = _format_msg(complete_str, *args, **kwargs) + # the rendered message ends with ascii coding + if rendered_message and not msg.endswith("\n"): + rendered_message += " " + self._print(rendered_message, linefeed=False) + + res = "" + try: + ans = sys.stdin.readline() + ans = ans.lower() + res = ans.strip() + except KeyboardInterrupt: + self.newline() + + return res + + def flush(self): + sys.stdout.flush() + sys.stderr.flush() + + +class SilentClickException(click.ClickException): + """`ClickException` that does not print a message. + + Some of our tooling relies on catching ClickException in particular. + + However the default prints a message, which is undesirable since we expect + our code to log errors manually using `cli_logger.error()` to allow for + colors and other formatting. + """ + + def __init__(self, message: str): + super(SilentClickException, self).__init__(message) + + def show(self, file=None): + pass + + +cli_logger = _CliLogger() + +CLICK_LOGGING_OPTIONS = [ + click.option( + "--log-style", + required=False, + type=click.Choice(cli_logger.VALID_LOG_STYLES, case_sensitive=False), + default="auto", + help=( + "If 'pretty', outputs with formatting and color. If 'record', " + "outputs record-style without formatting. " + "'auto' defaults to 'pretty', and disables pretty logging " + "if stdin is *not* a TTY." + ), + ), + click.option( + "--log-color", + required=False, + type=click.Choice(["auto", "false", "true"], case_sensitive=False), + default="auto", + help=("Use color logging. Auto enables color logging if stdout is a TTY."), + ), + click.option("-v", "--verbose", default=None, count=True), +] + + +def add_click_logging_options(f: Callable) -> Callable: + for option in reversed(CLICK_LOGGING_OPTIONS): + f = option(f) + + @wraps(f) + def wrapper(*args, log_style=None, log_color=None, verbose=None, **kwargs): + cli_logger.configure(log_style, log_color, verbose) + return f(*args, **kwargs) + + return wrapper diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/cli_logger_demoall.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/cli_logger_demoall.py new file mode 100644 index 0000000000000000000000000000000000000000..2f8dcd2404b1e3cfdfb29adb69c387c7e99e7a7b --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/cli_logger_demoall.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +# This is an executable script that runs an example of every single CliLogger +# function for demonstration purposes. Primarily useful for tuning color and +# other formatting. + +from ray.autoscaler._private.cli_logger import cf, cli_logger + +cli_logger.configure(log_style="auto", verbosity=999) + +cli_logger.print(cf.bold("Bold ") + cf.italic("Italic ") + cf.underlined("Underlined")) +cli_logger.labeled_value("Label", "value") +cli_logger.print("List: {}", cli_logger.render_list([1, 2, 3])) +cli_logger.newline() +cli_logger.very_verbose("Very verbose") +cli_logger.verbose("Verbose") +cli_logger.verbose_warning("Verbose warning") +cli_logger.verbose_error("Verbose error") +cli_logger.print("Info") +cli_logger.success("Success") +cli_logger.warning("Warning") +cli_logger.error("Error") +cli_logger.newline() +try: + cli_logger.abort("Abort") +except Exception: + pass +try: + cli_logger.doassert(False, "Assert") +except Exception: + pass +cli_logger.newline() +cli_logger.confirm(True, "example") +cli_logger.newline() +with cli_logger.indented(): + cli_logger.print("Indented") +with cli_logger.group("Group"): + cli_logger.print("Group contents") +with cli_logger.verbatim_error_ctx("Verbtaim error"): + cli_logger.print("Error contents") diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/cluster_dump.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/cluster_dump.py new file mode 100644 index 0000000000000000000000000000000000000000..6984c16064361e17013da52f2cf4e6d3e51b3a5b --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/cluster_dump.py @@ -0,0 +1,652 @@ +import os +import re +import subprocess +import sys +import tarfile +import tempfile +import threading +from concurrent.futures import ThreadPoolExecutor +from contextlib import contextmanager +from typing import List, Optional, Sequence, Tuple + +import yaml + +import ray # noqa: F401 +from ray.autoscaler._private.cli_logger import cli_logger +from ray.autoscaler._private.providers import _get_node_provider +from ray.autoscaler.tags import NODE_KIND_HEAD, NODE_KIND_WORKER, TAG_RAY_NODE_KIND + +# Import psutil after ray so the packaged version is used. +import psutil + +MAX_PARALLEL_SSH_WORKERS = 8 +DEFAULT_SSH_USER = "ubuntu" +DEFAULT_SSH_KEYS = ["~/ray_bootstrap_key.pem", "~/.ssh/ray-autoscaler_2_us-west-2.pem"] + + +class CommandFailed(RuntimeError): + pass + + +class LocalCommandFailed(CommandFailed): + pass + + +class RemoteCommandFailed(CommandFailed): + pass + + +class GetParameters: + def __init__( + self, + logs: bool = True, + debug_state: bool = True, + pip: bool = True, + processes: bool = True, + processes_verbose: bool = True, + processes_list: Optional[List[Tuple[str, bool]]] = None, + ): + self.logs = logs + self.debug_state = debug_state + self.pip = pip + self.processes = processes + self.processes_verbose = processes_verbose + self.processes_list = processes_list + + +class Node: + """Node (as in "machine")""" + + def __init__( + self, + host: str, + ssh_user: str = "ubuntu", + ssh_key: str = "~/ray_bootstrap_key.pem", + docker_container: Optional[str] = None, + is_head: bool = False, + ): + self.host = host + self.ssh_user = ssh_user + self.ssh_key = ssh_key + self.docker_container = docker_container + self.is_head = is_head + + +class Archive: + """Archive object to collect and compress files into a single file. + + Objects of this class can be passed around to different data collection + functions. These functions can use the :meth:`subdir` method to add + files to a sub directory of the archive. + + """ + + def __init__(self, file: Optional[str] = None): + self.file = file or tempfile.mkstemp(prefix="ray_logs_", suffix=".tar.gz")[1] + self.tar = None + self._lock = threading.Lock() + + @property + def is_open(self): + return bool(self.tar) + + def open(self): + self.tar = tarfile.open(self.file, "w:gz") + + def close(self): + self.tar.close() + self.tar = None + + def __enter__(self): + self.open() + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.close() + + @contextmanager + def subdir(self, subdir: str, root: Optional[str] = "/"): + """Open a context to add files to the archive. + + Example: + + .. code-block:: python + + with Archive("file.tar.gz") as archive: + with archive.subdir("logfiles", root="/tmp/logs") as sd: + # Will be added as `logfiles/nested/file.txt` + sd.add("/tmp/logs/nested/file.txt") + + Args: + subdir: Subdir to which to add files to. Calling the + ``add(path)`` command will place files into the ``subdir`` + directory of the archive. + root: Root path. Files without an explicit ``arcname`` + will be named relatively to this path. + + Yields: + A context object that can be used to add files to the archive. + """ + root = os.path.abspath(root) + + class _Context: + @staticmethod + def add(path: str, arcname: Optional[str] = None): + path = os.path.abspath(path) + arcname = arcname or os.path.join(subdir, os.path.relpath(path, root)) + + self._lock.acquire() + self.tar.add(path, arcname=arcname) + self._lock.release() + + yield _Context() + + +### +# Functions to gather logs and information on the local node +### + + +def get_local_ray_logs( + archive: Archive, + exclude: Optional[Sequence[str]] = None, + session_log_dir: str = "/tmp/ray/session_latest", +) -> Archive: + """Copy local log files into an archive. + + Args: + archive: Archive object to add log files to. + exclude (Sequence[str]): Sequence of regex patterns. Files that match + any of these patterns will not be included in the archive. + session_dir: Path to the Ray session files. Defaults to + ``/tmp/ray/session_latest`` + + Returns: + Open archive object. + + """ + if not archive.is_open: + archive.open() + + exclude = exclude or [] + + session_log_dir = os.path.join(os.path.expanduser(session_log_dir), "logs") + + with archive.subdir("logs", root=session_log_dir) as sd: + for root, dirs, files in os.walk(session_log_dir): + for file in files: + file_path = os.path.join(root, file) + rel_path = os.path.relpath(file_path, start=session_log_dir) + # Skip file if it matches any pattern in `exclude` + if any(re.match(pattern, rel_path) for pattern in exclude): + continue + sd.add(file_path) + + return archive + + +def get_local_debug_state( + archive: Archive, session_dir: str = "/tmp/ray/session_latest" +) -> Archive: + """Copy local log files into an archive. + + Args: + archive: Archive object to add log files to. + session_dir: Path to the Ray session files. Defaults to + ``/tmp/ray/session_latest`` + + Returns: + Open archive object. + + """ + if not archive.is_open: + archive.open() + + session_dir = os.path.expanduser(session_dir) + debug_state_file = os.path.join(session_dir, "logs/debug_state.txt") + + if not os.path.exists(debug_state_file): + raise LocalCommandFailed("No `debug_state.txt` file found.") + + with archive.subdir("", root=session_dir) as sd: + sd.add(debug_state_file) + + return archive + + +def get_local_pip_packages(archive: Archive): + """Get currently installed pip packages and write into an archive. + + Args: + archive: Archive object to add meta files to. + + Returns: + Open archive object. + """ + if not archive.is_open: + archive.open() + + try: + from pip._internal.operations import freeze + except ImportError: # pip < 10.0 + from pip.operations import freeze + + with tempfile.NamedTemporaryFile("wt") as fp: + for line in freeze.freeze(): + fp.writelines([line, "\n"]) + + fp.flush() + with archive.subdir("") as sd: + sd.add(fp.name, "pip_packages.txt") + + return archive + + +def get_local_ray_processes( + archive: Archive, + processes: Optional[List[Tuple[str, bool]]] = None, + verbose: bool = False, +): + """Get the status of all the relevant ray processes. + Args: + archive: Archive object to add process info files to. + processes: List of processes to get information on. The first + element of the tuple is a string to filter by, and the second + element is a boolean indicating if we should filter by command + name (True) or command line including parameters (False) + verbose: If True, show entire executable command line. + If False, show just the first term. + Returns: + Open archive object. + """ + if not processes: + # local import to avoid circular dependencies + from ray.autoscaler._private.constants import RAY_PROCESSES + + processes = RAY_PROCESSES + + process_infos = [] + for process in psutil.process_iter(["pid", "name", "cmdline", "status"]): + try: + with process.oneshot(): + cmdline = " ".join(process.cmdline()) + process_infos.append( + ( + { + "executable": cmdline + if verbose + else cmdline.split("--", 1)[0][:-1], + "name": process.name(), + "pid": process.pid, + "status": process.status(), + }, + process.cmdline(), + ) + ) + except Exception as exc: + raise LocalCommandFailed(exc) from exc + + relevant_processes = {} + for process_dict, cmdline in process_infos: + for keyword, filter_by_cmd in processes: + if filter_by_cmd: + corpus = process_dict["name"] + else: + corpus = subprocess.list2cmdline(cmdline) + if keyword in corpus and process_dict["pid"] not in relevant_processes: + relevant_processes[process_dict["pid"]] = process_dict + + with tempfile.NamedTemporaryFile("wt") as fp: + for line in relevant_processes.values(): + fp.writelines([yaml.dump(line), "\n"]) + + fp.flush() + with archive.subdir("meta") as sd: + sd.add(fp.name, "process_info.txt") + + return archive + + +def get_all_local_data(archive: Archive, parameters: GetParameters): + """Get all local data. + + Gets: + - The Ray logs of the latest session + - The currently installed pip packages + + Args: + archive: Archive object to add meta files to. + parameters: Parameters (settings) for getting data. + + Returns: + Open archive object. + """ + if not archive.is_open: + archive.open() + + if parameters.logs: + try: + get_local_ray_logs(archive=archive) + except LocalCommandFailed as exc: + cli_logger.error(exc) + if parameters.debug_state: + try: + get_local_debug_state(archive=archive) + except LocalCommandFailed as exc: + cli_logger.error(exc) + if parameters.pip: + try: + get_local_pip_packages(archive=archive) + except LocalCommandFailed as exc: + cli_logger.error(exc) + if parameters.processes: + try: + get_local_ray_processes( + archive=archive, + processes=parameters.processes_list, + verbose=parameters.processes_verbose, + ) + except LocalCommandFailed as exc: + cli_logger.error(exc) + + return archive + + +### +# Functions to invoke remote scripts and gather data from remote nodes +### + + +def _wrap(items: List[str], quotes="'"): + return f"{quotes}{' '.join(items)}{quotes}" + + +def create_and_get_archive_from_remote_node( + remote_node: Node, parameters: GetParameters, script_path: str = "ray" +) -> Optional[str]: + """Create an archive containing logs on a remote node and transfer. + + This will call ``ray local-dump --stream`` on the remote + node. The resulting file will be saved locally in a temporary file and + returned. + + Args: + remote_node: Remote node to gather archive from. + script_path: Path to this script on the remote node. + parameters: Parameters (settings) for getting data. + + Returns: + Path to a temporary file containing the node's collected data. + + """ + cmd = [ + "ssh", + "-o StrictHostKeyChecking=no", + "-o UserKnownHostsFile=/dev/null", + "-o LogLevel=ERROR", + "-i", + remote_node.ssh_key, + f"{remote_node.ssh_user}@{remote_node.host}", + ] + + if remote_node.docker_container: + cmd += [ + "docker", + "exec", + remote_node.docker_container, + ] + + collect_cmd = [script_path, "local-dump", "--stream"] + collect_cmd += ["--logs"] if parameters.logs else ["--no-logs"] + collect_cmd += ["--debug-state"] if parameters.debug_state else ["--no-debug-state"] + collect_cmd += ["--pip"] if parameters.pip else ["--no-pip"] + collect_cmd += ["--processes"] if parameters.processes else ["--no-processes"] + if parameters.processes: + collect_cmd += ( + ["--processes-verbose"] + if parameters.processes_verbose + else ["--no-proccesses-verbose"] + ) + + cmd += ["/bin/bash", "-c", _wrap(collect_cmd, quotes='"')] + + cat = "node" if not remote_node.is_head else "head" + + cli_logger.print(f"Collecting data from remote node: {remote_node.host}") + tmp = tempfile.mkstemp(prefix=f"ray_{cat}_{remote_node.host}_", suffix=".tar.gz")[1] + with open(tmp, "wb") as fp: + try: + subprocess.check_call(cmd, stdout=fp, stderr=sys.stderr) + except subprocess.CalledProcessError as exc: + raise RemoteCommandFailed( + f"Gathering logs from remote node failed: {' '.join(cmd)}" + ) from exc + + return tmp + + +def create_and_add_remote_data_to_local_archive( + archive: Archive, remote_node: Node, parameters: GetParameters +): + """Create and get data from remote node and add to local archive. + + Args: + archive: Archive object to add remote data to. + remote_node: Remote node to gather archive from. + parameters: Parameters (settings) for getting data. + + Returns: + Open archive object. + """ + tmp = create_and_get_archive_from_remote_node(remote_node, parameters) + + if not archive.is_open: + archive.open() + + cat = "node" if not remote_node.is_head else "head" + + with archive.subdir("", root=os.path.dirname(tmp)) as sd: + sd.add(tmp, arcname=f"ray_{cat}_{remote_node.host}.tar.gz") + + return archive + + +def create_and_add_local_data_to_local_archive( + archive: Archive, parameters: GetParameters +): + """Create and get data from this node and add to archive. + + Args: + archive: Archive object to add remote data to. + parameters: Parameters (settings) for getting data. + + Returns: + Open archive object. + """ + with Archive() as local_data_archive: + get_all_local_data(local_data_archive, parameters) + + if not archive.is_open: + archive.open() + + with archive.subdir("", root=os.path.dirname(local_data_archive.file)) as sd: + sd.add(local_data_archive.file, arcname="local_node.tar.gz") + + os.remove(local_data_archive.file) + + return archive + + +def create_archive_for_remote_nodes( + archive: Archive, remote_nodes: Sequence[Node], parameters: GetParameters +): + """Create an archive combining data from the remote nodes. + + This will parallelize calls to get data from remote nodes. + + Args: + archive: Archive object to add remote data to. + remote_nodes (Sequence[Node]): Sequence of remote nodes. + parameters: Parameters (settings) for getting data. + + Returns: + Open archive object. + + """ + if not archive.is_open: + archive.open() + + with ThreadPoolExecutor(max_workers=MAX_PARALLEL_SSH_WORKERS) as executor: + for remote_node in remote_nodes: + executor.submit( + create_and_add_remote_data_to_local_archive, + archive=archive, + remote_node=remote_node, + parameters=parameters, + ) + + return archive + + +def create_archive_for_local_and_remote_nodes( + archive: Archive, remote_nodes: Sequence[Node], parameters: GetParameters +): + """Create an archive combining data from the local and remote nodes. + + This will parallelize calls to get data from remote nodes. + + Args: + archive: Archive object to add data to. + remote_nodes (Sequence[Node]): Sequence of remote nodes. + parameters: Parameters (settings) for getting data. + + Returns: + Open archive object. + + """ + if not archive.is_open: + archive.open() + + try: + create_and_add_local_data_to_local_archive(archive, parameters) + except CommandFailed as exc: + cli_logger.error(exc) + + create_archive_for_remote_nodes(archive, remote_nodes, parameters) + + cli_logger.print( + f"Collected data from local node and {len(remote_nodes)} " f"remote nodes." + ) + return archive + + +### +# Ray cluster info +### +def get_info_from_ray_cluster_config( + cluster_config: str, +) -> Tuple[List[str], str, str, Optional[str], Optional[str]]: + """Get information from Ray cluster config. + + Return list of host IPs, ssh user, ssh key file, and optional docker + container. + + Args: + cluster_config: Path to ray cluster config. + + Returns: + Tuple of list of host IPs, ssh user name, ssh key file path, + optional docker container name, optional cluster name. + """ + from ray.autoscaler._private.commands import _bootstrap_config + + cli_logger.print( + f"Retrieving cluster information from ray cluster file: " f"{cluster_config}" + ) + + cluster_config = os.path.expanduser(cluster_config) + + config = yaml.safe_load(open(cluster_config).read()) + config = _bootstrap_config(config, no_config_cache=True) + + provider = _get_node_provider(config["provider"], config["cluster_name"]) + head_nodes = provider.non_terminated_nodes({TAG_RAY_NODE_KIND: NODE_KIND_HEAD}) + worker_nodes = provider.non_terminated_nodes({TAG_RAY_NODE_KIND: NODE_KIND_WORKER}) + + hosts = [provider.external_ip(node) for node in head_nodes + worker_nodes] + ssh_user = config["auth"]["ssh_user"] + ssh_key = config["auth"]["ssh_private_key"] + + docker = None + docker_config = config.get("docker", None) + if docker_config: + docker = docker_config.get("container_name", None) + + cluster_name = config.get("cluster_name", None) + + return hosts, ssh_user, ssh_key, docker, cluster_name + + +def _info_from_params( + cluster: Optional[str] = None, + host: Optional[str] = None, + ssh_user: Optional[str] = None, + ssh_key: Optional[str] = None, + docker: Optional[str] = None, +): + """Parse command line arguments. + + Note: This returns a list of hosts, not a comma separated string! + """ + if not host and not cluster: + bootstrap_config = os.path.expanduser("~/ray_bootstrap_config.yaml") + if os.path.exists(bootstrap_config): + cluster = bootstrap_config + cli_logger.warning( + f"Detected cluster config file at {cluster}. " + f"If this is incorrect, specify with " + f"`ray cluster-dump `" + ) + elif cluster: + cluster = os.path.expanduser(cluster) + + cluster_name = None + + if cluster: + h, u, k, d, cluster_name = get_info_from_ray_cluster_config(cluster) + + ssh_user = ssh_user or u + ssh_key = ssh_key or k + docker = docker or d + hosts = host.split(",") if host else h + + if not hosts: + raise LocalCommandFailed( + f"Invalid cluster file or cluster has no running nodes: " f"{cluster}" + ) + elif host: + hosts = host.split(",") + else: + raise LocalCommandFailed( + "You need to either specify a `` or `--host`." + ) + + if not ssh_user: + ssh_user = DEFAULT_SSH_USER + cli_logger.warning( + f"Using default SSH user `{ssh_user}`. " + f"If this is incorrect, specify with `--ssh-user `" + ) + + if not ssh_key: + for cand_key in DEFAULT_SSH_KEYS: + cand_key_file = os.path.expanduser(cand_key) + if os.path.exists(cand_key_file): + ssh_key = cand_key_file + cli_logger.warning( + f"Auto detected SSH key file: {ssh_key}. " + f"If this is incorrect, specify with `--ssh-key `" + ) + break + + return cluster, hosts, ssh_user, ssh_key, docker, cluster_name diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/command_runner.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/command_runner.py new file mode 100644 index 0000000000000000000000000000000000000000..44ca7369efe3f8e1a0db5ac3eb506e4b81574bcc --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/command_runner.py @@ -0,0 +1,926 @@ +import hashlib +import json +import logging +import os +import subprocess +import sys +import time +from getpass import getuser +from shlex import quote +from typing import Dict, List, Optional, Tuple + +import click + +from ray._private.ray_constants import DEFAULT_OBJECT_STORE_MAX_MEMORY_BYTES +from ray.autoscaler._private.cli_logger import cf, cli_logger +from ray.autoscaler._private.constants import ( + AUTOSCALER_NODE_SSH_INTERVAL_S, + AUTOSCALER_NODE_START_WAIT_S, + DEFAULT_OBJECT_STORE_MEMORY_PROPORTION, +) +from ray.autoscaler._private.docker import ( + check_bind_mounts_cmd, + check_docker_image, + check_docker_running_cmd, + docker_start_cmds, + with_docker_exec, +) +from ray.autoscaler._private.log_timer import LogTimer +from ray.autoscaler._private.subprocess_output_util import ( + ProcessRunnerError, + is_output_redirected, + run_cmd_redirected, +) +from ray.autoscaler.command_runner import CommandRunnerInterface + +logger = logging.getLogger(__name__) + +# How long to wait for a node to start, in seconds +HASH_MAX_LENGTH = 10 +KUBECTL_RSYNC = os.path.join( + os.path.dirname(os.path.abspath(__file__)), "_kubernetes/kubectl-rsync.sh" +) +MAX_HOME_RETRIES = 3 +HOME_RETRY_DELAY_S = 5 + +_config = {"use_login_shells": True, "silent_rsync": True} + + +def is_rsync_silent(): + return _config["silent_rsync"] + + +def set_rsync_silent(val): + """Choose whether to silence rsync output. + + Most commands will want to list rsync'd files themselves rather than + print the default rsync spew. + """ + _config["silent_rsync"] = val + + +def is_using_login_shells(): + return _config["use_login_shells"] + + +def set_using_login_shells(val: bool): + """Choose between login and non-interactive shells. + + Non-interactive shells have the benefit of receiving less output from + subcommands (since progress bars and TTY control codes are not printed). + Sometimes this can be significant since e.g. `pip install` prints + hundreds of progress bar lines when downloading. + + Login shells have the benefit of working very close to how a proper bash + session does, regarding how scripts execute and how the environment is + setup. This is also how all commands were ran in the past. The only reason + to use login shells over non-interactive shells is if you need some weird + and non-robust tool to work. + + Args: + val: If true, login shells will be used to run all commands. + """ + _config["use_login_shells"] = val + + +def _with_environment_variables(cmd: str, environment_variables: Dict[str, object]): + """Prepend environment variables to a shell command. + + Args: + cmd: The base command. + environment_variables (Dict[str, object]): The set of environment + variables. If an environment variable value is a dict, it will + automatically be converted to a one line yaml string. + """ + + as_strings = [] + for key, val in environment_variables.items(): + val = json.dumps(val, separators=(",", ":")) + s = "export {}={};".format(key, quote(val)) + as_strings.append(s) + all_vars = "".join(as_strings) + return all_vars + cmd + + +def _with_interactive(cmd): + force_interactive = ( + f"source ~/.bashrc; " + f"export OMP_NUM_THREADS=1 PYTHONWARNINGS=ignore && ({cmd})" + ) + return ["bash", "--login", "-c", "-i", quote(force_interactive)] + + +class SSHOptions: + def __init__(self, ssh_key, control_path=None, **kwargs): + self.ssh_key = ssh_key + self.arg_dict = { + # Supresses initial fingerprint verification. + "StrictHostKeyChecking": "no", + # SSH IP and fingerprint pairs no longer added to known_hosts. + # This is to remove a "REMOTE HOST IDENTIFICATION HAS CHANGED" + # warning if a new node has the same IP as a previously + # deleted node, because the fingerprints will not match in + # that case. + "UserKnownHostsFile": os.devnull, + # Try fewer extraneous key pairs. + "IdentitiesOnly": "yes", + # Abort if port forwarding fails (instead of just printing to + # stderr). + "ExitOnForwardFailure": "yes", + # Quickly kill the connection if network connection breaks (as + # opposed to hanging/blocking). + "ServerAliveInterval": 5, + "ServerAliveCountMax": 3, + } + if control_path: + self.arg_dict.update( + { + "ControlMaster": "auto", + "ControlPath": "{}/%C".format(control_path), + "ControlPersist": "10s", + } + ) + self.arg_dict.update(kwargs) + + def to_ssh_options_list(self, *, timeout=60): + self.arg_dict["ConnectTimeout"] = "{}s".format(timeout) + ssh_key_option = ["-i", self.ssh_key] if self.ssh_key else [] + return ssh_key_option + [ + x + for y in ( + ["-o", "{}={}".format(k, v)] + for k, v in self.arg_dict.items() + if v is not None + ) + for x in y + ] + + +class SSHCommandRunner(CommandRunnerInterface): + def __init__( + self, + log_prefix, + node_id, + provider, + auth_config, + cluster_name, + process_runner, + use_internal_ip, + ): + + ssh_control_hash = hashlib.sha1(cluster_name.encode()).hexdigest() + ssh_user_hash = hashlib.sha1(getuser().encode()).hexdigest() + ssh_control_path = "/tmp/ray_ssh_{}/{}".format( + ssh_user_hash[:HASH_MAX_LENGTH], ssh_control_hash[:HASH_MAX_LENGTH] + ) + + self.cluster_name = cluster_name + self.log_prefix = log_prefix + self.process_runner = process_runner + self.node_id = node_id + self.use_internal_ip = use_internal_ip + self.provider = provider + self.ssh_private_key = auth_config.get("ssh_private_key") + self.ssh_user = auth_config["ssh_user"] + self.ssh_control_path = ssh_control_path + self.ssh_ip = None + self.ssh_proxy_command = auth_config.get("ssh_proxy_command", None) + self.ssh_options = SSHOptions( + self.ssh_private_key, + self.ssh_control_path, + ProxyCommand=self.ssh_proxy_command, + ) + + def _get_node_ip(self): + if self.use_internal_ip: + return self.provider.internal_ip(self.node_id) + else: + return self.provider.external_ip(self.node_id) + + def _wait_for_ip(self, deadline): + # if we have IP do not print waiting info + ip = self._get_node_ip() + if ip is not None: + cli_logger.labeled_value("Fetched IP", ip) + return ip + + interval = AUTOSCALER_NODE_SSH_INTERVAL_S + with cli_logger.group("Waiting for IP"): + while time.time() < deadline and not self.provider.is_terminated( + self.node_id + ): + ip = self._get_node_ip() + if ip is not None: + cli_logger.labeled_value("Received", ip) + return ip + cli_logger.print( + "Not yet available, retrying in {} seconds", cf.bold(str(interval)) + ) + time.sleep(interval) + + return None + + def _set_ssh_ip_if_required(self): + if self.ssh_ip is not None: + return + + # We assume that this never changes. + # I think that's reasonable. + deadline = time.time() + AUTOSCALER_NODE_START_WAIT_S + with LogTimer(self.log_prefix + "Got IP"): + ip = self._wait_for_ip(deadline) + + cli_logger.doassert(ip is not None, "Could not get node IP.") # todo: msg + assert ip is not None, "Unable to find IP of node" + + self.ssh_ip = ip + + # This should run before any SSH commands and therefore ensure that + # the ControlPath directory exists, allowing SSH to maintain + # persistent sessions later on. + try: + os.makedirs(self.ssh_control_path, mode=0o700, exist_ok=True) + except OSError as e: + cli_logger.warning("{}", str(e)) # todo: msg + + def _run_helper( + self, + final_cmd: List[str], + with_output: bool = False, + exit_on_fail: bool = False, + silent: bool = False, + ): + """Run a command that was already setup with SSH and `bash` settings. + + Args: + final_cmd (List[str]): + Full command to run. Should include SSH options and other + processing that we do. + with_output (bool): + If `with_output` is `True`, command stdout will be captured and + returned. + exit_on_fail (bool): + If `exit_on_fail` is `True`, the process will exit + if the command fails (exits with a code other than 0). + silent: If true, the command output will be silenced. + + Raises: + ProcessRunnerError: If using new log style and disabled + login shells. + click.ClickException: If using login shells. + """ + try: + # For now, if the output is needed we just skip the new logic. + # In the future we could update the new logic to support + # capturing output, but it is probably not needed. + if not with_output: + return run_cmd_redirected( + final_cmd, + process_runner=self.process_runner, + silent=silent, + use_login_shells=is_using_login_shells(), + ) + else: + return self.process_runner.check_output(final_cmd) + except subprocess.CalledProcessError as e: + joined_cmd = " ".join(final_cmd) + if not is_using_login_shells(): + raise ProcessRunnerError( + "Command failed", + "ssh_command_failed", + code=e.returncode, + command=joined_cmd, + ) + + if exit_on_fail: + raise click.ClickException( + "Command failed:\n\n {}\n".format(joined_cmd) + ) from None + else: + fail_msg = "SSH command failed." + if is_output_redirected(): + fail_msg += " See above for the output from the failure." + raise click.ClickException(fail_msg) from None + finally: + # Do our best to flush output to terminal. + # See https://github.com/ray-project/ray/pull/19473. + sys.stdout.flush() + sys.stderr.flush() + + def run( + self, + cmd: Optional[str] = None, + timeout: int = 120, + exit_on_fail: bool = False, + port_forward: Optional[List[Tuple[int, int]]] = None, + with_output: bool = False, + environment_variables: Optional[Dict[str, object]] = None, + run_env: str = "auto", # Unused argument. + ssh_options_override_ssh_key: str = "", + shutdown_after_run: bool = False, + silent: bool = False, + ) -> str: + if shutdown_after_run: + cmd += "; sudo shutdown -h now" + + if ssh_options_override_ssh_key: + if self.ssh_proxy_command: + ssh_options = SSHOptions( + ssh_options_override_ssh_key, ProxyCommand=self.ssh_proxy_command + ) + else: + ssh_options = SSHOptions(ssh_options_override_ssh_key) + else: + ssh_options = self.ssh_options + + assert isinstance( + ssh_options, SSHOptions + ), "ssh_options must be of type SSHOptions, got {}".format(type(ssh_options)) + + self._set_ssh_ip_if_required() + + if is_using_login_shells(): + ssh = ["ssh", "-tt"] + else: + ssh = ["ssh"] + + if port_forward: + with cli_logger.group("Forwarding ports"): + if not isinstance(port_forward, list): + port_forward = [port_forward] + for local, remote in port_forward: + cli_logger.verbose( + "Forwarding port {} to port {} on localhost.", + cf.bold(local), + cf.bold(remote), + ) # todo: msg + ssh += ["-L", "{}:localhost:{}".format(local, remote)] + + final_cmd = ( + ssh + + ssh_options.to_ssh_options_list(timeout=timeout) + + ["{}@{}".format(self.ssh_user, self.ssh_ip)] + ) + if cmd: + if environment_variables: + cmd = _with_environment_variables(cmd, environment_variables) + if is_using_login_shells(): + final_cmd += _with_interactive(cmd) + else: + final_cmd += [cmd] + else: + # We do this because `-o ControlMaster` causes the `-N` flag to + # still create an interactive shell in some ssh versions. + final_cmd.append("while true; do sleep 86400; done") + + cli_logger.verbose("Running `{}`", cf.bold(cmd)) + with cli_logger.indented(): + cli_logger.very_verbose( + "Full command is `{}`", cf.bold(" ".join(final_cmd)) + ) + + if cli_logger.verbosity > 0: + with cli_logger.indented(): + return self._run_helper( + final_cmd, with_output, exit_on_fail, silent=silent + ) + else: + return self._run_helper(final_cmd, with_output, exit_on_fail, silent=silent) + + def _create_rsync_filter_args(self, options): + rsync_excludes = options.get("rsync_exclude") or [] + rsync_filters = options.get("rsync_filter") or [] + + exclude_args = [ + ["--exclude", rsync_exclude] for rsync_exclude in rsync_excludes + ] + filter_args = [ + ["--filter", "dir-merge,- {}".format(rsync_filter)] + for rsync_filter in rsync_filters + ] + + # Combine and flatten the two lists + return [arg for args_list in exclude_args + filter_args for arg in args_list] + + def run_rsync_up(self, source, target, options=None): + self._set_ssh_ip_if_required() + options = options or {} + + command = ["rsync"] + command += [ + "--rsh", + subprocess.list2cmdline( + ["ssh"] + self.ssh_options.to_ssh_options_list(timeout=120) + ), + ] + command += ["-avz"] + command += self._create_rsync_filter_args(options=options) + command += [source, "{}@{}:{}".format(self.ssh_user, self.ssh_ip, target)] + cli_logger.verbose("Running `{}`", cf.bold(" ".join(command))) + self._run_helper(command, silent=is_rsync_silent()) + + def run_rsync_down(self, source, target, options=None): + self._set_ssh_ip_if_required() + + command = ["rsync"] + command += [ + "--rsh", + subprocess.list2cmdline( + ["ssh"] + self.ssh_options.to_ssh_options_list(timeout=120) + ), + ] + command += ["-avz"] + command += self._create_rsync_filter_args(options=options) + command += ["{}@{}:{}".format(self.ssh_user, self.ssh_ip, source), target] + cli_logger.verbose("Running `{}`", cf.bold(" ".join(command))) + self._run_helper(command, silent=is_rsync_silent()) + + def remote_shell_command_str(self): + if self.ssh_private_key: + return "ssh -o IdentitiesOnly=yes -i {} {}@{}\n".format( + self.ssh_private_key, self.ssh_user, self.ssh_ip + ) + else: + return "ssh -o IdentitiesOnly=yes {}@{}\n".format( + self.ssh_user, self.ssh_ip + ) + + +class DockerCommandRunner(CommandRunnerInterface): + def __init__(self, docker_config, **common_args): + self.ssh_command_runner = SSHCommandRunner(**common_args) + self.container_name = docker_config["container_name"] + self.docker_config = docker_config + self.home_dir = None + self.initialized = False + # Optionally use 'podman' instead of 'docker' + use_podman = docker_config.get("use_podman", False) + self.docker_cmd = "podman" if use_podman else "docker" + + def run( + self, + cmd: Optional[str] = None, + timeout: int = 120, + exit_on_fail: bool = False, + port_forward: Optional[List[Tuple[int, int]]] = None, + with_output: bool = False, + environment_variables: Optional[Dict[str, object]] = None, + run_env: str = "auto", + ssh_options_override_ssh_key: str = "", + shutdown_after_run: bool = False, + ) -> str: + if run_env == "auto": + run_env = ( + "host" + if (not bool(cmd) or cmd.find(self.docker_cmd) == 0) + else self.docker_cmd + ) + + if environment_variables: + cmd = _with_environment_variables(cmd, environment_variables) + + if run_env == "docker": + cmd = self._docker_expand_user(cmd, any_char=True) + if is_using_login_shells(): + cmd = " ".join(_with_interactive(cmd)) + cmd = with_docker_exec( + [cmd], + container_name=self.container_name, + with_interactive=is_using_login_shells(), + docker_cmd=self.docker_cmd, + )[0] + + if shutdown_after_run: + # sudo shutdown should run after `with_docker_exec` command above + cmd += "; sudo shutdown -h now" + # Do not pass shutdown_after_run argument to ssh_command_runner.run() + # since it is handled above. + return self.ssh_command_runner.run( + cmd, + timeout=timeout, + exit_on_fail=exit_on_fail, + port_forward=port_forward, + with_output=with_output, + ssh_options_override_ssh_key=ssh_options_override_ssh_key, + ) + + def run_rsync_up(self, source, target, options=None): + options = options or {} + host_destination = os.path.join( + self._get_docker_host_mount_location(self.ssh_command_runner.cluster_name), + target.lstrip("/"), + ) + + host_mount_location = os.path.dirname(host_destination.rstrip("/")) + self.ssh_command_runner.run( + f"mkdir -p {host_mount_location} && chown -R " + f"{self.ssh_command_runner.ssh_user} {host_mount_location}", + silent=is_rsync_silent(), + ) + + self.ssh_command_runner.run_rsync_up(source, host_destination, options=options) + if self._check_container_status() and not options.get( + "docker_mount_if_possible", False + ): + if os.path.isdir(source): + # Adding a "." means that docker copies the *contents* + # Without it, docker copies the source *into* the target + host_destination += "/." + + # This path may not exist inside the container. This ensures + # that the path is created! + prefix = with_docker_exec( + [ + "mkdir -p {}".format( + os.path.dirname(self._docker_expand_user(target)) + ) + ], + container_name=self.container_name, + with_interactive=is_using_login_shells(), + docker_cmd=self.docker_cmd, + )[0] + + self.ssh_command_runner.run( + "{} && rsync -e '{} exec -i' -avz {} {}:{}".format( + prefix, + self.docker_cmd, + host_destination, + self.container_name, + self._docker_expand_user(target), + ), + silent=is_rsync_silent(), + ) + + def run_rsync_down(self, source, target, options=None): + options = options or {} + host_source = os.path.join( + self._get_docker_host_mount_location(self.ssh_command_runner.cluster_name), + source.lstrip("/"), + ) + host_mount_location = os.path.dirname(host_source.rstrip("/")) + self.ssh_command_runner.run( + f"mkdir -p {host_mount_location} && chown -R " + f"{self.ssh_command_runner.ssh_user} {host_mount_location}", + silent=is_rsync_silent(), + ) + if source[-1] == "/": + source += "." + # Adding a "." means that docker copies the *contents* + # Without it, docker copies the source *into* the target + if not options.get("docker_mount_if_possible", False): + # NOTE: `--delete` is okay here because the container is the source + # of truth. + self.ssh_command_runner.run( + "rsync -e '{} exec -i' -avz --delete {}:{} {}".format( + self.docker_cmd, + self.container_name, + self._docker_expand_user(source), + host_source, + ), + silent=is_rsync_silent(), + ) + self.ssh_command_runner.run_rsync_down(host_source, target, options=options) + + def remote_shell_command_str(self): + inner_str = ( + self.ssh_command_runner.remote_shell_command_str() + .replace("ssh", "ssh -tt", 1) + .strip("\n") + ) + return inner_str + " {} exec -it {} /bin/bash\n".format( + self.docker_cmd, self.container_name + ) + + def _check_docker_installed(self): + no_exist = "NoExist" + output = self.ssh_command_runner.run( + f"command -v {self.docker_cmd} || echo '{no_exist}'", with_output=True + ) + cleaned_output = output.decode().strip() + if no_exist in cleaned_output or "docker" not in cleaned_output: + if self.docker_cmd == "docker": + install_commands = [ + "curl -fsSL https://get.docker.com -o get-docker.sh", + "sudo sh get-docker.sh", + "sudo usermod -aG docker $USER", + "sudo systemctl restart docker -f", + ] + else: + install_commands = [ + "sudo apt-get update", + "sudo apt-get -y install podman", + ] + + logger.error( + f"{self.docker_cmd.capitalize()} not installed. You can " + f"install {self.docker_cmd.capitalize()} by adding the " + "following commands to 'initialization_commands':\n" + + "\n".join(install_commands) + ) + + def _check_container_status(self): + if self.initialized: + return True + output = ( + self.ssh_command_runner.run( + check_docker_running_cmd(self.container_name, self.docker_cmd), + with_output=True, + ) + .decode("utf-8") + .strip() + ) + # Checks for the false positive where "true" is in the container name + return "true" in output.lower() and "no such object" not in output.lower() + + def _docker_expand_user(self, string, any_char=False): + user_pos = string.find("~") + if user_pos > -1: + if self.home_dir is None: + self.home_dir = ( + self.ssh_command_runner.run( + f"{self.docker_cmd} exec {self.container_name} " + "printenv HOME", + with_output=True, + ) + .decode("utf-8") + .strip() + ) + + if any_char: + return string.replace("~/", self.home_dir + "/") + + elif not any_char and user_pos == 0: + return string.replace("~", self.home_dir, 1) + + return string + + def _check_if_container_restart_is_needed( + self, image: str, cleaned_bind_mounts: Dict[str, str] + ) -> bool: + re_init_required = False + running_image = ( + self.run( + check_docker_image(self.container_name, self.docker_cmd), + with_output=True, + run_env="host", + ) + .decode("utf-8") + .strip() + ) + if running_image != image: + cli_logger.error( + "A container with name {} is running image {} instead " + + "of {} (which was provided in the YAML)", + self.container_name, + running_image, + image, + ) + mounts = ( + self.run( + check_bind_mounts_cmd(self.container_name, self.docker_cmd), + with_output=True, + run_env="host", + ) + .decode("utf-8") + .strip() + ) + try: + active_mounts = json.loads(mounts) + active_remote_mounts = { + mnt["Destination"].strip("/") for mnt in active_mounts + } + # Ignore ray bootstrap files. + requested_remote_mounts = { + self._docker_expand_user(remote).strip("/") + for remote in cleaned_bind_mounts.keys() + } + unfulfilled_mounts = requested_remote_mounts - active_remote_mounts + if unfulfilled_mounts: + re_init_required = True + cli_logger.warning( + "This Docker Container is already running. " + "Restarting the Docker container on " + "this node to pick up the following file_mounts {}", + unfulfilled_mounts, + ) + except json.JSONDecodeError: + cli_logger.verbose( + "Unable to check if file_mounts specified in the YAML " + "differ from those on the running container." + ) + return re_init_required + + def run_init( + self, *, as_head: bool, file_mounts: Dict[str, str], sync_run_yet: bool + ): + BOOTSTRAP_MOUNTS = ["~/ray_bootstrap_config.yaml", "~/ray_bootstrap_key.pem"] + + specific_image = self.docker_config.get( + f"{'head' if as_head else 'worker'}_image", self.docker_config.get("image") + ) + + self._check_docker_installed() + if self.docker_config.get("pull_before_run", True): + assert specific_image, ( + "Image must be included in config if " + "pull_before_run is specified" + ) + self.run( + "{} pull {}".format(self.docker_cmd, specific_image), run_env="host" + ) + else: + + self.run( + f"{self.docker_cmd} image inspect {specific_image} " + "1> /dev/null 2>&1 || " + f"{self.docker_cmd} pull {specific_image}" + ) + + # Bootstrap files cannot be bind mounted because docker opens the + # underlying inode. When the file is switched, docker becomes outdated. + cleaned_bind_mounts = file_mounts.copy() + for mnt in BOOTSTRAP_MOUNTS: + cleaned_bind_mounts.pop(mnt, None) + + docker_run_executed = False + + container_running = self._check_container_status() + requires_re_init = False + if container_running: + requires_re_init = self._check_if_container_restart_is_needed( + specific_image, cleaned_bind_mounts + ) + if requires_re_init: + self.run( + f"{self.docker_cmd} stop {self.container_name}", run_env="host" + ) + + if (not container_running) or requires_re_init: + if not sync_run_yet: + # Do not start the actual image as we need to run file_sync + # first to ensure that all folders are created with the + # correct ownership. Docker will create the folders with + # `root` as the owner. + return True + # Get home directory + image_env = ( + self.ssh_command_runner.run( + f"{self.docker_cmd} " + + "inspect -f '{{json .Config.Env}}' " + + specific_image, + with_output=True, + ) + .decode() + .strip() + ) + home_directory = "/root" + try: + for env_var in json.loads(image_env): + if env_var.startswith("HOME="): + home_directory = env_var.split("HOME=")[1] + break + except json.JSONDecodeError as e: + cli_logger.error( + "Unable to deserialize `image_env` to Python object. " + f"The `image_env` is:\n{image_env}" + ) + raise e + + user_docker_run_options = self.docker_config.get( + "run_options", [] + ) + self.docker_config.get( + f"{'head' if as_head else 'worker'}_run_options", [] + ) + start_command = docker_start_cmds( + self.ssh_command_runner.ssh_user, + specific_image, + cleaned_bind_mounts, + self.container_name, + self._configure_runtime( + self._auto_configure_shm(user_docker_run_options) + ), + self.ssh_command_runner.cluster_name, + home_directory, + self.docker_cmd, + ) + self.run(start_command, run_env="host") + docker_run_executed = True + + # Explicitly copy in ray bootstrap files. + for mount in BOOTSTRAP_MOUNTS: + if mount in file_mounts: + if not sync_run_yet: + # NOTE(ilr) This rsync is needed because when starting from + # a stopped instance, /tmp may be deleted and `run_init` + # is called before the first `file_sync` happens + self.run_rsync_up(file_mounts[mount], mount) + self.ssh_command_runner.run( + "rsync -e '{cmd} exec -i' -avz {src} {container}:{dst}".format( + cmd=self.docker_cmd, + src=os.path.join( + self._get_docker_host_mount_location( + self.ssh_command_runner.cluster_name + ), + mount, + ), + container=self.container_name, + dst=self._docker_expand_user(mount), + ) + ) + try: + # Check if the current user has read permission. + # If they do not, try to change ownership! + self.run( + f"cat {mount} >/dev/null 2>&1 || " + f"sudo chown $(id -u):$(id -g) {mount}" + ) + except Exception: + lsl_string = ( + self.run(f"ls -l {mount}", with_output=True) + .decode("utf-8") + .strip() + ) + # The string is of format + # + permissions = lsl_string.split(" ")[0] + owner = lsl_string.split(" ")[2] + group = lsl_string.split(" ")[3] + current_user = ( + self.run("whoami", with_output=True).decode("utf-8").strip() + ) + cli_logger.warning( + f"File ({mount}) is owned by user:{owner} and group:" + f"{group} with permissions ({permissions}). The " + f"current user ({current_user}) does not have " + "permission to read these files, and Ray may not be " + "able to autoscale. This can be resolved by " + "installing `sudo` in your container, or adding a " + f"command like 'chown {current_user} {mount}' to " + "your `setup_commands`." + ) + self.initialized = True + return docker_run_executed + + def _configure_runtime(self, run_options: List[str]) -> List[str]: + if self.docker_config.get("disable_automatic_runtime_detection"): + return run_options + + runtime_output = ( + self.ssh_command_runner.run( + f"{self.docker_cmd} " + "info -f '{{.Runtimes}}' ", with_output=True + ) + .decode() + .strip() + ) + if "nvidia-container-runtime" in runtime_output: + try: + self.ssh_command_runner.run("nvidia-smi", with_output=False) + return run_options + ["--runtime=nvidia"] + except Exception as e: + logger.warning( + "NVIDIA Container Runtime is present, but no GPUs found." + ) + logger.debug(f"nvidia-smi error: {e}") + return run_options + + return run_options + + def _auto_configure_shm(self, run_options: List[str]) -> List[str]: + if self.docker_config.get("disable_shm_size_detection"): + return run_options + for run_opt in run_options: + if "--shm-size" in run_opt: + logger.info( + "Bypassing automatic SHM-Detection because of " + f"`run_option`: {run_opt}" + ) + return run_options + try: + shm_output = ( + self.ssh_command_runner.run( + "cat /proc/meminfo || true", with_output=True + ) + .decode() + .strip() + ) + available_memory = int( + [ln for ln in shm_output.split("\n") if "MemAvailable" in ln][ + 0 + ].split()[1] + ) + available_memory_bytes = available_memory * 1024 + # Overestimate SHM size by 10% + shm_size = min( + (available_memory_bytes * DEFAULT_OBJECT_STORE_MEMORY_PROPORTION * 1.1), + DEFAULT_OBJECT_STORE_MAX_MEMORY_BYTES, + ) + return run_options + [f"--shm-size='{shm_size}b'"] + except Exception as e: + logger.warning(f"Received error while trying to auto-compute SHM size {e}") + return run_options + + def _get_docker_host_mount_location(self, cluster_name: str) -> str: + """Return the docker host mount directory location.""" + # Imported here due to circular dependency in imports. + from ray.autoscaler.sdk import get_docker_host_mount_location + + return get_docker_host_mount_location(cluster_name) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/commands.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/commands.py new file mode 100644 index 0000000000000000000000000000000000000000..52f87f2e31a0a9c1ac4796f4cacc71033eb26087 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/commands.py @@ -0,0 +1,1645 @@ +import copy +import datetime +import hashlib +import json +import logging +import os +import random +import shutil +import subprocess +import sys +import tempfile +import time +from concurrent.futures import ThreadPoolExecutor +from types import ModuleType +from typing import Any, Dict, List, Optional, Tuple, Union + +import click +import yaml + +import ray +from ray._common.usage import usage_lib +from ray.autoscaler._private import subprocess_output_util as cmd_output_util +from ray.autoscaler._private.autoscaler import AutoscalerSummary +from ray.autoscaler._private.cli_logger import cf, cli_logger +from ray.autoscaler._private.cluster_dump import ( + Archive, + GetParameters, + Node, + _info_from_params, + create_archive_for_local_and_remote_nodes, + create_archive_for_remote_nodes, + get_all_local_data, +) +from ray.autoscaler._private.command_runner import ( + set_rsync_silent, + set_using_login_shells, +) +from ray.autoscaler._private.constants import ( + AUTOSCALER_RESOURCE_REQUEST_CHANNEL, + MAX_PARALLEL_SHUTDOWN_WORKERS, +) +from ray.autoscaler._private.event_system import CreateClusterEvent, global_event_system +from ray.autoscaler._private.log_timer import LogTimer +from ray.autoscaler._private.node_provider_availability_tracker import ( + NodeAvailabilitySummary, +) +from ray.autoscaler._private.providers import ( + _NODE_PROVIDERS, + _PROVIDER_PRETTY_NAMES, + _get_node_provider, +) +from ray.autoscaler._private.updater import NodeUpdaterThread +from ray.autoscaler._private.util import ( + LoadMetricsSummary, + format_info_string, + hash_launch_conf, + hash_runtime_conf, + prepare_config, + validate_config, + with_envs, +) +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + NODE_KIND_WORKER, + STATUS_UNINITIALIZED, + STATUS_UP_TO_DATE, + TAG_RAY_LAUNCH_CONFIG, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, + TAG_RAY_USER_NODE_TYPE, +) +from ray.experimental.internal_kv import _internal_kv_put, internal_kv_get_gcs_client +from ray.util.debug import log_once + +try: # py3 + from shlex import quote +except ImportError: # py2 + from pipes import quote + + +logger = logging.getLogger(__name__) + +RUN_ENV_TYPES = ["auto", "host", "docker"] + +POLL_INTERVAL = 5 + +Port_forward = Union[Tuple[int, int], List[Tuple[int, int]]] + + +def try_logging_config(config: Dict[str, Any]) -> None: + if config["provider"]["type"] == "aws": + from ray.autoscaler._private.aws.config import log_to_cli + + log_to_cli(config) + + +def try_get_log_state(provider_config: Dict[str, Any]) -> Optional[dict]: + if provider_config["type"] == "aws": + from ray.autoscaler._private.aws.config import get_log_state + + return get_log_state() + return None + + +def try_reload_log_state(provider_config: Dict[str, Any], log_state: dict) -> None: + if not log_state: + return + if provider_config["type"] == "aws": + from ray.autoscaler._private.aws.config import reload_log_state + + return reload_log_state(log_state) + + +def debug_status( + status, error, verbose: bool = False, address: Optional[str] = None +) -> str: + """ + Return a debug string for the autoscaler. + + Args: + status: The autoscaler status string for v1 + error: The autoscaler error string for v1 + verbose: Whether to print verbose information. + address: The address of the cluster (gcs address). + + Returns: + str: A debug string for the cluster's status. + """ + from ray.autoscaler.v2.utils import is_autoscaler_v2 + + if is_autoscaler_v2(): + from ray.autoscaler.v2.sdk import get_cluster_status + from ray.autoscaler.v2.utils import ClusterStatusFormatter + + cluster_status = get_cluster_status(address) + status = ClusterStatusFormatter.format(cluster_status, verbose=verbose) + elif status: + status = status.decode("utf-8") + status_dict = json.loads(status) + lm_summary_dict = status_dict.get("load_metrics_report") + autoscaler_summary_dict = status_dict.get("autoscaler_report") + timestamp = status_dict.get("time") + gcs_request_time = status_dict.get("gcs_request_time") + non_terminated_nodes_time = status_dict.get("non_terminated_nodes_time") + if lm_summary_dict and autoscaler_summary_dict and timestamp: + lm_summary = LoadMetricsSummary(**lm_summary_dict) + node_availability_summary_dict = autoscaler_summary_dict.pop( + "node_availability_summary", {} + ) + node_availability_summary = NodeAvailabilitySummary.from_fields( + **node_availability_summary_dict + ) + autoscaler_summary = AutoscalerSummary( + node_availability_summary=node_availability_summary, + **autoscaler_summary_dict, + ) + report_time = datetime.datetime.fromtimestamp(timestamp) + status = format_info_string( + lm_summary, + autoscaler_summary, + time=report_time, + gcs_request_time=gcs_request_time, + non_terminated_nodes_time=non_terminated_nodes_time, + verbose=verbose, + ) + else: + status = ( + "No cluster status. It may take a few seconds " + "for the Ray internal services to start up." + ) + else: + status = ( + "No cluster status. It may take a few seconds " + "for the Ray internal services to start up." + ) + + if error: + status += "\n" + status += error.decode("utf-8") + + return status + + +def request_resources( + num_cpus: Optional[int] = None, bundles: Optional[List[dict]] = None +) -> None: + """Remotely request some CPU or GPU resources from the autoscaler. + + This function is to be called e.g. on a node before submitting a bunch of + ray.remote calls to ensure that resources rapidly become available. + + Args: + num_cpus: Scale the cluster to ensure this number of CPUs are + available. This request is persistent until another call to + request_resources() is made. + bundles (List[ResourceDict]): Scale the cluster to ensure this set of + resource shapes can fit. This request is persistent until another + call to request_resources() is made. + """ + if not ray.is_initialized(): + raise RuntimeError("Ray is not initialized yet") + to_request = [] + if num_cpus: + to_request += [{"CPU": 1}] * num_cpus + if bundles: + to_request += bundles + _internal_kv_put( + AUTOSCALER_RESOURCE_REQUEST_CHANNEL, json.dumps(to_request), overwrite=True + ) + + from ray.autoscaler.v2.utils import is_autoscaler_v2 + + if is_autoscaler_v2(): + from ray.autoscaler.v2.sdk import request_cluster_resources + + gcs_address = internal_kv_get_gcs_client().address + request_cluster_resources(gcs_address, to_request) + + +def create_or_update_cluster( + config_file: str, + override_min_workers: Optional[int], + override_max_workers: Optional[int], + no_restart: bool, + restart_only: bool, + yes: bool, + override_cluster_name: Optional[str] = None, + no_config_cache: bool = False, + redirect_command_output: Optional[bool] = False, + use_login_shells: bool = True, + no_monitor_on_head: bool = False, +) -> Dict[str, Any]: + """Creates or updates an autoscaling Ray cluster from a config json.""" + # no_monitor_on_head is an internal flag used by the Ray K8s operator. + # If True, prevents autoscaling config sync to the Ray head during cluster + # creation. See https://github.com/ray-project/ray/pull/13720. + set_using_login_shells(use_login_shells) + if not use_login_shells: + cmd_output_util.set_allow_interactive(False) + if redirect_command_output is None: + # Do not redirect by default. + cmd_output_util.set_output_redirected(False) + else: + cmd_output_util.set_output_redirected(redirect_command_output) + + def handle_yaml_error(e): + cli_logger.error("Cluster config invalid") + cli_logger.newline() + cli_logger.error("Failed to load YAML file " + cf.bold("{}"), config_file) + cli_logger.newline() + with cli_logger.verbatim_error_ctx("PyYAML error:"): + cli_logger.error(e) + cli_logger.abort() + + try: + config = yaml.safe_load(open(config_file).read()) + except FileNotFoundError: + cli_logger.abort( + "Provided cluster configuration file ({}) does not exist", + cf.bold(config_file), + ) + except yaml.parser.ParserError as e: + handle_yaml_error(e) + raise + except yaml.scanner.ScannerError as e: + handle_yaml_error(e) + raise + global_event_system.execute_callback( + CreateClusterEvent.up_started, {"cluster_config": config} + ) + + # todo: validate file_mounts, ssh keys, etc. + + importer = _NODE_PROVIDERS.get(config["provider"]["type"]) + if not importer: + cli_logger.abort( + "Unknown provider type " + cf.bold("{}") + "\n" + "Available providers are: {}", + config["provider"]["type"], + cli_logger.render_list( + [k for k in _NODE_PROVIDERS.keys() if _NODE_PROVIDERS[k] is not None] + ), + ) + + printed_overrides = False + + def handle_cli_override(key, override): + if override is not None: + if key in config: + nonlocal printed_overrides + printed_overrides = True + cli_logger.warning( + "`{}` override provided on the command line.\n" + " Using " + + cf.bold("{}") + + cf.dimmed(" [configuration file has " + cf.bold("{}") + "]"), + key, + override, + config[key], + ) + config[key] = override + + handle_cli_override("min_workers", override_min_workers) + handle_cli_override("max_workers", override_max_workers) + handle_cli_override("cluster_name", override_cluster_name) + + if printed_overrides: + cli_logger.newline() + + cli_logger.labeled_value("Cluster", config["cluster_name"]) + + cli_logger.newline() + config = _bootstrap_config(config, no_config_cache=no_config_cache) + + try_logging_config(config) + get_or_create_head_node( + config, + config_file, + no_restart, + restart_only, + yes, + override_cluster_name, + no_monitor_on_head, + ) + return config + + +CONFIG_CACHE_VERSION = 1 + + +def _bootstrap_config( + config: Dict[str, Any], no_config_cache: bool = False +) -> Dict[str, Any]: + config = prepare_config(config) + # NOTE: multi-node-type autoscaler is guaranteed to be in use after this. + + hasher = hashlib.sha1() + hasher.update(json.dumps([config], sort_keys=True).encode("utf-8")) + cache_key = os.path.join( + tempfile.gettempdir(), "ray-config-{}".format(hasher.hexdigest()) + ) + + if os.path.exists(cache_key) and not no_config_cache: + config_cache = json.loads(open(cache_key).read()) + if config_cache.get("_version", -1) == CONFIG_CACHE_VERSION: + # todo: is it fine to re-resolve? afaik it should be. + # we can have migrations otherwise or something + # but this seems overcomplicated given that resolving is + # relatively cheap + try_reload_log_state( + config_cache["config"]["provider"], + config_cache.get("provider_log_info"), + ) + + if log_once("_printed_cached_config_warning"): + cli_logger.verbose_warning( + "Loaded cached provider configuration from " + cf.bold("{}"), + cache_key, + ) + if cli_logger.verbosity == 0: + cli_logger.warning("Loaded cached provider configuration") + cli_logger.warning( + "If you experience issues with " + "the cloud provider, try re-running " + "the command with {}.", + cf.bold("--no-config-cache"), + ) + + return config_cache["config"] + else: + cli_logger.warning( + "Found cached cluster config " + "but the version " + cf.bold("{}") + " " + "(expected " + cf.bold("{}") + ") does not match.\n" + "This is normal if cluster launcher was updated.\n" + "Config will be re-resolved.", + config_cache.get("_version", "none"), + CONFIG_CACHE_VERSION, + ) + + importer = _NODE_PROVIDERS.get(config["provider"]["type"]) + if not importer: + raise NotImplementedError("Unsupported provider {}".format(config["provider"])) + + provider_cls = importer(config["provider"]) + + cli_logger.print( + "Checking {} environment settings", + _PROVIDER_PRETTY_NAMES.get(config["provider"]["type"]), + ) + try: + config = provider_cls.fillout_available_node_types_resources(config) + except Exception as exc: + if cli_logger.verbosity > 2: + logger.exception("Failed to autodetect node resources.") + else: + cli_logger.warning( + f"Failed to autodetect node resources: {str(exc)}. " + "You can see full stack trace with higher verbosity." + ) + + try: + # NOTE: if `resources` field is missing, validate_config for providers + # other than AWS and Kubernetes will fail (the schema error will ask + # the user to manually fill the resources) as we currently support + # autofilling resources for AWS and Kubernetes only. + validate_config(config) + except (ModuleNotFoundError, ImportError): + cli_logger.abort( + "Not all Ray autoscaler dependencies were found. " + "In Ray 1.4+, the Ray CLI, autoscaler, and dashboard will " + 'only be usable via `pip install "ray[default]"`. Please ' + "update your install command." + ) + resolved_config = provider_cls.bootstrap_config(config) + + if not no_config_cache: + with open(cache_key, "w") as f: + config_cache = { + "_version": CONFIG_CACHE_VERSION, + "provider_log_info": try_get_log_state(resolved_config["provider"]), + "config": resolved_config, + } + f.write(json.dumps(config_cache)) + return resolved_config + + +def teardown_cluster( + config_file: str, + yes: bool, + workers_only: bool, + override_cluster_name: Optional[str], + keep_min_workers: bool, +) -> None: + """Destroys all nodes of a Ray cluster described by a config json.""" + config = yaml.safe_load(open(config_file).read()) + if override_cluster_name is not None: + config["cluster_name"] = override_cluster_name + + config = _bootstrap_config(config) + + cli_logger.confirm(yes, "Destroying cluster.", _abort=True) + + if not workers_only: + try: + exec_cluster( + config_file, + cmd="ray stop", + run_env="auto", + screen=False, + tmux=False, + stop=False, + start=False, + override_cluster_name=override_cluster_name, + port_forward=None, + with_output=False, + ) + except Exception as e: + # todo: add better exception info + cli_logger.verbose_error("{}", str(e)) + cli_logger.warning( + "Exception occurred when stopping the cluster Ray runtime " + "(use -v to dump teardown exceptions)." + ) + cli_logger.warning( + "Ignoring the exception and " + "attempting to shut down the cluster nodes anyway." + ) + + provider = _get_node_provider(config["provider"], config["cluster_name"]) + + def remaining_nodes(): + workers = provider.non_terminated_nodes({TAG_RAY_NODE_KIND: NODE_KIND_WORKER}) + + if keep_min_workers: + min_workers = config.get("min_workers", 0) + cli_logger.print( + "{} random worker nodes will not be shut down. " + + cf.dimmed("(due to {})"), + cf.bold(min_workers), + cf.bold("--keep-min-workers"), + ) + + workers = random.sample(workers, len(workers) - min_workers) + + # todo: it's weird to kill the head node but not all workers + if workers_only: + cli_logger.print( + "The head node will not be shut down. " + cf.dimmed("(due to {})"), + cf.bold("--workers-only"), + ) + + return workers + + head = provider.non_terminated_nodes({TAG_RAY_NODE_KIND: NODE_KIND_HEAD}) + + return head + workers + + def run_docker_stop(node, container_name): + try: + updater = NodeUpdaterThread( + node_id=node, + provider_config=config["provider"], + provider=provider, + auth_config=config["auth"], + cluster_name=config["cluster_name"], + file_mounts=config["file_mounts"], + initialization_commands=[], + setup_commands=[], + ray_start_commands=[], + runtime_hash="", + file_mounts_contents_hash="", + is_head_node=False, + docker_config=config.get("docker"), + ) + + _exec( + updater, + f"docker stop {container_name}", + with_output=False, + run_env="host", + ) + except Exception: + cli_logger.warning(f"Docker stop failed on {node}") + + # Loop here to check that both the head and worker nodes are actually + # really gone + A = remaining_nodes() + + container_name = config.get("docker", {}).get("container_name") + if container_name: + # This is to ensure that the parallel SSH calls below do not mess with + # the users terminal. + output_redir = cmd_output_util.is_output_redirected() + cmd_output_util.set_output_redirected(True) + allow_interactive = cmd_output_util.does_allow_interactive() + cmd_output_util.set_allow_interactive(False) + + with ThreadPoolExecutor(max_workers=MAX_PARALLEL_SHUTDOWN_WORKERS) as executor: + for node in A: + executor.submit( + run_docker_stop, node=node, container_name=container_name + ) + cmd_output_util.set_output_redirected(output_redir) + cmd_output_util.set_allow_interactive(allow_interactive) + with LogTimer("teardown_cluster: done."): + while A: + provider.terminate_nodes(A) + + cli_logger.print( + "Requested {} nodes to shut down.", + cf.bold(len(A)), + _tags=dict(interval="1s"), + ) + + time.sleep(POLL_INTERVAL) # todo: interval should be a variable + A = remaining_nodes() + cli_logger.print( + "{} nodes remaining after {} second(s).", cf.bold(len(A)), POLL_INTERVAL + ) + cli_logger.success("No nodes remaining.") + + +def kill_node( + config_file: str, yes: bool, hard: bool, override_cluster_name: Optional[str] +) -> Optional[str]: + """Kills a random Raylet worker.""" + + config = yaml.safe_load(open(config_file).read()) + if override_cluster_name is not None: + config["cluster_name"] = override_cluster_name + config = _bootstrap_config(config) + + cli_logger.confirm(yes, "A random node will be killed.") + + provider = _get_node_provider(config["provider"], config["cluster_name"]) + nodes = provider.non_terminated_nodes({TAG_RAY_NODE_KIND: NODE_KIND_WORKER}) + if not nodes: + cli_logger.print("No worker nodes detected.") + return None + node = random.choice(nodes) + cli_logger.print("Shutdown " + cf.bold("{}"), node) + if hard: + provider.terminate_node(node) + else: + updater = NodeUpdaterThread( + node_id=node, + provider_config=config["provider"], + provider=provider, + auth_config=config["auth"], + cluster_name=config["cluster_name"], + file_mounts=config["file_mounts"], + initialization_commands=[], + setup_commands=[], + ray_start_commands=[], + runtime_hash="", + file_mounts_contents_hash="", + is_head_node=False, + docker_config=config.get("docker"), + ) + + _exec(updater, "ray stop", False, False) + + time.sleep(POLL_INTERVAL) + + if config.get("provider", {}).get("use_internal_ips", False): + node_ip = provider.internal_ip(node) + else: + node_ip = provider.external_ip(node) + + return node_ip + + +def monitor_cluster( + cluster_config_file: str, num_lines: int, override_cluster_name: Optional[str] +) -> None: + """Tails the autoscaler logs of a Ray cluster.""" + cmd = f"tail -n {num_lines} -f /tmp/ray/session_latest/logs/monitor*" + exec_cluster( + cluster_config_file, + cmd=cmd, + run_env="auto", + screen=False, + tmux=False, + stop=False, + start=False, + override_cluster_name=override_cluster_name, + port_forward=None, + ) + + +def warn_about_bad_start_command( + start_commands: List[str], no_monitor_on_head: bool = False +) -> None: + ray_start_cmd = list(filter(lambda x: "ray start" in x, start_commands)) + if len(ray_start_cmd) == 0: + cli_logger.warning( + "Ray runtime will not be started because `{}` is not in `{}`.", + cf.bold("ray start"), + cf.bold("head_start_ray_commands"), + ) + + autoscaling_config_in_ray_start_cmd = any( + "autoscaling-config" in x for x in ray_start_cmd + ) + if not (autoscaling_config_in_ray_start_cmd or no_monitor_on_head): + cli_logger.warning( + "The head node will not launch any workers because " + "`{}` does not have `{}` set.\n" + "Potential fix: add `{}` to the `{}` command under `{}`.", + cf.bold("ray start"), + cf.bold("--autoscaling-config"), + cf.bold("--autoscaling-config=~/ray_bootstrap_config.yaml"), + cf.bold("ray start"), + cf.bold("head_start_ray_commands"), + ) + + +def get_or_create_head_node( + config: Dict[str, Any], + printable_config_file: str, + no_restart: bool, + restart_only: bool, + yes: bool, + override_cluster_name: Optional[str], + no_monitor_on_head: bool = False, + _provider: Optional[NodeProvider] = None, + _runner: ModuleType = subprocess, +) -> None: + """Create the cluster head node, which in turn creates the workers.""" + global_event_system.execute_callback(CreateClusterEvent.cluster_booting_started) + provider = _provider or _get_node_provider( + config["provider"], config["cluster_name"] + ) + + config = copy.deepcopy(config) + head_node_tags = { + TAG_RAY_NODE_KIND: NODE_KIND_HEAD, + } + nodes = provider.non_terminated_nodes(head_node_tags) + if len(nodes) > 0: + head_node = nodes[0] + else: + head_node = None + + if not head_node: + cli_logger.confirm( + yes, "No head node found. Launching a new cluster.", _abort=True + ) + cli_logger.newline() + usage_lib.show_usage_stats_prompt(cli=True) + + if head_node: + if restart_only: + cli_logger.confirm( + yes, + "Updating cluster configuration and " + "restarting the cluster Ray runtime. " + "Setup commands will not be run due to `{}`.\n", + cf.bold("--restart-only"), + _abort=True, + ) + cli_logger.newline() + usage_lib.show_usage_stats_prompt(cli=True) + elif no_restart: + cli_logger.print( + "Cluster Ray runtime will not be restarted due to `{}`.", + cf.bold("--no-restart"), + ) + cli_logger.confirm( + yes, + "Updating cluster configuration and running setup commands.", + _abort=True, + ) + else: + cli_logger.print("Updating cluster configuration and running full setup.") + cli_logger.confirm( + yes, cf.bold("Cluster Ray runtime will be restarted."), _abort=True + ) + cli_logger.newline() + usage_lib.show_usage_stats_prompt(cli=True) + + cli_logger.newline() + # TODO(ekl) this logic is duplicated in node_launcher.py (keep in sync) + head_node_config = copy.deepcopy(config.get("head_node", {})) + # The above `head_node` field is deprecated in favor of per-node-type + # node_configs. We allow it for backwards-compatibility. + head_node_resources = None + head_node_labels = None + head_node_type = config.get("head_node_type") + if head_node_type: + head_node_tags[TAG_RAY_USER_NODE_TYPE] = head_node_type + head_config = config["available_node_types"][head_node_type] + head_node_config.update(head_config["node_config"]) + + # Not necessary to keep in sync with node_launcher.py + # Keep in sync with autoscaler.py _node_resources + head_node_resources = head_config.get("resources") + head_node_labels = head_config.get("labels") + + launch_hash = hash_launch_conf(head_node_config, config["auth"]) + creating_new_head = _should_create_new_head( + head_node, launch_hash, head_node_type, provider + ) + if creating_new_head: + with cli_logger.group("Acquiring an up-to-date head node"): + global_event_system.execute_callback( + CreateClusterEvent.acquiring_new_head_node + ) + if head_node is not None: + cli_logger.confirm(yes, "Relaunching the head node.", _abort=True) + + provider.terminate_node(head_node) + cli_logger.print("Terminated head node {}", head_node) + + head_node_tags[TAG_RAY_LAUNCH_CONFIG] = launch_hash + head_node_tags[TAG_RAY_NODE_NAME] = "ray-{}-head".format( + config["cluster_name"] + ) + head_node_tags[TAG_RAY_NODE_STATUS] = STATUS_UNINITIALIZED + provider.create_node(head_node_config, head_node_tags, 1) + cli_logger.print("Launched a new head node") + + start = time.time() + head_node = None + with cli_logger.group("Fetching the new head node"): + while True: + if time.time() - start > 50: + cli_logger.abort( + "Head node fetch timed out. Failed to create head node." + ) + nodes = provider.non_terminated_nodes(head_node_tags) + if len(nodes) == 1: + head_node = nodes[0] + break + time.sleep(POLL_INTERVAL) + cli_logger.newline() + + global_event_system.execute_callback(CreateClusterEvent.head_node_acquired) + + with cli_logger.group( + "Setting up head node", + _numbered=("<>", 1, 1), + # cf.bold(provider.node_tags(head_node)[TAG_RAY_NODE_NAME]), + _tags=dict(), + ): # add id, ARN to tags? + # TODO(ekl) right now we always update the head node even if the + # hash matches. + # We could prompt the user for what they want to do here. + # No need to pass in cluster_sync_files because we use this + # hash to set up the head node + (runtime_hash, file_mounts_contents_hash) = hash_runtime_conf( + config["file_mounts"], None, config + ) + + if not no_monitor_on_head: + # Return remote_config_file to avoid prematurely closing it. + config, remote_config_file = _set_up_config_for_head_node( + config, provider, no_restart + ) + cli_logger.print("Prepared bootstrap config") + + if restart_only: + # Docker may re-launch nodes, requiring setup + # commands to be rerun. + if config.get("docker", {}).get("container_name"): + setup_commands = config["head_setup_commands"] + else: + setup_commands = [] + ray_start_commands = config["head_start_ray_commands"] + # If user passed in --no-restart and we're not creating a new head, + # omit start commands. + elif no_restart and not creating_new_head: + setup_commands = config["head_setup_commands"] + ray_start_commands = [] + else: + setup_commands = config["head_setup_commands"] + ray_start_commands = config["head_start_ray_commands"] + + if not no_restart: + warn_about_bad_start_command(ray_start_commands, no_monitor_on_head) + + # Use RAY_UP_enable_autoscaler_v2 instead of RAY_enable_autoscaler_v2 + # to avoid accidentally enabling autoscaler v2 for ray up + # due to env inheritance. + if os.getenv("RAY_UP_enable_autoscaler_v2", "0") == "1": + ray_start_commands = with_envs( + ray_start_commands, + { + "RAY_enable_autoscaler_v2": "1", + "RAY_CLOUD_INSTANCE_ID": head_node, + "RAY_NODE_TYPE_NAME": head_node_type, + }, + ) + + updater = NodeUpdaterThread( + node_id=head_node, + provider_config=config["provider"], + provider=provider, + auth_config=config["auth"], + cluster_name=config["cluster_name"], + file_mounts=config["file_mounts"], + initialization_commands=config["initialization_commands"], + setup_commands=setup_commands, + ray_start_commands=ray_start_commands, + process_runner=_runner, + runtime_hash=runtime_hash, + file_mounts_contents_hash=file_mounts_contents_hash, + is_head_node=True, + node_resources=head_node_resources, + node_labels=head_node_labels, + rsync_options={ + "rsync_exclude": config.get("rsync_exclude"), + "rsync_filter": config.get("rsync_filter"), + }, + docker_config=config.get("docker"), + restart_only=restart_only, + ) + updater.start() + updater.join() + + # Refresh the node cache so we see the external ip if available + provider.non_terminated_nodes(head_node_tags) + + if updater.exitcode != 0: + # todo: this does not follow the mockup and is not good enough + cli_logger.abort("Failed to setup head node.") + sys.exit(1) + + global_event_system.execute_callback( + CreateClusterEvent.cluster_booting_completed, + { + "head_node_id": head_node, + }, + ) + + monitor_str = "tail -n 100 -f /tmp/ray/session_latest/logs/monitor*" + if override_cluster_name: + modifiers = " --cluster-name={}".format(quote(override_cluster_name)) + else: + modifiers = "" + + cli_logger.newline() + with cli_logger.group("Useful commands:"): + printable_config_file = os.path.abspath(printable_config_file) + + cli_logger.print("To terminate the cluster:") + cli_logger.print(cf.bold(f" ray down {printable_config_file}{modifiers}")) + cli_logger.newline() + + cli_logger.print("To retrieve the IP address of the cluster head:") + cli_logger.print( + cf.bold(f" ray get-head-ip {printable_config_file}{modifiers}") + ) + cli_logger.newline() + + cli_logger.print( + "To port-forward the cluster's Ray Dashboard to the local machine:" + ) + cli_logger.print(cf.bold(f" ray dashboard {printable_config_file}{modifiers}")) + cli_logger.newline() + + cli_logger.print( + "To submit a job to the cluster, port-forward the " + "Ray Dashboard in another terminal and run:" + ) + cli_logger.print( + cf.bold( + " ray job submit --address http://localhost: " + "--working-dir . -- python my_script.py" + ) + ) + cli_logger.newline() + + cli_logger.print("To connect to a terminal on the cluster head for debugging:") + cli_logger.print(cf.bold(f" ray attach {printable_config_file}{modifiers}")) + cli_logger.newline() + + cli_logger.print("To monitor autoscaling:") + cli_logger.print( + cf.bold( + f" ray exec {printable_config_file}{modifiers} {quote(monitor_str)}" + ) + ) + cli_logger.newline() + + +def _should_create_new_head( + head_node_id: Optional[str], + new_launch_hash: str, + new_head_node_type: str, + provider: NodeProvider, +) -> bool: + """Decides whether a new head node needs to be created. + + We need a new head if at least one of the following holds: + (a) There isn't an existing head node + (b) The user-submitted head node_config differs from the existing head + node's node_config. + (c) The user-submitted head node_type key differs from the existing head + node's node_type. + + Args: + head_node_id (Optional[str]): head node id if a head exists, else None + new_launch_hash: hash of current user-submitted head config + new_head_node_type: current user-submitted head node-type key + + Returns: + bool: True if a new Ray head node should be launched, False otherwise + """ + if not head_node_id: + # No head node exists, need to create it. + return True + + # Pull existing head's data. + head_tags = provider.node_tags(head_node_id) + current_launch_hash = head_tags.get(TAG_RAY_LAUNCH_CONFIG) + current_head_type = head_tags.get(TAG_RAY_USER_NODE_TYPE) + + # Compare to current head + hashes_mismatch = new_launch_hash != current_launch_hash + types_mismatch = new_head_node_type != current_head_type + + new_head_required = hashes_mismatch or types_mismatch + + # Warn user + if new_head_required: + with cli_logger.group( + "Currently running head node is out-of-date with cluster configuration" + ): + if hashes_mismatch: + cli_logger.print( + "Current hash is {}, expected {}", + cf.bold(current_launch_hash), + cf.bold(new_launch_hash), + ) + + if types_mismatch: + cli_logger.print( + "Current head node type is {}, expected {}", + cf.bold(current_head_type), + cf.bold(new_head_node_type), + ) + + return new_head_required + + +def _set_up_config_for_head_node( + config: Dict[str, Any], provider: NodeProvider, no_restart: bool +) -> Tuple[Dict[str, Any], Any]: + """Prepares autoscaling config and, if needed, ssh key, to be mounted onto + the Ray head node for use by the autoscaler. + + Returns the modified config and the temporary config file that will be + mounted onto the head node. + """ + # Rewrite the auth config so that the head + # node can update the workers + remote_config = copy.deepcopy(config) + + # drop proxy options if they exist, otherwise + # head node won't be able to connect to workers + remote_config["auth"].pop("ssh_proxy_command", None) + + # Drop the head_node field if it was introduced. It is technically not a + # valid field in the config, but it may have been introduced after + # validation (see _bootstrap_config() call to + # provider_cls.bootstrap_config(config)). The head node will never try to + # launch a head node so it doesn't need these defaults. + remote_config.pop("head_node", None) + + if "ssh_private_key" in config["auth"]: + remote_key_path = "~/ray_bootstrap_key.pem" + remote_config["auth"]["ssh_private_key"] = remote_key_path + + # Adjust for new file locations + new_mounts = {} + for remote_path in config["file_mounts"]: + new_mounts[remote_path] = remote_path + remote_config["file_mounts"] = new_mounts + remote_config["no_restart"] = no_restart + + remote_config = provider.prepare_for_head_node(remote_config) + + # Now inject the rewritten config and SSH key into the head node + remote_config_file = tempfile.NamedTemporaryFile("w", prefix="ray-bootstrap-") + remote_config_file.write(json.dumps(remote_config)) + remote_config_file.flush() + config["file_mounts"].update( + {"~/ray_bootstrap_config.yaml": remote_config_file.name} + ) + + if "ssh_private_key" in config["auth"]: + config["file_mounts"].update( + { + remote_key_path: config["auth"]["ssh_private_key"], + } + ) + + return config, remote_config_file + + +def attach_cluster( + config_file: str, + start: bool, + use_screen: bool, + use_tmux: bool, + override_cluster_name: Optional[str], + no_config_cache: bool = False, + new: bool = False, + port_forward: Optional[Port_forward] = None, +) -> None: + """Attaches to a screen for the specified cluster. + + Arguments: + config_file: path to the cluster yaml + start: whether to start the cluster if it isn't up + use_screen: whether to use screen as multiplexer + use_tmux: whether to use tmux as multiplexer + override_cluster_name: set the name of the cluster + new: whether to force a new screen + port_forward ( (int,int) or list[(int,int)] ): port(s) to forward + """ + + if use_tmux: + if new: + cmd = "tmux new" + else: + cmd = "tmux attach || tmux new" + elif use_screen: + if new: + cmd = "screen -L" + else: + cmd = "screen -L -xRR" + else: + if new: + raise ValueError("--new only makes sense if passing --screen or --tmux") + cmd = "$SHELL" + + exec_cluster( + config_file, + cmd=cmd, + run_env="auto", + screen=False, + tmux=False, + stop=False, + start=start, + override_cluster_name=override_cluster_name, + no_config_cache=no_config_cache, + port_forward=port_forward, + _allow_uninitialized_state=True, + ) + + +def exec_cluster( + config_file: str, + *, + cmd: Optional[str] = None, + run_env: str = "auto", + screen: bool = False, + tmux: bool = False, + stop: bool = False, + start: bool = False, + override_cluster_name: Optional[str] = None, + no_config_cache: bool = False, + port_forward: Optional[Port_forward] = None, + with_output: bool = False, + _allow_uninitialized_state: bool = False, + extra_screen_args: Optional[str] = None, +) -> str: + """Runs a command on the specified cluster. + + Arguments: + config_file: path to the cluster yaml + cmd: command to run + run_env: whether to run the command on the host or in a container. + Select between "auto", "host" and "docker" + screen: whether to run in a screen + extra_screen_args: optional custom additional args to screen command + tmux: whether to run in a tmux session + stop: whether to stop the cluster after command run + start: whether to start the cluster if it isn't up + override_cluster_name: set the name of the cluster + port_forward ( (int, int) or list[(int, int)] ): port(s) to forward + _allow_uninitialized_state: whether to execute on an uninitialized head + node. + """ + assert not (screen and tmux), "Can specify only one of `screen` or `tmux`." + assert run_env in RUN_ENV_TYPES, "--run_env must be in {}".format(RUN_ENV_TYPES) + # TODO(rliaw): We default this to True to maintain backwards-compat. + # In the future we would want to support disabling login-shells + # and interactivity. + cmd_output_util.set_allow_interactive(True) + + config = yaml.safe_load(open(config_file).read()) + if override_cluster_name is not None: + config["cluster_name"] = override_cluster_name + config = _bootstrap_config(config, no_config_cache=no_config_cache) + + head_node = _get_running_head_node( + config, + config_file, + override_cluster_name, + create_if_needed=start, + _allow_uninitialized_state=_allow_uninitialized_state, + ) + + provider = _get_node_provider(config["provider"], config["cluster_name"]) + updater = NodeUpdaterThread( + node_id=head_node, + provider_config=config["provider"], + provider=provider, + auth_config=config["auth"], + cluster_name=config["cluster_name"], + file_mounts=config["file_mounts"], + initialization_commands=[], + setup_commands=[], + ray_start_commands=[], + runtime_hash="", + file_mounts_contents_hash="", + is_head_node=True, + rsync_options={ + "rsync_exclude": config.get("rsync_exclude"), + "rsync_filter": config.get("rsync_filter"), + }, + docker_config=config.get("docker"), + ) + if cmd and stop: + cmd = "; ".join( + [ + cmd, + "ray stop", + "ray teardown ~/ray_bootstrap_config.yaml --yes --workers-only", + "sudo shutdown -h now", + ] + ) + + result = _exec( + updater, + cmd, + screen, + tmux, + port_forward=port_forward, + with_output=with_output, + run_env=run_env, + shutdown_after_run=False, + extra_screen_args=extra_screen_args, + ) + if tmux or screen: + attach_command_parts = ["ray attach", config_file] + if override_cluster_name is not None: + attach_command_parts.append( + "--cluster-name={}".format(override_cluster_name) + ) + if tmux: + attach_command_parts.append("--tmux") + elif screen: + attach_command_parts.append("--screen") + + attach_command = " ".join(attach_command_parts) + cli_logger.print("Run `{}` to check command status.", cf.bold(attach_command)) + return result + + +def _exec( + updater: NodeUpdaterThread, + cmd: Optional[str] = None, + screen: bool = False, + tmux: bool = False, + port_forward: Optional[Port_forward] = None, + with_output: bool = False, + run_env: str = "auto", + shutdown_after_run: bool = False, + extra_screen_args: Optional[str] = None, +) -> str: + if cmd: + if screen: + wrapped_cmd = [ + "screen", + "-L", + "-dm", + ] + + if extra_screen_args is not None and len(extra_screen_args) > 0: + wrapped_cmd += [extra_screen_args] + + wrapped_cmd += [ + "bash", + "-c", + quote(cmd + "; exec bash"), + ] + cmd = " ".join(wrapped_cmd) + elif tmux: + # TODO: Consider providing named session functionality + wrapped_cmd = [ + "tmux", + "new", + "-d", + "bash", + "-c", + quote(cmd + "; exec bash"), + ] + cmd = " ".join(wrapped_cmd) + return updater.cmd_runner.run( + cmd, + exit_on_fail=True, + port_forward=port_forward, + with_output=with_output, + run_env=run_env, + shutdown_after_run=shutdown_after_run, + ) + + +def rsync( + config_file: str, + source: Optional[str], + target: Optional[str], + override_cluster_name: Optional[str], + down: bool, + ip_address: Optional[str] = None, + use_internal_ip: bool = False, + no_config_cache: bool = False, + all_nodes: bool = False, + should_bootstrap: bool = True, + _runner: ModuleType = subprocess, +) -> None: + """Rsyncs files. + + Arguments: + config_file: path to the cluster yaml + source: source dir + target: target dir + override_cluster_name: set the name of the cluster + down: whether we're syncing remote -> local + ip_address: Address of node. Raise Exception + if both ip_address and 'all_nodes' are provided. + use_internal_ip: Whether the provided ip_address is + public or private. + all_nodes: whether to sync worker nodes in addition to the head node + should_bootstrap: whether to bootstrap cluster config before syncing + """ + if bool(source) != bool(target): + cli_logger.abort("Expected either both a source and a target, or neither.") + + assert bool(source) == bool( + target + ), "Must either provide both or neither source and target." + + if ip_address and all_nodes: + cli_logger.abort("Cannot provide both ip_address and 'all_nodes'.") + + config = yaml.safe_load(open(config_file).read()) + if override_cluster_name is not None: + config["cluster_name"] = override_cluster_name + if should_bootstrap: + config = _bootstrap_config(config, no_config_cache=no_config_cache) + + is_file_mount = False + if source and target: + for remote_mount in config.get("file_mounts", {}).keys(): + if (source if down else target).startswith(remote_mount): + is_file_mount = True + break + + provider = _get_node_provider(config["provider"], config["cluster_name"]) + + def rsync_to_node(node_id, is_head_node): + updater = NodeUpdaterThread( + node_id=node_id, + provider_config=config["provider"], + provider=provider, + auth_config=config["auth"], + cluster_name=config["cluster_name"], + file_mounts=config["file_mounts"], + initialization_commands=[], + setup_commands=[], + ray_start_commands=[], + runtime_hash="", + use_internal_ip=use_internal_ip, + process_runner=_runner, + file_mounts_contents_hash="", + is_head_node=is_head_node, + rsync_options={ + "rsync_exclude": config.get("rsync_exclude"), + "rsync_filter": config.get("rsync_filter"), + }, + docker_config=config.get("docker"), + ) + if down: + rsync = updater.rsync_down + else: + rsync = updater.rsync_up + + if source and target: + # print rsync progress for single file rsync + if cli_logger.verbosity > 0: + cmd_output_util.set_output_redirected(False) + set_rsync_silent(False) + rsync(source, target, is_file_mount) + else: + updater.sync_file_mounts(rsync) + + nodes = [] + head_node = _get_running_head_node( + config, config_file, override_cluster_name, create_if_needed=False + ) + if ip_address: + nodes = [provider.get_node_id(ip_address, use_internal_ip=use_internal_ip)] + else: + nodes = [head_node] + if all_nodes: + nodes.extend(_get_worker_nodes(config, override_cluster_name)) + + for node_id in nodes: + rsync_to_node(node_id, is_head_node=(node_id == head_node)) + + +def get_head_node_ip( + config_file: str, override_cluster_name: Optional[str] = None +) -> str: + """Returns head node IP for given configuration file if exists.""" + + config = yaml.safe_load(open(config_file).read()) + if override_cluster_name is not None: + config["cluster_name"] = override_cluster_name + + provider = _get_node_provider(config["provider"], config["cluster_name"]) + head_node = _get_running_head_node(config, config_file, override_cluster_name) + provider_cfg = config.get("provider", {}) + # Get internal IP if using internal IPs and + # use_external_head_ip is not specified + if provider_cfg.get("use_internal_ips", False) and not provider_cfg.get( + "use_external_head_ip", False + ): + head_node_ip = provider.internal_ip(head_node) + else: + head_node_ip = provider.external_ip(head_node) + + return head_node_ip + + +def get_worker_node_ips( + config_file: str, override_cluster_name: Optional[str] = None +) -> List[str]: + """Returns worker node IPs for given configuration file.""" + + config = yaml.safe_load(open(config_file).read()) + if override_cluster_name is not None: + config["cluster_name"] = override_cluster_name + + provider = _get_node_provider(config["provider"], config["cluster_name"]) + nodes = provider.non_terminated_nodes({TAG_RAY_NODE_KIND: NODE_KIND_WORKER}) + + if config.get("provider", {}).get("use_internal_ips", False): + return [provider.internal_ip(node) for node in nodes] + else: + return [provider.external_ip(node) for node in nodes] + + +def _get_worker_nodes( + config: Dict[str, Any], override_cluster_name: Optional[str] +) -> List[str]: + """Returns worker node ids for given configuration.""" + # todo: technically could be reused in get_worker_node_ips + if override_cluster_name is not None: + config["cluster_name"] = override_cluster_name + + provider = _get_node_provider(config["provider"], config["cluster_name"]) + return provider.non_terminated_nodes({TAG_RAY_NODE_KIND: NODE_KIND_WORKER}) + + +def _get_running_head_node( + config: Dict[str, Any], + printable_config_file: str, + override_cluster_name: Optional[str], + create_if_needed: bool = False, + _provider: Optional[NodeProvider] = None, + _allow_uninitialized_state: bool = False, +) -> str: + """Get a valid, running head node. + Args: + config (Dict[str, Any]): Cluster Config dictionary + printable_config_file: Used for printing formatted CLI commands. + override_cluster_name: Passed to `get_or_create_head_node` to + override the cluster name present in `config`. + create_if_needed: Create a head node if one is not present. + _provider: [For testing], a Node Provider to use. + _allow_uninitialized_state: Whether to return a head node that + is not 'UP TO DATE'. This is used to allow `ray attach` and + `ray exec` to debug a cluster in a bad state. + + """ + provider = _provider or _get_node_provider( + config["provider"], config["cluster_name"] + ) + head_node_tags = { + TAG_RAY_NODE_KIND: NODE_KIND_HEAD, + } + nodes = provider.non_terminated_nodes(head_node_tags) + head_node = None + _backup_head_node = None + for node in nodes: + node_state = provider.node_tags(node).get(TAG_RAY_NODE_STATUS) + if node_state == STATUS_UP_TO_DATE: + head_node = node + else: + _backup_head_node = node + cli_logger.warning(f"Head node ({node}) is in state {node_state}.") + + if head_node is not None: + return head_node + elif create_if_needed: + get_or_create_head_node( + config, + printable_config_file=printable_config_file, + restart_only=False, + no_restart=False, + yes=True, + override_cluster_name=override_cluster_name, + ) + # NOTE: `_allow_uninitialized_state` is forced to False if + # `create_if_needed` is set to True. This is to ensure that the + # commands executed after creation occur on an actually running + # cluster. + return _get_running_head_node( + config, + printable_config_file, + override_cluster_name, + create_if_needed=False, + _allow_uninitialized_state=False, + ) + else: + if _allow_uninitialized_state and _backup_head_node is not None: + cli_logger.warning( + f"The head node being returned: {_backup_head_node} is not " + "`up-to-date`. If you are not debugging a startup issue " + "it is recommended to restart this head node with: {}", + cf.bold(f" ray down {printable_config_file}"), + ) + + return _backup_head_node + raise RuntimeError( + "Head node of cluster ({}) not found!".format(config["cluster_name"]) + ) + + +def get_local_dump_archive( + stream: bool = False, + output: Optional[str] = None, + logs: bool = True, + debug_state: bool = True, + pip: bool = True, + processes: bool = True, + processes_verbose: bool = False, + tempfile: Optional[str] = None, +) -> Optional[str]: + if stream and output: + raise ValueError( + "You can only use either `--output` or `--stream`, but not both." + ) + + parameters = GetParameters( + logs=logs, + debug_state=debug_state, + pip=pip, + processes=processes, + processes_verbose=processes_verbose, + ) + + with Archive(file=tempfile) as archive: + get_all_local_data(archive, parameters) + + tmp = archive.file + + if stream: + with open(tmp, "rb") as fp: + os.write(1, fp.read()) + os.remove(tmp) + return None + + target = output or os.path.join(os.getcwd(), os.path.basename(tmp)) + shutil.move(tmp, target) + cli_logger.print(f"Created local data archive at {target}") + + return target + + +def get_cluster_dump_archive( + cluster_config_file: Optional[str] = None, + host: Optional[str] = None, + ssh_user: Optional[str] = None, + ssh_key: Optional[str] = None, + docker: Optional[str] = None, + local: Optional[bool] = None, + output: Optional[str] = None, + logs: bool = True, + debug_state: bool = True, + pip: bool = True, + processes: bool = True, + processes_verbose: bool = False, + tempfile: Optional[str] = None, +) -> Optional[str]: + # Inform the user what kind of logs are collected (before actually + # collecting, so they can abort) + content_str = "" + if logs: + content_str += ( + " - The logfiles of your Ray session\n" + " This usually includes Python outputs (stdout/stderr)\n" + ) + + if debug_state: + content_str += ( + " - Debug state information on your Ray cluster \n" + " e.g. number of workers, drivers, objects, etc.\n" + ) + + if pip: + content_str += " - Your installed Python packages (`pip freeze`)\n" + + if processes: + content_str += ( + " - Information on your running Ray processes\n" + " This includes command line arguments\n" + ) + + cli_logger.warning( + "You are about to create a cluster dump. This will collect data from " + "cluster nodes.\n\n" + "The dump will contain this information:\n\n" + f"{content_str}\n" + f"If you are concerned about leaking private information, extract " + f"the archive and inspect its contents before sharing it with " + f"anyone." + ) + + # Parse arguments (e.g. fetch info from cluster config) + ( + cluster_config_file, + hosts, + ssh_user, + ssh_key, + docker, + cluster_name, + ) = _info_from_params(cluster_config_file, host, ssh_user, ssh_key, docker) + + nodes = [ + Node(host=h, ssh_user=ssh_user, ssh_key=ssh_key, docker_container=docker) + for h in hosts + ] + + if not nodes: + cli_logger.error( + "No nodes found. Specify with `--host` or by passing a ray " + "cluster config to `--cluster`." + ) + return None + + if cluster_config_file: + nodes[0].is_head = True + + if local is None: + # If called with a cluster config, this was probably started + # from a laptop + local = not bool(cluster_config_file) + + parameters = GetParameters( + logs=logs, + debug_state=debug_state, + pip=pip, + processes=processes, + processes_verbose=processes_verbose, + ) + + with Archive(file=tempfile) as archive: + if local: + create_archive_for_local_and_remote_nodes( + archive, remote_nodes=nodes, parameters=parameters + ) + else: + create_archive_for_remote_nodes( + archive, remote_nodes=nodes, parameters=parameters + ) + + if not output: + if cluster_name: + filename = ( + f"{cluster_name}_" f"{datetime.datetime.now():%Y-%m-%d_%H-%M-%S}.tar.gz" + ) + else: + filename = ( + f"collected_logs_" f"{datetime.datetime.now():%Y-%m-%d_%H-%M-%S}.tar.gz" + ) + output = os.path.join(os.getcwd(), filename) + else: + output = os.path.expanduser(output) + + shutil.move(archive.file, output) + return output + + +def confirm(msg: str, yes: bool) -> Optional[bool]: + return None if yes else click.confirm(msg, abort=True) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/constants.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/constants.py new file mode 100644 index 0000000000000000000000000000000000000000..ca1005e88db20916211684158abd71c9bb70f174 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/constants.py @@ -0,0 +1,144 @@ +import os +import sys + +from ray._private.ray_constants import ( # noqa F401 + AUTOSCALER_RESOURCE_REQUEST_CHANNEL, + DEFAULT_OBJECT_STORE_MEMORY_PROPORTION, + LABELS_ENVIRONMENT_VARIABLE, + LOGGER_FORMAT, + RESOURCES_ENVIRONMENT_VARIABLE, +) + + +def env_integer(key, default): + if key in os.environ: + val = os.environ[key] + if val == "inf": + return sys.maxsize + else: + return int(val) + return default + + +# Whether autoscaler cluster status logging is enabled. Set to 0 disable. +AUTOSCALER_STATUS_LOG = env_integer("RAY_ENABLE_CLUSTER_STATUS_LOG", 1) + +# The name of the environment variable for plugging in a utilization scorer. +AUTOSCALER_UTILIZATION_SCORER_KEY = "RAY_AUTOSCALER_UTILIZATION_SCORER" + +# Whether to avoid launching GPU nodes for CPU only tasks. +AUTOSCALER_CONSERVE_GPU_NODES = env_integer("AUTOSCALER_CONSERVE_GPU_NODES", 1) + +# How long to wait for a node to start and terminate, in seconds. +AUTOSCALER_NODE_START_WAIT_S = env_integer("AUTOSCALER_NODE_START_WAIT_S", 900) +AUTOSCALER_NODE_TERMINATE_WAIT_S = env_integer("AUTOSCALER_NODE_TERMINATE_WAIT_S", 900) + +# Interval at which to check if node SSH became available. +AUTOSCALER_NODE_SSH_INTERVAL_S = env_integer("AUTOSCALER_NODE_SSH_INTERVAL_S", 5) + +# Abort autoscaling if more than this number of errors are encountered. This +# is a safety feature to prevent e.g. runaway node launches. +AUTOSCALER_MAX_NUM_FAILURES = env_integer("AUTOSCALER_MAX_NUM_FAILURES", 5) + +# The maximum number of nodes to launch in a single request. +# Multiple requests may be made for this batch size, up to +# the limit of AUTOSCALER_MAX_CONCURRENT_LAUNCHES. +AUTOSCALER_MAX_LAUNCH_BATCH = env_integer("AUTOSCALER_MAX_LAUNCH_BATCH", 5) + +# Max number of nodes to launch at a time. +AUTOSCALER_MAX_CONCURRENT_LAUNCHES = env_integer( + "AUTOSCALER_MAX_CONCURRENT_LAUNCHES", 10 +) + +# Default upscaling speed for the autoscaler. This specifies how many nodes +# to request at a time, where the desired number to upscale is +# min(1, upscaling_speed * current_num_nodes) +# e.g. 1.0 means to request enough nodes to double +# the cluster size in each round of requests. +# When the upscaling speed is 0.0, the autoscaler will request 1 node. +DEFAULT_UPSCALING_SPEED = 0.0 + +# Interval at which to perform autoscaling updates. +AUTOSCALER_UPDATE_INTERVAL_S = env_integer("AUTOSCALER_UPDATE_INTERVAL_S", 5) + +# The autoscaler will attempt to restart Ray on nodes it hasn't heard from +# in more than this interval. +AUTOSCALER_HEARTBEAT_TIMEOUT_S = env_integer("AUTOSCALER_HEARTBEAT_TIMEOUT_S", 30) +# The maximum number of nodes (including failed nodes) that the autoscaler will +# track for logging purposes. +AUTOSCALER_MAX_NODES_TRACKED = 1500 + +AUTOSCALER_MAX_FAILURES_DISPLAYED = 20 + +AUTOSCALER_NODE_AVAILABILITY_MAX_STALENESS_S = env_integer( + "AUTOSCALER_NODE_AVAILABILITY_MAX_STALENESS_S", 30 * 60 +) + +AUTOSCALER_REPORT_PER_NODE_STATUS = ( + env_integer("AUTOSCALER_REPORT_PER_NODE_STATUS", 1) == 1 +) + +# The maximum allowed resource demand vector size to guarantee the resource +# demand scheduler bin packing algorithm takes a reasonable amount of time +# to run. +AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE = env_integer( + "AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE", 1000 +) + +# Port that autoscaler prometheus metrics will be exported to +AUTOSCALER_METRIC_PORT = env_integer("AUTOSCALER_METRIC_PORT", 44217) + +# The minimum number of nodes to launch concurrently. +AUTOSCALER_UPSCALING_INITIAL_NUM_NODES = 5 + +# Max number of retries to AWS (default is 5, time increases exponentially) +BOTO_MAX_RETRIES = env_integer("BOTO_MAX_RETRIES", 12) +# Max number of retries to create an EC2 node (retry different subnet) +BOTO_CREATE_MAX_RETRIES = env_integer("BOTO_CREATE_MAX_RETRIES", 5) + +# ray home path in the container image +RAY_HOME = "/home/ray" + +# The order of this list matters! `scripts.py` kills the ray processes in order of this +# list. Think twice when you add to this list. +# Invariants: +# RAYLET must be the first in the list. +# GCS SERVER must be the last in the list. +RAY_PROCESSES = [ + # The first element is the substring to filter. + # The second element, if True, is to filter ps results by command name + # (only the first 15 charactors of the executable name on Linux); + # if False, is to filter ps results by command with all its arguments. + # See STANDARD FORMAT SPECIFIERS section of + # http://man7.org/linux/man-pages/man1/ps.1.html + # about comm and args. This can help avoid killing non-ray processes. + # Format: + # Keyword to filter, filter by command (True)/filter by args (False) + ["raylet", True], + ["plasma_store", True], + ["monitor.py", False], + ["ray.util.client.server", False], + ["default_worker.py", False], # Python worker. + ["setup_worker.py", False], # Python environment setup worker. + # For mac osx, setproctitle doesn't change the process name returned + # by psutil but only cmdline. + [ + "ray::", + sys.platform != "darwin", + ], # Python worker. TODO(mehrdadn): Fix for Windows + ["io.ray.runtime.runner.worker.DefaultWorker", False], # Java worker. + ["log_monitor.py", False], + [os.path.join("dashboard", "agent.py"), False], + [os.path.join("dashboard", "dashboard.py"), False], + [os.path.join("runtime_env", "agent", "main.py"), False], + ["ray_process_reaper.py", False], + ["gcs_server", True], +] + +# Max Concurrent SSH Calls to stop Docker +MAX_PARALLEL_SHUTDOWN_WORKERS = env_integer("MAX_PARALLEL_SHUTDOWN_WORKERS", 50) + +DISABLE_NODE_UPDATERS_KEY = "disable_node_updaters" +DISABLE_LAUNCH_CONFIG_CHECK_KEY = "disable_launch_config_check" +FOREGROUND_NODE_LAUNCH_KEY = "foreground_node_launch" +WORKER_LIVENESS_CHECK_KEY = "worker_liveness_check" diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/docker.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/docker.py new file mode 100644 index 0000000000000000000000000000000000000000..cf1464d9becb771bf5d3422f7e1e2c8483b7f462 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/docker.py @@ -0,0 +1,130 @@ +from pathlib import Path +from typing import Any, Dict + +from ray.autoscaler._private.cli_logger import cli_logger + +try: # py3 + from shlex import quote +except ImportError: # py2 + from pipes import quote + + +def _check_docker_file_mounts(file_mounts: Dict[str, str]) -> None: + """Checks if files are passed as file_mounts. This is a problem for Docker + based clusters because when a file is bind-mounted in Docker, updates to + the file on the host do not always propagate to the container. Using + directories is recommended. + """ + for remote, local in file_mounts.items(): + if Path(local).is_file(): + cli_logger.warning( + f"File Mount: ({remote}:{local}) refers to a file.\n To ensure" + " this mount updates properly, please use a directory." + ) + + +def validate_docker_config(config: Dict[str, Any]) -> None: + """Checks whether the Docker configuration is valid.""" + if "docker" not in config: + return + + _check_docker_file_mounts(config.get("file_mounts", {})) + + docker_image = config["docker"].get("image") + cname = config["docker"].get("container_name") + + head_docker_image = config["docker"].get("head_image", docker_image) + + worker_docker_image = config["docker"].get("worker_image", docker_image) + + image_present = docker_image or (head_docker_image and worker_docker_image) + if (not cname) and (not image_present): + return + else: + assert cname and image_present, "Must provide a container & image name" + + return None + + +def with_docker_exec( + cmds, container_name, docker_cmd, env_vars=None, with_interactive=False +): + assert docker_cmd, "Must provide docker command" + env_str = "" + if env_vars: + env_str = " ".join(["-e {env}=${env}".format(env=env) for env in env_vars]) + return [ + "{docker_cmd} exec {interactive} {env} {container} /bin/bash -c {cmd} ".format( + docker_cmd=docker_cmd, + interactive="-it" if with_interactive else "", + env=env_str, + container=container_name, + cmd=quote(cmd), + ) + for cmd in cmds + ] + + +def _check_helper(cname, template, docker_cmd): + return " ".join( + [docker_cmd, "inspect", "-f", "'{{" + template + "}}'", cname, "||", "true"] + ) + + +def check_docker_running_cmd(cname, docker_cmd): + return _check_helper(cname, ".State.Running", docker_cmd) + + +def check_bind_mounts_cmd(cname, docker_cmd): + return _check_helper(cname, "json .Mounts", docker_cmd) + + +def check_docker_image(cname, docker_cmd): + return _check_helper(cname, ".Config.Image", docker_cmd) + + +def docker_start_cmds( + user, + image, + mount_dict, + container_name, + user_options, + cluster_name, + home_directory, + docker_cmd, +): + # Imported here due to circular dependency. + from ray.autoscaler.sdk import get_docker_host_mount_location + + docker_mount_prefix = get_docker_host_mount_location(cluster_name) + mount = {f"{docker_mount_prefix}/{dst}": dst for dst in mount_dict} + + mount_flags = " ".join( + [ + "-v {src}:{dest}".format(src=k, dest=v.replace("~/", home_directory + "/")) + for k, v in mount.items() + ] + ) + + # for click, used in ray cli + env_vars = {"LC_ALL": "C.UTF-8", "LANG": "C.UTF-8"} + env_flags = " ".join( + ["-e {name}={val}".format(name=k, val=v) for k, v in env_vars.items()] + ) + + user_options_str = " ".join(user_options) + docker_run = [ + docker_cmd, + "run", + "--rm", + "--name {}".format(container_name), + "-d", + "-it", + mount_flags, + env_flags, + user_options_str, + "--net=host", + image, + "bash", + ] + return " ".join(docker_run) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/event_summarizer.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/event_summarizer.py new file mode 100644 index 0000000000000000000000000000000000000000..2f8d3494d191b7b5908b84ccf3481e273ec4e129 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/event_summarizer.py @@ -0,0 +1,75 @@ +import time +from threading import RLock +from typing import Any, Callable, Dict, List + + +class EventSummarizer: + """Utility that aggregates related log messages to reduce log spam.""" + + def __init__(self): + self.events_by_key: Dict[str, int] = {} + # Messages to send in next summary batch. + self.messages_to_send: List[str] = [] + # Tracks TTL of messages. A message will not be re-sent once it is + # added here, until its TTL expires. + self.throttled_messages: Dict[str, float] = {} + + # Event summarizer is used by the main thread and + # by node launcher child threads. + self.lock = RLock() + + def add( + self, template: str, *, quantity: Any, aggregate: Callable[[Any, Any], Any] + ) -> None: + """Add a log message, which will be combined by template. + + Args: + template: Format string with one placeholder for quantity. + quantity: Quantity to aggregate. + aggregate: Aggregation function used to combine the + quantities. The result is inserted into the template to + produce the final log message. + """ + with self.lock: + # Enforce proper sentence structure. + if not template.endswith("."): + template += "." + if template in self.events_by_key: + self.events_by_key[template] = aggregate( + self.events_by_key[template], quantity + ) + else: + self.events_by_key[template] = quantity + + def add_once_per_interval(self, message: str, key: str, interval_s: int): + """Add a log message, which is throttled once per interval by a key. + + Args: + message: The message to log. + key: The key to use to deduplicate the message. + interval_s: Throttling interval in seconds. + """ + with self.lock: + if key not in self.throttled_messages: + self.throttled_messages[key] = time.time() + interval_s + self.messages_to_send.append(message) + + def summary(self) -> List[str]: + """Generate the aggregated log summary of all added events.""" + with self.lock: + out = [] + for template, quantity in self.events_by_key.items(): + out.append(template.format(quantity)) + out.extend(self.messages_to_send) + return out + + def clear(self) -> None: + """Clear the events added.""" + with self.lock: + self.events_by_key.clear() + self.messages_to_send.clear() + # Expire any messages that have reached their TTL. This allows them + # to be sent again. + for k, t in list(self.throttled_messages.items()): + if time.time() > t: + del self.throttled_messages[k] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/event_system.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/event_system.py new file mode 100644 index 0000000000000000000000000000000000000000..db4bfc1ce101e3558a4996ef7fb94e64aee1fbb9 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/event_system.py @@ -0,0 +1,106 @@ +from enum import Enum, auto +from typing import Any, Callable, Dict, List, Optional, Union + +from ray.autoscaler._private.cli_logger import cli_logger + + +class CreateClusterEvent(Enum): + """Events to track in ray.autoscaler.sdk.create_or_update_cluster. + + Attributes: + up_started : Invoked at the beginning of create_or_update_cluster. + ssh_keypair_downloaded : Invoked when the ssh keypair is downloaded. + cluster_booting_started : Invoked when when the cluster booting starts. + acquiring_new_head_node : Invoked before the head node is acquired. + head_node_acquired : Invoked after the head node is acquired. + ssh_control_acquired : Invoked when the node is being updated. + run_initialization_cmd : Invoked before all initialization + commands are called and again before each initialization command. + run_setup_cmd : Invoked before all setup commands are + called and again before each setup command. + start_ray_runtime : Invoked before ray start commands are run. + start_ray_runtime_completed : Invoked after ray start commands + are run. + cluster_booting_completed : Invoked after cluster booting + is completed. + """ + + up_started = auto() + ssh_keypair_downloaded = auto() + cluster_booting_started = auto() + acquiring_new_head_node = auto() + head_node_acquired = auto() + ssh_control_acquired = auto() + run_initialization_cmd = auto() + run_setup_cmd = auto() + start_ray_runtime = auto() + start_ray_runtime_completed = auto() + cluster_booting_completed = auto() + + +class _EventSystem: + """Event system that handles storing and calling callbacks for events. + + Attributes: + callback_map (Dict[str, List[Callable]]) : Stores list of callbacks + for events when registered. + """ + + def __init__(self): + self.callback_map = {} + + def add_callback_handler( + self, + event: str, + callback: Union[Callable[[Dict], None], List[Callable[[Dict], None]]], + ): + """Stores callback handler for event. + + Args: + event: Event that callback should be called on. See + CreateClusterEvent for details on the events available to be + registered against. + callback (Callable[[Dict], None]): Callable object that is invoked + when specified event occurs. + """ + if event not in CreateClusterEvent.__members__.values(): + cli_logger.warning( + f"{event} is not currently tracked, and this" + " callback will not be invoked." + ) + + self.callback_map.setdefault(event, []).extend( + [callback] if type(callback) is not list else callback + ) + + def execute_callback( + self, event: CreateClusterEvent, event_data: Optional[Dict[str, Any]] = None + ): + """Executes all callbacks for event. + + Args: + event: Event that is invoked. See CreateClusterEvent + for details on the available events. + event_data (Dict[str, Any]): Argument that is passed to each + callable object stored for this particular event. + """ + if event_data is None: + event_data = {} + + event_data["event_name"] = event + if event in self.callback_map: + for callback in self.callback_map[event]: + callback(event_data) + + def clear_callbacks_for_event(self, event: str): + """Clears stored callable objects for event. + + Args: + event: Event that has callable objects stored in map. + See CreateClusterEvent for details on the available events. + """ + if event in self.callback_map: + del self.callback_map[event] + + +global_event_system = _EventSystem() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f704539cdd8a31f9149299cdb3ab5d542aedb3bb Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/command_runner.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/command_runner.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7ec34b55b617b71c3d7059b5e5fa38c910266515 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/command_runner.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/docker_monitor.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/docker_monitor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..58e68f5e239af078d287d4bf93bf93338928a7a8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/docker_monitor.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a73f94837c90f6077df6d5e0958ff8807a9f7c55 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/test_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/test_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a062cfab3c9a7e29746496a5470c9eae52864d2c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/__pycache__/test_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/command_runner.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/command_runner.py new file mode 100644 index 0000000000000000000000000000000000000000..e1444eef7ee1b1196de9c2e6b6a2699b4a60eb9c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/command_runner.py @@ -0,0 +1,91 @@ +import os +import subprocess +from typing import Dict, List, Tuple + +from ray.autoscaler._private.docker import with_docker_exec +from ray.autoscaler.command_runner import CommandRunnerInterface + + +class FakeDockerCommandRunner(CommandRunnerInterface): + """Command runner for the fke docker multinode cluster. + + This command runner uses ``docker exec`` and ``docker cp`` to + run commands and copy files, respectively. + + The regular ``DockerCommandRunner`` is made for use in SSH settings + where Docker runs on a remote hose. In contrast, this command runner + does not wrap the docker commands in ssh calls. + """ + + def __init__(self, docker_config, **common_args): + self.container_name = docker_config["container_name"] + self.docker_config = docker_config + self.home_dir = None + self.initialized = False + # Optionally use 'podman' instead of 'docker' + use_podman = docker_config.get("use_podman", False) + self.docker_cmd = "podman" if use_podman else "docker" + + def _run_shell(self, cmd: str, timeout: int = 120) -> str: + return subprocess.check_output( + cmd, shell=True, timeout=timeout, encoding="utf-8" + ) + + def run( + self, + cmd: str = None, + timeout: int = 120, + exit_on_fail: bool = False, + port_forward: List[Tuple[int, int]] = None, + with_output: bool = False, + environment_variables: Dict[str, object] = None, + run_env: str = "auto", + ssh_options_override_ssh_key: str = "", + shutdown_after_run: bool = False, + ) -> str: + prefix = with_docker_exec( + [cmd], + container_name=self.container_name, + with_interactive=False, + docker_cmd=self.docker_cmd, + )[0] + return self._run_shell(prefix) + + def run_init( + self, *, as_head: bool, file_mounts: Dict[str, str], sync_run_yet: bool + ): + pass + + def remote_shell_command_str(self): + return "{} exec -it {} bash".format(self.docker_cmd, self.container_name) + + def run_rsync_down(self, source, target, options=None): + docker_dir = os.path.dirname(self._docker_expand_user(source)) + + self._run_shell(f"docker cp {self.container_name}:{docker_dir} {target}") + + def run_rsync_up(self, source, target, options=None): + docker_dir = os.path.dirname(self._docker_expand_user(target)) + self.run(cmd=f"mkdir -p {docker_dir}") + + self._run_shell(f"docker cp {source} {self.container_name}:{docker_dir}") + + def _docker_expand_user(self, string, any_char=False): + user_pos = string.find("~") + if user_pos > -1: + if self.home_dir is None: + self.home_dir = self._run_shell( + with_docker_exec( + ["printenv HOME"], + container_name=self.container_name, + docker_cmd=self.docker_cmd, + ) + ).strip() + + if any_char: + return string.replace("~/", self.home_dir + "/") + + elif not any_char and user_pos == 0: + return string.replace("~", self.home_dir, 1) + + return string diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/docker_monitor.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/docker_monitor.py new file mode 100644 index 0000000000000000000000000000000000000000..14c5e4646cf4625677259cf82c218de70c5982f6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/docker_monitor.py @@ -0,0 +1,246 @@ +"""Fake multinode docker monitoring script. + +This script is the "docker compose server" for the fake_multinode +provider using Docker compose. It should be started before running +`RAY_FAKE_CLUSTER=1 ray up `. + +This script reads the volume directory from a supplied fake multinode +docker cluster config file. +It then waits until a docker-compose.yaml file is created in the same +directory, which is done by the `ray up` command. + +It then watches for changes in the docker-compose.yaml file and runs +`docker compose up` whenever changes are detected. This will start docker +containers as requested by the autoscaler. + +Generally, the docker-compose.yaml will be mounted in the head node of the +cluster, which will then continue to change it according to the autoscaler +requirements. + +Additionally, this script monitors the docker container status using +`docker status` and writes it into a `status.json`. This information is +again used by the autoscaler to determine if any nodes have died. +""" +import argparse +import json +import os +import shutil +import subprocess +import time +from typing import Any, Dict, List, Optional + +import yaml + + +def _read_yaml(path: str): + with open(path, "rt") as f: + return yaml.safe_load(f) + + +def _update_docker_compose( + docker_compose_path: str, project_name: str, status: Optional[Dict[str, Any]] +) -> bool: + docker_compose_config = _read_yaml(docker_compose_path) + + if not docker_compose_config: + print("Docker compose currently empty") + return False + + cmd = ["up", "-d"] + if status and len(status) > 0: + cmd += ["--no-recreate"] + + shutdown = False + if not docker_compose_config["services"]: + # If no more nodes, run `down` instead of `up` + print("Shutting down nodes") + cmd = ["down"] + shutdown = True + try: + subprocess.check_call( + ["docker", "compose", "-f", docker_compose_path, "-p", project_name] + + cmd + + [ + "--remove-orphans", + ] + ) + except Exception as e: + print(f"Ran into error when updating docker compose: {e}") + # Ignore error + + return shutdown + + +def _get_ip( + project_name: str, + container_name: str, + override_network: Optional[str] = None, + retry_times: int = 3, +) -> Optional[str]: + network = override_network or f"{project_name}_ray_local" + + cmd = [ + "docker", + "inspect", + "-f", + '"{{ .NetworkSettings.Networks' f".{network}.IPAddress" ' }}"', + f"{container_name}", + ] + for i in range(retry_times): + try: + ip_address = subprocess.check_output(cmd, encoding="utf-8") + except Exception: + time.sleep(1) + else: + return ip_address.strip().strip('"').strip('\\"') + return None + + +def _update_docker_status( + docker_compose_path: str, project_name: str, docker_status_path: str +): + data_str = "" + try: + data_str = ( + subprocess.check_output( + [ + "docker", + "compose", + "-f", + docker_compose_path, + "-p", + project_name, + "ps", + "--format", + "json", + ] + ) + .decode("utf-8") + .strip() + .split("\n") + ) + data: List[Dict[str, str]] = [] + for line in data_str: + line = line.strip() + if line: + data.append(json.loads(line)) + except Exception as e: + print(f"Ran into error when fetching status: {e}") + print(f"docker compose ps output: {data_str}") + return None + + status = {} + for container in data: + node_id = container["Service"] + container_name = container["Name"] + if container["State"] == "running": + ip = _get_ip(project_name, container_name) + else: + ip = "" + container["IP"] = ip + status[node_id] = container + + with open(docker_status_path, "wt") as f: + json.dump(status, f) + + return status + + +def monitor_docker( + docker_compose_path: str, + status_path: str, + project_name: str, + update_interval: float = 1.0, +): + while not os.path.exists(docker_compose_path): + # Wait until cluster is created + time.sleep(0.5) + + print("Docker compose config detected, starting status monitoring") + + # Make sure this is always writeable from inside the containers + os.chmod(docker_compose_path, 0o777) + + docker_config = {"force_update": True} + + # Force update + next_update = time.monotonic() - 1.0 + shutdown = False + status = None + + # Loop: + # If the config changed, update cluster. + # Every `update_interval` seconds, update docker status. + while not shutdown: + new_docker_config = _read_yaml(docker_compose_path) + if new_docker_config != docker_config: + # Update cluster + shutdown = _update_docker_compose(docker_compose_path, project_name, status) + + # Force status update + next_update = time.monotonic() - 1.0 + + if time.monotonic() > next_update: + # Update docker status + status = _update_docker_status( + docker_compose_path, project_name, status_path + ) + next_update = time.monotonic() + update_interval + + docker_config = new_docker_config + time.sleep(0.1) + + print("Cluster shut down, terminating monitoring script.") + + +def start_monitor(config_file: str): + cluster_config = _read_yaml(config_file) + + provider_config = cluster_config["provider"] + assert provider_config["type"] == "fake_multinode_docker", ( + f"The docker monitor only works with providers of type " + f"`fake_multinode_docker`, got `{provider_config['type']}`" + ) + + project_name = provider_config["project_name"] + + volume_dir = provider_config["shared_volume_dir"] + os.makedirs(volume_dir, mode=0o755, exist_ok=True) + + # Create bootstrap config + bootstrap_config_path = os.path.join(volume_dir, "bootstrap_config.yaml") + shutil.copy(config_file, bootstrap_config_path) + + # These two files usually don't exist, yet + docker_compose_config_path = os.path.join(volume_dir, "docker-compose.yaml") + + docker_status_path = os.path.join(volume_dir, "status.json") + + if os.path.exists(docker_compose_config_path): + # We wait until this file exists, so remove it if it exists + # from a previous run. + os.remove(docker_compose_config_path) + + if os.path.exists(docker_status_path): + os.remove(docker_status_path) + # Create empty file so it can be mounted + with open(docker_status_path, "wt") as f: + f.write("{}") + + print( + f"Starting monitor process. Please start Ray cluster with:\n" + f" RAY_FAKE_CLUSTER=1 ray up {config_file}" + ) + monitor_docker(docker_compose_config_path, docker_status_path, project_name) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "config_file", + help="Path to cluster config file containing a fake docker " + "cluster configuration.", + ) + args = parser.parse_args() + + start_monitor(args.config_file) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..270385c37506f2d4244b01863cb79dc5a20192b4 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/node_provider.py @@ -0,0 +1,728 @@ +import copy +import json +import logging +import os +import subprocess +import sys +import time +from threading import RLock +from types import ModuleType +from typing import Any, Dict, Optional + +import yaml + +import ray +import ray._private.ray_constants as ray_constants +from ray._common.network_utils import build_address +from ray.autoscaler._private.fake_multi_node.command_runner import ( + FakeDockerCommandRunner, +) +from ray.autoscaler.command_runner import CommandRunnerInterface +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + NODE_KIND_WORKER, + STATUS_UP_TO_DATE, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, + TAG_RAY_USER_NODE_TYPE, +) + +logger = logging.getLogger(__name__) + +# We generate the node ids deterministically in the fake node provider, so that +# we can associate launched nodes with their resource reports. IDs increment +# starting with fffff*00000 for the head node, fffff*00001, etc. for workers. +FAKE_HEAD_NODE_ID = "fffffffffffffffffffffffffffffffffffffffffffffffffff00000" +FAKE_HEAD_NODE_TYPE = "ray.head.default" + +FAKE_DOCKER_DEFAULT_GCS_PORT = 16379 +FAKE_DOCKER_DEFAULT_OBJECT_MANAGER_PORT = 18076 +FAKE_DOCKER_DEFAULT_CLIENT_PORT = 10002 + +DOCKER_COMPOSE_SKELETON = { + "services": {}, + "networks": {"ray_local": {}}, +} + +DOCKER_NODE_SKELETON = { + "networks": ["ray_local"], + "mem_limit": "3000m", + "mem_reservation": "3000m", + "shm_size": "1200m", + "volumes": [], +} + +DOCKER_HEAD_CMD = ( + 'bash -c "' + "sudo mkdir -p {volume_dir} && " + "sudo chmod 777 {volume_dir} && " + "touch {volume_dir}/.in_docker && " + "sudo chown -R ray:users /cluster/node && " + "sudo chmod -R 777 /cluster/node && " + "sudo chown -R ray:users /cluster/shared && " + "sudo chmod -R 777 /cluster/shared && " + "sudo chmod 700 ~/.ssh && " + "sudo chmod 600 ~/.ssh/authorized_keys && " + "sudo chmod 600 ~/ray_bootstrap_key.pem && " + "sudo chown ray:users " + "~/.ssh ~/.ssh/authorized_keys ~/ray_bootstrap_key.pem && " + "{ensure_ssh} && " + "sleep 1 && " + "RAY_FAKE_CLUSTER=1 ray start --head " + "--autoscaling-config=~/ray_bootstrap_config.yaml " + "--object-manager-port=8076 " + "--num-cpus {num_cpus} " + "--num-gpus {num_gpus} " + # "--resources='{resources}' " + '--block"' +) + +DOCKER_WORKER_CMD = ( + 'bash -c "' + "sudo mkdir -p {volume_dir} && " + "sudo chmod 777 {volume_dir} && " + "touch {volume_dir}/.in_docker && " + "sudo chown -R ray:users /cluster/node && " + "sudo chmod -R 777 /cluster/node && " + "sudo chmod 700 ~/.ssh && " + "sudo chmod 600 ~/.ssh/authorized_keys && " + "sudo chown ray:users ~/.ssh ~/.ssh/authorized_keys && " + "{ensure_ssh} && " + "sleep 1 && " + f"ray start --address={FAKE_HEAD_NODE_ID}:6379 " + "--object-manager-port=8076 " + "--num-cpus {num_cpus} " + "--num-gpus {num_gpus} " + # "--resources='{resources}' " + '--block"' +) + + +def host_dir(container_dir: str): + """Replace local dir with potentially different host dir. + + E.g. in docker-in-docker environments, the host dir might be + different to the mounted directory in the container. + + This method will do a simple global replace to adjust the paths. + """ + ray_tempdir = os.environ.get("RAY_TEMPDIR", None) + ray_hostdir = os.environ.get("RAY_HOSTDIR", None) + + if not ray_tempdir or not ray_hostdir: + return container_dir + + return container_dir.replace(ray_tempdir, ray_hostdir) + + +def create_node_spec( + head: bool, + docker_image: str, + mounted_cluster_dir: str, + mounted_node_dir: str, + num_cpus: int = 2, + num_gpus: int = 0, + resources: Optional[Dict] = None, + env_vars: Optional[Dict] = None, + host_gcs_port: int = 16379, + host_object_manager_port: int = 18076, + host_client_port: int = 10002, + volume_dir: Optional[str] = None, + node_state_path: Optional[str] = None, + docker_status_path: Optional[str] = None, + docker_compose_path: Optional[str] = None, + bootstrap_config_path: Optional[str] = None, + private_key_path: Optional[str] = None, + public_key_path: Optional[str] = None, +): + node_spec = copy.deepcopy(DOCKER_NODE_SKELETON) + node_spec["image"] = docker_image + + bootstrap_cfg_path_on_container = "/home/ray/ray_bootstrap_config.yaml" + bootstrap_key_path_on_container = "/home/ray/ray_bootstrap_key.pem" + + resources = resources or {} + + ensure_ssh = ( + ( + "((sudo apt update && sudo apt install -y openssh-server && " + "sudo service ssh start) || true)" + ) + if not bool(int(os.environ.get("RAY_HAS_SSH", "0") or "0")) + else "sudo service ssh start" + ) + + cmd_kwargs = dict( + ensure_ssh=ensure_ssh, + num_cpus=num_cpus, + num_gpus=num_gpus, + resources=json.dumps(resources, indent=None), + volume_dir=volume_dir, + autoscaling_config=bootstrap_cfg_path_on_container, + ) + + env_vars = env_vars or {} + + # Set to "auto" to mount current autoscaler directory to nodes for dev + fake_cluster_dev_dir = os.environ.get("FAKE_CLUSTER_DEV", "") + if fake_cluster_dev_dir: + if fake_cluster_dev_dir == "auto": + local_ray_dir = os.path.dirname(ray.__file__) + else: + local_ray_dir = fake_cluster_dev_dir + os.environ["FAKE_CLUSTER_DEV"] = local_ray_dir + + mj = sys.version_info.major + mi = sys.version_info.minor + + fake_modules_str = os.environ.get("FAKE_CLUSTER_DEV_MODULES", "autoscaler") + fake_modules = fake_modules_str.split(",") + + docker_ray_dir = f"/home/ray/anaconda3/lib/python{mj}.{mi}/site-packages/ray" + + node_spec["volumes"] += [ + f"{local_ray_dir}/{module}:{docker_ray_dir}/{module}:ro" + for module in fake_modules + ] + env_vars["FAKE_CLUSTER_DEV"] = local_ray_dir + env_vars["FAKE_CLUSTER_DEV_MODULES"] = fake_modules_str + os.environ["FAKE_CLUSTER_DEV_MODULES"] = fake_modules_str + + if head: + node_spec["command"] = DOCKER_HEAD_CMD.format(**cmd_kwargs) + # Expose ports so we can connect to the cluster from outside + node_spec["ports"] = [ + f"{host_gcs_port}:{ray_constants.DEFAULT_PORT}", + f"{host_object_manager_port}:8076", + f"{host_client_port}:10001", + ] + # Mount status and config files for the head node + node_spec["volumes"] += [ + f"{host_dir(node_state_path)}:{node_state_path}", + f"{host_dir(docker_status_path)}:{docker_status_path}", + f"{host_dir(docker_compose_path)}:{docker_compose_path}", + f"{host_dir(bootstrap_config_path)}:" f"{bootstrap_cfg_path_on_container}", + f"{host_dir(private_key_path)}:{bootstrap_key_path_on_container}", + ] + + # Create file if it does not exist on local filesystem + for filename in [node_state_path, docker_status_path, bootstrap_config_path]: + if not os.path.exists(filename): + with open(filename, "wt") as f: + f.write("{}") + else: + node_spec["command"] = DOCKER_WORKER_CMD.format(**cmd_kwargs) + node_spec["depends_on"] = [FAKE_HEAD_NODE_ID] + + # Mount shared directories and ssh access keys + node_spec["volumes"] += [ + f"{host_dir(mounted_cluster_dir)}:/cluster/shared", + f"{host_dir(mounted_node_dir)}:/cluster/node", + f"{host_dir(public_key_path)}:/home/ray/.ssh/authorized_keys", + ] + + # Pass these environment variables (to the head node) + # These variables are propagated by the `docker compose` command. + env_vars.setdefault("RAY_HAS_SSH", os.environ.get("RAY_HAS_SSH", "")) + env_vars.setdefault("RAY_TEMPDIR", os.environ.get("RAY_TEMPDIR", "")) + env_vars.setdefault("RAY_HOSTDIR", os.environ.get("RAY_HOSTDIR", "")) + + node_spec["environment"] = [f"{k}={v}" for k, v in env_vars.items()] + + return node_spec + + +class FakeMultiNodeProvider(NodeProvider): + """A node provider that implements multi-node on a single machine. + + This is used for laptop mode testing of autoscaling functionality.""" + + def __init__( + self, + provider_config, + cluster_name, + ): + """ + Args: + provider_config: Configuration for the provider. + cluster_name: Name of the cluster. + """ + + NodeProvider.__init__(self, provider_config, cluster_name) + self.lock = RLock() + if "RAY_FAKE_CLUSTER" not in os.environ: + raise RuntimeError( + "FakeMultiNodeProvider requires ray to be started with " + "RAY_FAKE_CLUSTER=1 ray start ..." + ) + # GCS address to use for the cluster + self._gcs_address = provider_config.get("gcs_address", None) + # Head node id + self._head_node_id = provider_config.get("head_node_id", FAKE_HEAD_NODE_ID) + # Whether to launch multiple nodes at once, or one by one regardless of + # the count (default) + self._launch_multiple = provider_config.get("launch_multiple", False) + + # These are injected errors for testing purposes. If not None, + # these will be raised on `create_node_with_resources_and_labels`` and + # `terminate_node``, respectively. + self._creation_error = None + self._termination_errors = None + + self._nodes = { + self._head_node_id: { + "tags": { + TAG_RAY_NODE_KIND: NODE_KIND_HEAD, + TAG_RAY_USER_NODE_TYPE: FAKE_HEAD_NODE_TYPE, + TAG_RAY_NODE_NAME: self._head_node_id, + TAG_RAY_NODE_STATUS: STATUS_UP_TO_DATE, + } + }, + } + self._next_node_id = 0 + + def _next_hex_node_id(self): + self._next_node_id += 1 + base = "fffffffffffffffffffffffffffffffffffffffffffffffffff" + return base + str(self._next_node_id).zfill(5) + + def non_terminated_nodes(self, tag_filters): + with self.lock: + nodes = [] + for node_id in self._nodes: + tags = self.node_tags(node_id) + ok = True + for k, v in tag_filters.items(): + if tags.get(k) != v: + ok = False + if ok: + nodes.append(node_id) + + return nodes + + def is_running(self, node_id): + with self.lock: + return node_id in self._nodes + + def is_terminated(self, node_id): + with self.lock: + return node_id not in self._nodes + + def node_tags(self, node_id): + with self.lock: + return self._nodes[node_id]["tags"] + + def _get_ip(self, node_id: str) -> Optional[str]: + return node_id + + def external_ip(self, node_id): + return self._get_ip(node_id) + + def internal_ip(self, node_id): + return self._get_ip(node_id) + + def set_node_tags(self, node_id, tags): + raise AssertionError("Readonly node provider cannot be updated") + + def create_node_with_resources_and_labels( + self, node_config, tags, count, resources, labels + ): + if self._creation_error: + raise self._creation_error + + if self._launch_multiple: + for _ in range(count): + self._create_node_with_resources_and_labels( + node_config, tags, count, resources, labels + ) + else: + self._create_node_with_resources_and_labels( + node_config, tags, count, resources, labels + ) + + def _create_node_with_resources_and_labels( + self, node_config, tags, count, resources, labels + ): + # This function calls `pop`. To avoid side effects, we make a + # copy of `resources`. + resources = copy.deepcopy(resources) + with self.lock: + node_type = tags[TAG_RAY_USER_NODE_TYPE] + next_id = self._next_hex_node_id() + ray_params = ray._private.parameter.RayParams( + min_worker_port=0, + max_worker_port=0, + dashboard_port=None, + num_cpus=resources.pop("CPU", 0), + num_gpus=resources.pop("GPU", 0), + object_store_memory=resources.pop("object_store_memory", None), + resources=resources, + labels=labels, + redis_address=build_address( + ray._private.services.get_node_ip_address(), 6379 + ) + if not self._gcs_address + else self._gcs_address, + gcs_address=build_address( + ray._private.services.get_node_ip_address(), 6379 + ) + if not self._gcs_address + else self._gcs_address, + env_vars={ + "RAY_OVERRIDE_NODE_ID_FOR_TESTING": next_id, + "RAY_CLOUD_INSTANCE_ID": next_id, + "RAY_NODE_TYPE_NAME": node_type, + ray_constants.RESOURCES_ENVIRONMENT_VARIABLE: json.dumps(resources), + ray_constants.LABELS_ENVIRONMENT_VARIABLE: json.dumps(labels), + }, + ) + node = ray._private.node.Node( + ray_params, head=False, shutdown_at_exit=False, spawn_reaper=False + ) + all_tags = { + TAG_RAY_NODE_KIND: NODE_KIND_WORKER, + TAG_RAY_USER_NODE_TYPE: node_type, + TAG_RAY_NODE_NAME: next_id, + TAG_RAY_NODE_STATUS: STATUS_UP_TO_DATE, + } + all_tags.update(tags) + self._nodes[next_id] = { + "tags": all_tags, + "node": node, + } + + def terminate_node(self, node_id): + with self.lock: + if self._termination_errors: + raise self._termination_errors + + try: + node = self._nodes.pop(node_id) + except Exception as e: + raise e + + self._terminate_node(node) + + def _terminate_node(self, node): + node["node"].kill_all_processes(check_alive=False, allow_graceful=True) + + @staticmethod + def bootstrap_config(cluster_config): + return cluster_config + + ############################ + # Test only methods + ############################ + def _test_set_creation_error(self, e: Exception): + """Set an error that will be raised on + create_node_with_resources_and_labels.""" + self._creation_error = e + + def _test_add_termination_errors(self, e: Exception): + """Set an error that will be raised on terminate_node.""" + self._termination_errors = e + + +class FakeMultiNodeDockerProvider(FakeMultiNodeProvider): + """A node provider that implements multi-node on a single machine. + + This is used for laptop mode testing of multi node functionality + where each node has their own FS and IP.""" + + def __init__(self, provider_config, cluster_name): + super(FakeMultiNodeDockerProvider, self).__init__(provider_config, cluster_name) + + fake_head = copy.deepcopy(self._nodes) + + self._project_name = self.provider_config["project_name"] + self._docker_image = self.provider_config["image"] + + self._host_gcs_port = self.provider_config.get( + "host_gcs_port", FAKE_DOCKER_DEFAULT_GCS_PORT + ) + self._host_object_manager_port = self.provider_config.get( + "host_object_manager_port", FAKE_DOCKER_DEFAULT_OBJECT_MANAGER_PORT + ) + self._host_client_port = self.provider_config.get( + "host_client_port", FAKE_DOCKER_DEFAULT_CLIENT_PORT + ) + + self._head_resources = self.provider_config["head_resources"] + + # subdirs: + # - ./shared (shared filesystem) + # - ./nodes/ (node-specific mounted filesystem) + self._volume_dir = self.provider_config["shared_volume_dir"] + self._mounted_cluster_dir = os.path.join(self._volume_dir, "shared") + + if not self.in_docker_container: + # Only needed on host + os.makedirs(self._mounted_cluster_dir, mode=0o755, exist_ok=True) + + self._boostrap_config_path = os.path.join( + self._volume_dir, "bootstrap_config.yaml" + ) + + self._private_key_path = os.path.join(self._volume_dir, "bootstrap_key.pem") + self._public_key_path = os.path.join(self._volume_dir, "bootstrap_key.pem.pub") + + if not self.in_docker_container: + # Create private key + if not os.path.exists(self._private_key_path): + subprocess.check_call( + f'ssh-keygen -b 2048 -t rsa -q -N "" ' + f"-f {self._private_key_path}", + shell=True, + ) + + # Create public key + if not os.path.exists(self._public_key_path): + subprocess.check_call( + f"ssh-keygen -y " + f"-f {self._private_key_path} " + f"> {self._public_key_path}", + shell=True, + ) + + self._docker_compose_config_path = os.path.join( + self._volume_dir, "docker-compose.yaml" + ) + self._docker_compose_config = None + + self._node_state_path = os.path.join(self._volume_dir, "nodes.json") + self._docker_status_path = os.path.join(self._volume_dir, "status.json") + + self._load_node_state() + if FAKE_HEAD_NODE_ID not in self._nodes: + # Reset + self._nodes = copy.deepcopy(fake_head) + + self._nodes[FAKE_HEAD_NODE_ID][ + "node_spec" + ] = self._create_node_spec_with_resources( + head=True, node_id=FAKE_HEAD_NODE_ID, resources=self._head_resources + ) + self._possibly_terminated_nodes = dict() + + self._cleanup_interval = provider_config.get("cleanup_interval", 9.5) + + self._docker_status = {} + + self._update_docker_compose_config() + self._update_docker_status() + self._save_node_state() + + @property + def in_docker_container(self): + return os.path.exists(os.path.join(self._volume_dir, ".in_docker")) + + def _create_node_spec_with_resources( + self, head: bool, node_id: str, resources: Dict[str, Any] + ): + resources = resources.copy() + + # Create shared directory + node_dir = os.path.join(self._volume_dir, "nodes", node_id) + os.makedirs(node_dir, mode=0o777, exist_ok=True) + + resource_str = json.dumps(resources, indent=None) + + return create_node_spec( + head=head, + docker_image=self._docker_image, + mounted_cluster_dir=self._mounted_cluster_dir, + mounted_node_dir=node_dir, + num_cpus=resources.pop("CPU", 0), + num_gpus=resources.pop("GPU", 0), + host_gcs_port=self._host_gcs_port, + host_object_manager_port=self._host_object_manager_port, + host_client_port=self._host_client_port, + resources=resources, + env_vars={ + "RAY_OVERRIDE_NODE_ID_FOR_TESTING": node_id, + ray_constants.RESOURCES_ENVIRONMENT_VARIABLE: resource_str, + **self.provider_config.get("env_vars", {}), + }, + volume_dir=self._volume_dir, + node_state_path=self._node_state_path, + docker_status_path=self._docker_status_path, + docker_compose_path=self._docker_compose_config_path, + bootstrap_config_path=self._boostrap_config_path, + public_key_path=self._public_key_path, + private_key_path=self._private_key_path, + ) + + def _load_node_state(self) -> bool: + if not os.path.exists(self._node_state_path): + return False + try: + with open(self._node_state_path, "rt") as f: + nodes = json.load(f) + except Exception: + return False + if not nodes: + return False + self._nodes = nodes + return True + + def _save_node_state(self): + with open(self._node_state_path, "wt") as f: + json.dump(self._nodes, f) + + # Make sure this is always writeable from inside the containers + if not self.in_docker_container: + # Only chmod from the outer container + os.chmod(self._node_state_path, 0o777) + + def _update_docker_compose_config(self): + config = copy.deepcopy(DOCKER_COMPOSE_SKELETON) + config["services"] = {} + for node_id, node in self._nodes.items(): + config["services"][node_id] = node["node_spec"] + + with open(self._docker_compose_config_path, "wt") as f: + yaml.safe_dump(config, f) + + def _update_docker_status(self): + if not os.path.exists(self._docker_status_path): + return + with open(self._docker_status_path, "rt") as f: + self._docker_status = json.load(f) + + def _update_nodes(self): + for node_id in list(self._nodes): + if not self._is_docker_running(node_id): + self._possibly_terminated_nodes.setdefault(node_id, time.monotonic()) + else: + self._possibly_terminated_nodes.pop(node_id, None) + self._cleanup_nodes() + + def _cleanup_nodes(self): + for node_id, timestamp in list(self._possibly_terminated_nodes.items()): + if time.monotonic() > timestamp + self._cleanup_interval: + if not self._is_docker_running(node_id): + self._nodes.pop(node_id, None) + self._possibly_terminated_nodes.pop(node_id, None) + self._save_node_state() + + def _container_name(self, node_id): + node_status = self._docker_status.get(node_id, {}) + timeout = time.monotonic() + 60 + while not node_status: + if time.monotonic() > timeout: + raise RuntimeError(f"Container for {node_id} never became available.") + time.sleep(1) + self._update_docker_status() + node_status = self._docker_status.get(node_id, {}) + + return node_status["Name"] + + def _is_docker_running(self, node_id): + self._update_docker_status() + + return self._docker_status.get(node_id, {}).get("State", None) == "running" + + def non_terminated_nodes(self, tag_filters): + self._update_nodes() + return super(FakeMultiNodeDockerProvider, self).non_terminated_nodes( + tag_filters + ) + + def is_running(self, node_id): + with self.lock: + self._update_nodes() + + return node_id in self._nodes and self._is_docker_running(node_id) + + def is_terminated(self, node_id): + with self.lock: + self._update_nodes() + + return node_id not in self._nodes and not self._is_docker_running(node_id) + + def get_command_runner( + self, + log_prefix: str, + node_id: str, + auth_config: Dict[str, Any], + cluster_name: str, + process_runner: ModuleType, + use_internal_ip: bool, + docker_config: Optional[Dict[str, Any]] = None, + ) -> CommandRunnerInterface: + if self.in_docker_container: + return super(FakeMultiNodeProvider, self).get_command_runner( + log_prefix, + node_id, + auth_config, + cluster_name, + process_runner, + use_internal_ip, + ) + + # Else, host command runner: + common_args = { + "log_prefix": log_prefix, + "node_id": node_id, + "provider": self, + "auth_config": auth_config, + "cluster_name": cluster_name, + "process_runner": process_runner, + "use_internal_ip": use_internal_ip, + } + + docker_config["container_name"] = self._container_name(node_id) + docker_config["image"] = self._docker_image + + return FakeDockerCommandRunner(docker_config, **common_args) + + def _get_ip(self, node_id: str) -> Optional[str]: + for i in range(3): + self._update_docker_status() + ip = self._docker_status.get(node_id, {}).get("IP", None) + if ip: + return ip + time.sleep(3) + return None + + def set_node_tags(self, node_id, tags): + assert node_id in self._nodes + self._nodes[node_id]["tags"].update(tags) + + def create_node_with_resources_and_labels( + self, node_config, tags, count, resources, labels + ): + with self.lock: + is_head = tags[TAG_RAY_NODE_KIND] == NODE_KIND_HEAD + + if is_head: + next_id = FAKE_HEAD_NODE_ID + else: + next_id = self._next_hex_node_id() + + self._nodes[next_id] = { + "tags": tags, + "node_spec": self._create_node_spec_with_resources( + head=is_head, node_id=next_id, resources=resources + ), + } + self._update_docker_compose_config() + self._save_node_state() + + def create_node( + self, node_config: Dict[str, Any], tags: Dict[str, str], count: int + ) -> Optional[Dict[str, Any]]: + resources = self._head_resources + return self.create_node_with_resources_and_labels( + node_config, tags, count, resources, {} + ) + + def _terminate_node(self, node): + self._update_docker_compose_config() + self._save_node_state() + + @staticmethod + def bootstrap_config(cluster_config): + return cluster_config diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/test_utils.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/test_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..d541ed5f408a1f0e0665856b4e60d2f20c50d6e3 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/fake_multi_node/test_utils.py @@ -0,0 +1,399 @@ +import json +import logging +import os +import random +import shutil +import subprocess +import sys +import tempfile +import threading +import time +from typing import Any, Dict, Optional + +import yaml + +import ray +from ray._common.network_utils import build_address +from ray._private.dict import deep_update +from ray.autoscaler._private.fake_multi_node.node_provider import ( + FAKE_DOCKER_DEFAULT_CLIENT_PORT, + FAKE_DOCKER_DEFAULT_GCS_PORT, +) +from ray.util.queue import Empty, Queue + +logger = logging.getLogger(__name__) + +DEFAULT_DOCKER_IMAGE = "rayproject/ray:nightly-py{major}{minor}-cpu" + + +class ResourcesNotReadyError(RuntimeError): + pass + + +class DockerCluster: + """Docker cluster wrapper. + + Creates a directory for starting a fake multinode docker cluster. + + Includes APIs to update the cluster config as needed in tests, + and to start and connect to the cluster. + """ + + def __init__(self, config: Optional[Dict[str, Any]] = None): + self._base_config_file = os.path.join( + os.path.dirname(__file__), "example_docker.yaml" + ) + self._tempdir = None + self._config_file = None + self._nodes_file = None + self._nodes = {} + self._status_file = None + self._status = {} + self._partial_config = config + self._cluster_config = None + self._docker_image = None + + self._monitor_script = os.path.join( + os.path.dirname(__file__), "docker_monitor.py" + ) + self._monitor_process = None + + self._execution_thread = None + self._execution_event = threading.Event() + self._execution_queue = None + + @property + def config_file(self): + return self._config_file + + @property + def cluster_config(self): + return self._cluster_config + + @property + def cluster_dir(self): + return self._tempdir + + @property + def gcs_port(self): + return self._cluster_config.get("provider", {}).get( + "host_gcs_port", FAKE_DOCKER_DEFAULT_GCS_PORT + ) + + @property + def client_port(self): + return self._cluster_config.get("provider", {}).get( + "host_client_port", FAKE_DOCKER_DEFAULT_CLIENT_PORT + ) + + def connect(self, client: bool = True, timeout: int = 120, **init_kwargs): + """Connect to the docker-compose Ray cluster. + + Assumes the cluster is at RAY_TESTHOST (defaults to + ``127.0.0.1``). + + Args: + client: If True, uses Ray client to connect to the + cluster. If False, uses GCS to connect to the cluster. + timeout: Connection timeout in seconds. + **init_kwargs: kwargs to pass to ``ray.init()``. + + """ + host = os.environ.get("RAY_TESTHOST", "127.0.0.1") + + if client: + port = self.client_port + address = f"ray://{build_address(host, port)}" + else: + port = self.gcs_port + address = build_address(host, port) + + timeout_at = time.monotonic() + timeout + while time.monotonic() < timeout_at: + try: + ray.init(address, **init_kwargs) + self.wait_for_resources({"CPU": 1}) + except ResourcesNotReadyError: + time.sleep(1) + continue + else: + break + + try: + ray.cluster_resources() + except Exception as e: + raise RuntimeError(f"Timed out connecting to Ray: {e}") + + def remote_execution_api(self) -> "RemoteAPI": + """Create an object to control cluster state from within the cluster.""" + self._execution_queue = Queue(actor_options={"num_cpus": 0}) + stop_event = self._execution_event + + def entrypoint(): + while not stop_event.is_set(): + try: + cmd, kwargs = self._execution_queue.get(timeout=1) + except Empty: + continue + + if cmd == "kill_node": + self.kill_node(**kwargs) + + self._execution_thread = threading.Thread(target=entrypoint) + self._execution_thread.start() + + return RemoteAPI(self._execution_queue) + + @staticmethod + def wait_for_resources(resources: Dict[str, float], timeout: int = 60): + """Wait until Ray cluster resources are available + + Args: + resources: Minimum resources needed before + this function returns. + timeout: Timeout in seconds. + + """ + timeout = time.monotonic() + timeout + + available = ray.cluster_resources() + while any(available.get(k, 0.0) < v for k, v in resources.items()): + if time.monotonic() > timeout: + raise ResourcesNotReadyError( + f"Timed out waiting for resources: {resources}" + ) + time.sleep(1) + available = ray.cluster_resources() + + def update_config(self, config: Optional[Dict[str, Any]] = None): + """Update autoscaling config. + + Does a deep update of the base config with a new configuration. + This can change autoscaling behavior. + + Args: + config: Partial config to update current + config with. + + """ + assert self._tempdir, "Call setup() first" + + config = config or {} + + if config: + self._partial_config = config + + if not config.get("provider", {}).get("image"): + # No image specified, trying to parse from buildkite + docker_image = os.environ.get("RAY_DOCKER_IMAGE", None) + + if not docker_image: + # If still no docker image, use one according to Python version + mj = sys.version_info.major + mi = sys.version_info.minor + + docker_image = DEFAULT_DOCKER_IMAGE.format(major=mj, minor=mi) + + self._docker_image = docker_image + + with open(self._base_config_file, "rt") as f: + cluster_config = yaml.safe_load(f) + + if self._partial_config: + deep_update(cluster_config, self._partial_config, new_keys_allowed=True) + + if self._docker_image: + cluster_config["provider"]["image"] = self._docker_image + + cluster_config["provider"]["shared_volume_dir"] = self._tempdir + + self._cluster_config = cluster_config + + with open(self._config_file, "wt") as f: + yaml.safe_dump(self._cluster_config, f) + + logging.info(f"Updated cluster config to: {self._cluster_config}") + + def maybe_pull_image(self): + if self._docker_image: + try: + images_str = subprocess.check_output( + f"docker image inspect {self._docker_image}", shell=True + ) + images = json.loads(images_str) + except Exception as e: + logger.error(f"Error inspecting image {self._docker_image}: {e}") + return + + if not images: + try: + subprocess.check_call( + f"docker pull {self._docker_image}", shell=True + ) + except Exception as e: + logger.error(f"Error pulling image {self._docker_image}: {e}") + + def setup(self): + """Setup docker compose cluster environment. + + Creates the temporary directory, writes the initial config file, + and pulls the docker image, if required. + """ + self._tempdir = tempfile.mkdtemp(dir=os.environ.get("RAY_TEMPDIR", None)) + os.chmod(self._tempdir, 0o777) + self._config_file = os.path.join(self._tempdir, "cluster.yaml") + self._nodes_file = os.path.join(self._tempdir, "nodes.json") + self._status_file = os.path.join(self._tempdir, "status.json") + self.update_config() + self.maybe_pull_image() + + def teardown(self, keep_dir: bool = False): + """Tear down docker compose cluster environment. + + Args: + keep_dir: If True, cluster directory + will not be removed after termination. + """ + if not keep_dir: + shutil.rmtree(self._tempdir) + self._tempdir = None + self._config_file = None + + def _start_monitor(self): + self._monitor_process = subprocess.Popen( + [sys.executable, self._monitor_script, self.config_file] + ) + time.sleep(2) + + def _stop_monitor(self): + if self._monitor_process: + self._monitor_process.wait(timeout=30) + if self._monitor_process.poll() is None: + self._monitor_process.terminate() + self._monitor_process = None + + def start(self): + """Start docker compose cluster. + + Starts the monitor process and runs ``ray up``. + """ + self._start_monitor() + + subprocess.check_call( + f"RAY_FAKE_CLUSTER=1 ray up -y {self.config_file}", shell=True + ) + + def stop(self): + """Stop docker compose cluster. + + Runs ``ray down`` and stops the monitor process. + """ + if ray.is_initialized: + ray.shutdown() + + subprocess.check_call( + f"RAY_FAKE_CLUSTER=1 ray down -y {self.config_file}", shell=True + ) + + self._stop_monitor() + self._execution_event.set() + + def _update_nodes(self): + with open(self._nodes_file, "rt") as f: + self._nodes = json.load(f) + + def _update_status(self): + with open(self._status_file, "rt") as f: + self._status = json.load(f) + + def _get_node( + self, + node_id: Optional[str] = None, + num: Optional[int] = None, + rand: Optional[str] = None, + ) -> str: + self._update_nodes() + if node_id: + assert ( + not num and not rand + ), "Only provide either `node_id`, `num`, or `random`." + elif num: + assert ( + not node_id and not rand + ), "Only provide either `node_id`, `num`, or `random`." + base = "fffffffffffffffffffffffffffffffffffffffffffffffffff" + node_id = base + str(num).zfill(5) + elif rand: + assert ( + not node_id and not num + ), "Only provide either `node_id`, `num`, or `random`." + assert rand in [ + "worker", + "any", + ], "`random` must be one of ['worker', 'any']" + choices = list(self._nodes.keys()) + if rand == "worker": + choices.remove( + "fffffffffffffffffffffffffffffffffffffffffffffffffff00000" + ) + # Else: any + node_id = random.choice(choices) + + assert node_id in self._nodes, f"Node with ID {node_id} is not in active nodes." + return node_id + + def _get_docker_container(self, node_id: str) -> Optional[str]: + self._update_status() + node_status = self._status.get(node_id) + if not node_status: + return None + + return node_status["Name"] + + def kill_node( + self, + node_id: Optional[str] = None, + num: Optional[int] = None, + rand: Optional[str] = None, + ): + """Kill node. + + If ``node_id`` is given, kill that node. + + If ``num`` is given, construct node_id from this number, and kill + that node. + + If ``rand`` is given (as either ``worker`` or ``any``), kill a random + node. + """ + node_id = self._get_node(node_id=node_id, num=num, rand=rand) + container = self._get_docker_container(node_id=node_id) + subprocess.check_call(f"docker kill {container}", shell=True) + + +class RemoteAPI: + """Remote API to control cluster state from within cluster tasks. + + This API uses a Ray queue to interact with an execution thread on the + host machine that will execute commands passed to the queue. + + Instances of this class can be serialized and passed to Ray remote actors + to interact with cluster state (but they can also be used outside actors). + + The API subset is limited to specific commands. + + Args: + queue: Ray queue to push command instructions to. + + """ + + def __init__(self, queue: Queue): + self._queue = queue + + def kill_node( + self, + node_id: Optional[str] = None, + num: Optional[int] = None, + rand: Optional[str] = None, + ): + self._queue.put(("kill_node", dict(node_id=node_id, num=num, rand=rand))) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5965270e8b2c62bf1e8844fba4c34420a23ca653 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/config.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..881707962acf44d54b5425e9a43bcec51d0c43d1 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/config.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/node.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/node.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c11e1f517ae79dd0eeff6a385b97f7c05103a7f7 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/node.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..733bb47797d80a875c21af98f37de30f5171c6b8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/tpu_command_runner.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/tpu_command_runner.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55fa88f8dbf9273d431a576d6e7ed4d6444fc329 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/__pycache__/tpu_command_runner.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/config.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/config.py new file mode 100644 index 0000000000000000000000000000000000000000..b48a7e984762c8ca616541e4fa1814fa4ea4948d --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/config.py @@ -0,0 +1,857 @@ +import copy +import json +import logging +import os +import re +import time +from functools import partial, reduce + +import google_auth_httplib2 +import googleapiclient +import httplib2 +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives import serialization +from cryptography.hazmat.primitives.asymmetric import rsa +from google.oauth2 import service_account +from google.oauth2.credentials import Credentials as OAuthCredentials +from googleapiclient import discovery, errors + +from ray._private.accelerators import TPUAcceleratorManager +from ray._private.accelerators import tpu +from ray.autoscaler._private.gcp.node import MAX_POLLS, POLL_INTERVAL, GCPNodeType +from ray.autoscaler._private.util import check_legacy_fields + +logger = logging.getLogger(__name__) + +VERSION = "v1" +TPU_VERSION = "v2alpha" # change once v2 is stable + +RAY = "ray-autoscaler" +DEFAULT_SERVICE_ACCOUNT_ID = RAY + "-sa-" + VERSION +SERVICE_ACCOUNT_EMAIL_TEMPLATE = "{account_id}@{project_id}.iam.gserviceaccount.com" +DEFAULT_SERVICE_ACCOUNT_CONFIG = { + "displayName": "Ray Autoscaler Service Account ({})".format(VERSION), +} + +# Those roles will be always added. +# NOTE: `serviceAccountUser` allows the head node to create workers with +# a serviceAccount. `roleViewer` allows the head node to run bootstrap_gcp. +DEFAULT_SERVICE_ACCOUNT_ROLES = [ + "roles/storage.objectAdmin", + "roles/compute.admin", + "roles/iam.serviceAccountUser", + "roles/iam.roleViewer", +] +# Those roles will only be added if there are TPU nodes defined in config. +TPU_SERVICE_ACCOUNT_ROLES = ["roles/tpu.admin"] + +# If there are TPU nodes in config, this field will be set +# to True in config["provider"]. +HAS_TPU_PROVIDER_FIELD = "_has_tpus" + +# NOTE: iam.serviceAccountUser allows the Head Node to create worker nodes +# with ServiceAccounts. + + +def tpu_accelerator_config_to_type(accelerator_config: dict) -> str: + """Convert a provided accelerator_config to accelerator_type. + + Args: + accelerator_config: A dictionary defining the spec of a + TPU accelerator. The dictionary should consist of + the keys 'type', indicating the TPU chip type, and + 'topology', indicating the topology of the TPU. + + Returns: + A string, accelerator_type, e.g. "v4-8". + + """ + generation = accelerator_config["type"].lower() + topology = accelerator_config["topology"] + # Reduce e.g. "2x2x2" to 8 + chip_dimensions = [int(chip_count) for chip_count in topology.split("x")] + num_chips = reduce(lambda x, y: x * y, chip_dimensions) + + # V5LitePod is rendered as "V5LITE_POD" in accelerator configuration but + # accelerator type uses a format like "v5litepod-{cores}", so we need + # to manually convert the string here. + if generation == "v5lite_pod": + generation = "v5litepod" + + num_cores = tpu.get_tpu_cores_per_chip(generation) * num_chips + + return f"{generation}-{num_cores}" + + +def _validate_tpu_config(node: dict): + """Validate the provided node with TPU support. + + If the config is malformed, users will run into an error but this function + will raise the error at config parsing time. This only tests very simple assertions. + + Raises: `ValueError` in case the input is malformed. + + """ + if "acceleratorType" in node and "acceleratorConfig" in node: + raise ValueError( + "For TPU usage, acceleratorType and acceleratorConfig " + "cannot both be set." + ) + if "acceleratorType" in node: + accelerator_type = node["acceleratorType"] + if not TPUAcceleratorManager.is_valid_tpu_accelerator_type(accelerator_type): + raise ValueError( + "`acceleratorType` should match v(generation)-(cores/chips). " + f"Got {accelerator_type}." + ) + else: # "acceleratorConfig" in node + accelerator_config = node["acceleratorConfig"] + if "type" not in accelerator_config or "topology" not in accelerator_config: + raise ValueError( + "acceleratorConfig expects 'type' and 'topology'. " + f"Got {accelerator_config}" + ) + generation = node["acceleratorConfig"]["type"] + topology = node["acceleratorConfig"]["topology"] + + generation_pattern = re.compile(r"^V\d+[a-zA-Z]*$") + topology_pattern = re.compile(r"^\d+x\d+(x\d+)?$") + + if generation != "V5LITE_POD" and not generation_pattern.match(generation): + raise ValueError(f"type should match V(generation). Got {generation}.") + if generation == "V2" or generation == "V3": + raise ValueError( + f"acceleratorConfig is not supported on V2/V3 TPUs. Got {generation}." + ) + if not topology_pattern.match(topology): + raise ValueError( + f"topology should be of form axbxc or axb. Got {topology}." + ) + + +def _get_num_tpu_chips(node: dict) -> int: + chips = 0 + if "acceleratorType" in node: + accelerator_type = node["acceleratorType"] + # `acceleratorType` is typically v{generation}-{cores} + cores = int(accelerator_type.split("-")[1]) + chips = cores / tpu.get_tpu_cores_per_chip(accelerator_type) + if "acceleratorConfig" in node: + topology = node["acceleratorConfig"]["topology"] + # `topology` is typically {chips}x{chips}x{chips} + # Multiply all dimensions together to get total number of chips + chips = 1 + for dim in topology.split("x"): + chips *= int(dim) + return chips + + +def _is_single_host_tpu(node: dict) -> bool: + accelerator_type = "" + if "acceleratorType" in node: + accelerator_type = node["acceleratorType"] + else: + accelerator_type = tpu_accelerator_config_to_type(node["acceleratorConfig"]) + return _get_num_tpu_chips(node) <= tpu.get_num_tpu_visible_chips_per_host( + accelerator_type + ) + + +def get_node_type(node: dict) -> GCPNodeType: + """Returns node type based on the keys in ``node``. + + This is a very simple check. If we have a ``machineType`` key, + this is a Compute instance. If we don't have a ``machineType`` key, + but we have ``acceleratorType``, this is a TPU. Otherwise, it's + invalid and an exception is raised. + + This works for both node configs and API returned nodes. + """ + + if ( + "machineType" not in node + and "acceleratorType" not in node + and "acceleratorConfig" not in node + ): + raise ValueError( + "Invalid node. For a Compute instance, 'machineType' is required." + "For a TPU instance, 'acceleratorType' OR 'acceleratorConfig' and " + f"no 'machineType' is required. Got {list(node)}." + ) + + if "machineType" not in node and ( + "acceleratorType" in node or "acceleratorConfig" in node + ): + _validate_tpu_config(node) + if not _is_single_host_tpu(node): + # Remove once proper autoscaling support is added. + logger.warning( + "TPU pod detected. Note that while the cluster launcher can create " + "multiple TPU pods, proper autoscaling will not work as expected, " + "as all hosts in a TPU pod need to execute the same program. " + "Proceed with caution." + ) + return GCPNodeType.TPU + return GCPNodeType.COMPUTE + + +def wait_for_crm_operation(operation, crm): + """Poll for cloud resource manager operation until finished.""" + logger.info( + "wait_for_crm_operation: " + "Waiting for operation {} to finish...".format(operation) + ) + + for _ in range(MAX_POLLS): + result = crm.operations().get(name=operation["name"]).execute() + if "error" in result: + raise Exception(result["error"]) + + if "done" in result and result["done"]: + logger.info("wait_for_crm_operation: Operation done.") + break + + time.sleep(POLL_INTERVAL) + + return result + + +def wait_for_compute_global_operation(project_name, operation, compute): + """Poll for global compute operation until finished.""" + logger.info( + "wait_for_compute_global_operation: " + "Waiting for operation {} to finish...".format(operation["name"]) + ) + + for _ in range(MAX_POLLS): + result = ( + compute.globalOperations() + .get( + project=project_name, + operation=operation["name"], + ) + .execute() + ) + if "error" in result: + raise Exception(result["error"]) + + if result["status"] == "DONE": + logger.info("wait_for_compute_global_operation: Operation done.") + break + + time.sleep(POLL_INTERVAL) + + return result + + +def key_pair_name(i, region, project_id, ssh_user): + """Returns the ith default gcp_key_pair_name.""" + key_name = "{}_gcp_{}_{}_{}_{}".format(RAY, region, project_id, ssh_user, i) + return key_name + + +def key_pair_paths(key_name): + """Returns public and private key paths for a given key_name.""" + public_key_path = os.path.expanduser("~/.ssh/{}.pub".format(key_name)) + private_key_path = os.path.expanduser("~/.ssh/{}.pem".format(key_name)) + return public_key_path, private_key_path + + +def generate_rsa_key_pair(): + """Create public and private ssh-keys.""" + + key = rsa.generate_private_key( + backend=default_backend(), public_exponent=65537, key_size=2048 + ) + + public_key = ( + key.public_key() + .public_bytes( + serialization.Encoding.OpenSSH, serialization.PublicFormat.OpenSSH + ) + .decode("utf-8") + ) + + pem = key.private_bytes( + encoding=serialization.Encoding.PEM, + format=serialization.PrivateFormat.TraditionalOpenSSL, + encryption_algorithm=serialization.NoEncryption(), + ).decode("utf-8") + + return public_key, pem + + +def _has_tpus_in_node_configs(config: dict) -> bool: + """Check if any nodes in config are TPUs.""" + node_configs = [ + node_type["node_config"] + for node_type in config["available_node_types"].values() + ] + return any(get_node_type(node) == GCPNodeType.TPU for node in node_configs) + + +def _is_head_node_a_tpu(config: dict) -> bool: + """Check if the head node is a TPU.""" + node_configs = { + node_id: node_type["node_config"] + for node_id, node_type in config["available_node_types"].items() + } + return get_node_type(node_configs[config["head_node_type"]]) == GCPNodeType.TPU + + +def build_request(http, *args, **kwargs): + new_http = google_auth_httplib2.AuthorizedHttp( + http.credentials, http=httplib2.Http() + ) + return googleapiclient.http.HttpRequest(new_http, *args, **kwargs) + + +def _create_crm(gcp_credentials=None): + return discovery.build( + "cloudresourcemanager", + "v1", + credentials=gcp_credentials, + requestBuilder=build_request, + cache_discovery=False, + ) + + +def _create_iam(gcp_credentials=None): + return discovery.build( + "iam", + "v1", + credentials=gcp_credentials, + requestBuilder=build_request, + cache_discovery=False, + ) + + +def _create_compute(gcp_credentials=None): + return discovery.build( + "compute", + "v1", + credentials=gcp_credentials, + requestBuilder=build_request, + cache_discovery=False, + ) + + +def _create_tpu(gcp_credentials=None): + return discovery.build( + "tpu", + TPU_VERSION, + credentials=gcp_credentials, + requestBuilder=build_request, + cache_discovery=False, + discoveryServiceUrl="https://tpu.googleapis.com/$discovery/rest", + ) + + +def construct_clients_from_provider_config(provider_config): + """ + Attempt to fetch and parse the JSON GCP credentials from the provider + config yaml file. + + tpu resource (the last element of the tuple) will be None if + `_has_tpus` in provider config is not set or False. + """ + gcp_credentials = provider_config.get("gcp_credentials") + if gcp_credentials is None: + logger.debug( + "gcp_credentials not found in cluster yaml file. " + "Falling back to GOOGLE_APPLICATION_CREDENTIALS " + "environment variable." + ) + tpu_resource = ( + _create_tpu() + if provider_config.get(HAS_TPU_PROVIDER_FIELD, False) + else None + ) + # If gcp_credentials is None, then discovery.build will search for + # credentials in the local environment. + return _create_crm(), _create_iam(), _create_compute(), tpu_resource + + assert ( + "type" in gcp_credentials + ), "gcp_credentials cluster yaml field missing 'type' field." + assert ( + "credentials" in gcp_credentials + ), "gcp_credentials cluster yaml field missing 'credentials' field." + + cred_type = gcp_credentials["type"] + credentials_field = gcp_credentials["credentials"] + + if cred_type == "service_account": + # If parsing the gcp_credentials failed, then the user likely made a + # mistake in copying the credentials into the config yaml. + try: + service_account_info = json.loads(credentials_field) + except json.decoder.JSONDecodeError: + raise RuntimeError( + "gcp_credentials found in cluster yaml file but " + "formatted improperly." + ) + credentials = service_account.Credentials.from_service_account_info( + service_account_info + ) + elif cred_type == "credentials_token": + # Otherwise the credentials type must be credentials_token. + credentials = OAuthCredentials(credentials_field) + + tpu_resource = ( + _create_tpu(credentials) + if provider_config.get(HAS_TPU_PROVIDER_FIELD, False) + else None + ) + + return ( + _create_crm(credentials), + _create_iam(credentials), + _create_compute(credentials), + tpu_resource, + ) + + +def bootstrap_gcp(config): + config = copy.deepcopy(config) + check_legacy_fields(config) + # Used internally to store head IAM role. + config["head_node"] = {} + + # Check if we have any TPUs defined, and if so, + # insert that information into the provider config + if _has_tpus_in_node_configs(config): + config["provider"][HAS_TPU_PROVIDER_FIELD] = True + + crm, iam, compute, tpu = construct_clients_from_provider_config(config["provider"]) + + config = _configure_project(config, crm) + config = _configure_iam_role(config, crm, iam) + config = _configure_key_pair(config, compute) + config = _configure_subnet(config, compute) + + return config + + +def _configure_project(config, crm): + """Setup a Google Cloud Platform Project. + + Google Compute Platform organizes all the resources, such as storage + buckets, users, and instances under projects. This is different from + aws ec2 where everything is global. + """ + config = copy.deepcopy(config) + + project_id = config["provider"].get("project_id") + assert config["provider"]["project_id"] is not None, ( + "'project_id' must be set in the 'provider' section of the autoscaler" + " config. Notice that the project id must be globally unique." + ) + project = _get_project(project_id, crm) + + if project is None: + # Project not found, try creating it + _create_project(project_id, crm) + project = _get_project(project_id, crm) + + assert project is not None, "Failed to create project" + assert ( + project["lifecycleState"] == "ACTIVE" + ), "Project status needs to be ACTIVE, got {}".format(project["lifecycleState"]) + + config["provider"]["project_id"] = project["projectId"] + + return config + + +def _configure_iam_role(config, crm, iam): + """Setup a gcp service account with IAM roles. + + Creates a gcp service acconut and binds IAM roles which allow it to control + control storage/compute services. Specifically, the head node needs to have + an IAM role that allows it to create further gce instances and store items + in google cloud storage. + + TODO: Allow the name/id of the service account to be configured + """ + config = copy.deepcopy(config) + + email = SERVICE_ACCOUNT_EMAIL_TEMPLATE.format( + account_id=DEFAULT_SERVICE_ACCOUNT_ID, + project_id=config["provider"]["project_id"], + ) + service_account = _get_service_account(email, config, iam) + + if service_account is None: + logger.info( + "_configure_iam_role: " + "Creating new service account {}".format(DEFAULT_SERVICE_ACCOUNT_ID) + ) + + service_account = _create_service_account( + DEFAULT_SERVICE_ACCOUNT_ID, DEFAULT_SERVICE_ACCOUNT_CONFIG, config, iam + ) + + assert service_account is not None, "Failed to create service account" + + if config["provider"].get(HAS_TPU_PROVIDER_FIELD, False): + roles = DEFAULT_SERVICE_ACCOUNT_ROLES + TPU_SERVICE_ACCOUNT_ROLES + else: + roles = DEFAULT_SERVICE_ACCOUNT_ROLES + + _add_iam_policy_binding(service_account, roles, crm) + + config["head_node"]["serviceAccounts"] = [ + { + "email": service_account["email"], + # NOTE: The amount of access is determined by the scope + IAM + # role of the service account. Even if the cloud-platform scope + # gives (scope) access to the whole cloud-platform, the service + # account is limited by the IAM rights specified below. + "scopes": ["https://www.googleapis.com/auth/cloud-platform"], + } + ] + + return config + + +def _configure_key_pair(config, compute): + """Configure SSH access, using an existing key pair if possible. + + Creates a project-wide ssh key that can be used to access all the instances + unless explicitly prohibited by instance config. + + The ssh-keys created by ray are of format: + + [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] + + where: + + [USERNAME] is the user for the SSH key, specified in the config. + [KEY_VALUE] is the public SSH key value. + """ + config = copy.deepcopy(config) + + if "ssh_private_key" in config["auth"]: + return config + + ssh_user = config["auth"]["ssh_user"] + + project = compute.projects().get(project=config["provider"]["project_id"]).execute() + + # Key pairs associated with project meta data. The key pairs are general, + # and not just ssh keys. + ssh_keys_str = next( + ( + item + for item in project["commonInstanceMetadata"].get("items", []) + if item["key"] == "ssh-keys" + ), + {}, + ).get("value", "") + + ssh_keys = ssh_keys_str.split("\n") if ssh_keys_str else [] + + # Try a few times to get or create a good key pair. + key_found = False + for i in range(10): + key_name = key_pair_name( + i, config["provider"]["region"], config["provider"]["project_id"], ssh_user + ) + public_key_path, private_key_path = key_pair_paths(key_name) + + for ssh_key in ssh_keys: + key_parts = ssh_key.split(" ") + if len(key_parts) != 3: + continue + + if key_parts[2] == ssh_user and os.path.exists(private_key_path): + # Found a key + key_found = True + break + + # Writing the new ssh key to the filesystem fails if the ~/.ssh + # directory doesn't already exist. + os.makedirs(os.path.expanduser("~/.ssh"), exist_ok=True) + + # Create a key since it doesn't exist locally or in GCP + if not key_found and not os.path.exists(private_key_path): + logger.info( + "_configure_key_pair: Creating new key pair {}".format(key_name) + ) + public_key, private_key = generate_rsa_key_pair() + + _create_project_ssh_key_pair(project, public_key, ssh_user, compute) + + # Create the directory if it doesn't exists + private_key_dir = os.path.dirname(private_key_path) + os.makedirs(private_key_dir, exist_ok=True) + + # We need to make sure to _create_ the file with the right + # permissions. In order to do that we need to change the default + # os.open behavior to include the mode we want. + with open( + private_key_path, + "w", + opener=partial(os.open, mode=0o600), + ) as f: + f.write(private_key) + + with open(public_key_path, "w") as f: + f.write(public_key) + + key_found = True + + break + + if key_found: + break + + assert key_found, "SSH keypair for user {} not found for {}".format( + ssh_user, private_key_path + ) + assert os.path.exists( + private_key_path + ), "Private key file {} not found for user {}".format(private_key_path, ssh_user) + + logger.info( + "_configure_key_pair: " + "Private key not specified in config, using" + "{}".format(private_key_path) + ) + + config["auth"]["ssh_private_key"] = private_key_path + + return config + + +def _configure_subnet(config, compute): + """Pick a reasonable subnet if not specified by the config.""" + config = copy.deepcopy(config) + + node_configs = [ + node_type["node_config"] + for node_type in config["available_node_types"].values() + ] + # Rationale: avoid subnet lookup if the network is already + # completely manually configured + + # networkInterfaces is compute, networkConfig is TPU + if all( + "networkInterfaces" in node_config or "networkConfig" in node_config + for node_config in node_configs + ): + return config + + subnets = _list_subnets(config, compute) + + if not subnets: + raise NotImplementedError("Should be able to create subnet.") + + # TODO: make sure that we have usable subnet. Maybe call + # compute.subnetworks().listUsable? For some reason it didn't + # work out-of-the-box + default_subnet = subnets[0] + + default_interfaces = [ + { + "subnetwork": default_subnet["selfLink"], + "accessConfigs": [ + { + "name": "External NAT", + "type": "ONE_TO_ONE_NAT", + } + ], + } + ] + + for node_config in node_configs: + # The not applicable key will be removed during node creation + + # compute + if "networkInterfaces" not in node_config: + node_config["networkInterfaces"] = copy.deepcopy(default_interfaces) + # TPU + if "networkConfig" not in node_config: + node_config["networkConfig"] = copy.deepcopy(default_interfaces)[0] + node_config["networkConfig"].pop("accessConfigs") + + return config + + +def _list_subnets(config, compute): + response = ( + compute.subnetworks() + .list( + project=config["provider"]["project_id"], + region=config["provider"]["region"], + ) + .execute() + ) + + return response["items"] + + +def _get_subnet(config, subnet_id, compute): + subnet = ( + compute.subnetworks() + .get( + project=config["provider"]["project_id"], + region=config["provider"]["region"], + subnetwork=subnet_id, + ) + .execute() + ) + + return subnet + + +def _get_project(project_id, crm): + try: + project = crm.projects().get(projectId=project_id).execute() + except errors.HttpError as e: + if e.resp.status != 403: + raise + project = None + + return project + + +def _create_project(project_id, crm): + operation = ( + crm.projects() + .create(body={"projectId": project_id, "name": project_id}) + .execute() + ) + + result = wait_for_crm_operation(operation, crm) + + return result + + +def _get_service_account(account, config, iam): + project_id = config["provider"]["project_id"] + full_name = "projects/{project_id}/serviceAccounts/{account}".format( + project_id=project_id, account=account + ) + try: + service_account = iam.projects().serviceAccounts().get(name=full_name).execute() + except errors.HttpError as e: + if e.resp.status != 404: + raise + service_account = None + + return service_account + + +def _create_service_account(account_id, account_config, config, iam): + project_id = config["provider"]["project_id"] + + service_account = ( + iam.projects() + .serviceAccounts() + .create( + name="projects/{project_id}".format(project_id=project_id), + body={ + "accountId": account_id, + "serviceAccount": account_config, + }, + ) + .execute() + ) + + return service_account + + +def _add_iam_policy_binding(service_account, roles, crm): + """Add new IAM roles for the service account.""" + project_id = service_account["projectId"] + email = service_account["email"] + member_id = "serviceAccount:" + email + + policy = ( + crm.projects() + .getIamPolicy( + resource=project_id, body={"options": {"requestedPolicyVersion": 3}} + ) + .execute() + ) + + already_configured = True + for role in roles: + role_exists = False + for binding in policy["bindings"]: + if binding["role"] == role: + if member_id not in binding["members"]: + binding["members"].append(member_id) + already_configured = False + role_exists = True + + if not role_exists: + already_configured = False + policy["bindings"].append( + { + "members": [member_id], + "role": role, + } + ) + + if already_configured: + # In some managed environments, an admin needs to grant the + # roles, so only call setIamPolicy if needed. + return + + result = ( + crm.projects() + .setIamPolicy( + resource=project_id, + body={ + "policy": policy, + }, + ) + .execute() + ) + + return result + + +def _create_project_ssh_key_pair(project, public_key, ssh_user, compute): + """Inserts an ssh-key into project commonInstanceMetadata""" + + key_parts = public_key.split(" ") + + # Sanity checks to make sure that the generated key matches expectation + assert len(key_parts) == 2, key_parts + assert key_parts[0] == "ssh-rsa", key_parts + + new_ssh_meta = "{ssh_user}:ssh-rsa {key_value} {ssh_user}".format( + ssh_user=ssh_user, key_value=key_parts[1] + ) + + common_instance_metadata = project["commonInstanceMetadata"] + items = common_instance_metadata.get("items", []) + + ssh_keys_i = next( + (i for i, item in enumerate(items) if item["key"] == "ssh-keys"), None + ) + + if ssh_keys_i is None: + items.append({"key": "ssh-keys", "value": new_ssh_meta}) + else: + ssh_keys = items[ssh_keys_i] + ssh_keys["value"] += "\n" + new_ssh_meta + items[ssh_keys_i] = ssh_keys + + common_instance_metadata["items"] = items + + operation = ( + compute.projects() + .setCommonInstanceMetadata( + project=project["name"], body=common_instance_metadata + ) + .execute() + ) + + response = wait_for_compute_global_operation(project["name"], operation, compute) + + return response diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/node.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/node.py new file mode 100644 index 0000000000000000000000000000000000000000..56a756a587ce85bb9954337d0674cd8305c8f7a4 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/node.py @@ -0,0 +1,856 @@ +"""Abstractions around GCP resources and nodes. + +The logic has been abstracted away here to allow for different GCP resources +(API endpoints), which can differ widely, making it impossible to use +the same logic for everything. + +Classes inheriting from ``GCPResource`` represent different GCP resources - +API endpoints that allow for nodes to be created, removed, listed and +otherwise managed. Those classes contain methods abstracting GCP REST API +calls. +Each resource has a corresponding node type, represented by a +class inheriting from ``GCPNode``. Those classes are essentially dicts +with some extra methods. The instances of those classes will be created +from API responses. + +The ``GCPNodeType`` enum is a lightweight way to classify nodes. + +Currently, Compute and TPU resources & nodes are supported. + +In order to add support for new resources, create classes inheriting from +``GCPResource`` and ``GCPNode``, update the ``GCPNodeType`` enum, +update the ``_generate_node_name`` method and finally update the +node provider. +""" + +import abc +import logging +import re +import time +from collections import UserDict +from copy import deepcopy +from enum import Enum +from functools import wraps +from typing import Any, Dict, List, Optional, Tuple, Union +from uuid import uuid4 + +import httplib2 +from google_auth_httplib2 import AuthorizedHttp +from googleapiclient.discovery import Resource +from googleapiclient.errors import HttpError + +from ray.autoscaler.tags import TAG_RAY_CLUSTER_NAME, TAG_RAY_NODE_NAME + +logger = logging.getLogger(__name__) + +INSTANCE_NAME_MAX_LEN = 64 +INSTANCE_NAME_UUID_LEN = 8 +MAX_POLLS = 12 +# TPUs take a long while to respond, so we increase the MAX_POLLS +# considerably - this probably could be smaller +# TPU deletion uses MAX_POLLS +MAX_POLLS_TPU = MAX_POLLS * 8 +POLL_INTERVAL = 5 + + +def _retry_on_exception( + exception: Union[Exception, Tuple[Exception]], + regex: Optional[str] = None, + max_retries: int = MAX_POLLS, + retry_interval_s: int = POLL_INTERVAL, +): + """Retry a function call n-times for as long as it throws an exception.""" + + def dec(func): + @wraps(func) + def wrapper(*args, **kwargs): + def try_catch_exc(): + try: + value = func(*args, **kwargs) + return value + except Exception as e: + if not isinstance(e, exception) or ( + regex and not re.search(regex, str(e)) + ): + raise e + return e + + for _ in range(max_retries): + ret = try_catch_exc() + if not isinstance(ret, Exception): + break + time.sleep(retry_interval_s) + if isinstance(ret, Exception): + raise ret + return ret + + return wrapper + + return dec + + +def _generate_node_name(labels: dict, node_suffix: str) -> str: + """Generate node name from labels and suffix. + + This is required so that the correct resource can be selected + when the only information autoscaler has is the name of the node. + + The suffix is expected to be one of 'compute' or 'tpu' + (as in ``GCPNodeType``). + """ + name_label = labels[TAG_RAY_NODE_NAME] + assert len(name_label) <= (INSTANCE_NAME_MAX_LEN - INSTANCE_NAME_UUID_LEN - 1), ( + name_label, + len(name_label), + ) + return f"{name_label}-{uuid4().hex[:INSTANCE_NAME_UUID_LEN]}-{node_suffix}" + + +class GCPNodeType(Enum): + """Enum for GCP node types (compute & tpu)""" + + COMPUTE = "compute" + TPU = "tpu" + + @staticmethod + def from_gcp_node(node: "GCPNode"): + """Return GCPNodeType based on ``node``'s class""" + if isinstance(node, GCPTPUNode): + return GCPNodeType.TPU + if isinstance(node, GCPComputeNode): + return GCPNodeType.COMPUTE + raise TypeError(f"Wrong GCPNode type {type(node)}.") + + @staticmethod + def name_to_type(name: str): + """Provided a node name, determine the type. + + This expects the name to be in format '[NAME]-[UUID]-[TYPE]', + where [TYPE] is either 'compute' or 'tpu'. + """ + return GCPNodeType(name.split("-")[-1]) + + +class GCPNode(UserDict, metaclass=abc.ABCMeta): + """Abstraction around compute and tpu nodes""" + + NON_TERMINATED_STATUSES = None + RUNNING_STATUSES = None + STATUS_FIELD = None + + def __init__(self, base_dict: dict, resource: "GCPResource", **kwargs) -> None: + super().__init__(base_dict, **kwargs) + self.resource = resource + assert isinstance(self.resource, GCPResource) + + def is_running(self) -> bool: + return self.get(self.STATUS_FIELD) in self.RUNNING_STATUSES + + def is_terminated(self) -> bool: + return self.get(self.STATUS_FIELD) not in self.NON_TERMINATED_STATUSES + + @abc.abstractmethod + def get_labels(self) -> dict: + return + + @abc.abstractmethod + def get_external_ip(self) -> str: + return + + @abc.abstractmethod + def get_internal_ip(self) -> str: + return + + def __repr__(self) -> str: + return f"<{self.__class__.__name__}: {self.get('name')}>" + + +class GCPComputeNode(GCPNode): + """Abstraction around compute nodes""" + + # https://cloud.google.com/compute/docs/instances/instance-life-cycle + NON_TERMINATED_STATUSES = {"PROVISIONING", "STAGING", "RUNNING"} + TERMINATED_STATUSES = {"TERMINATED", "SUSPENDED"} + RUNNING_STATUSES = {"RUNNING"} + STATUS_FIELD = "status" + + def get_labels(self) -> dict: + return self.get("labels", {}) + + def get_external_ip(self) -> str: + return ( + self.get("networkInterfaces", [{}])[0] + .get("accessConfigs", [{}])[0] + .get("natIP", None) + ) + + def get_internal_ip(self) -> str: + return self.get("networkInterfaces", [{}])[0].get("networkIP") + + +class GCPTPUNode(GCPNode): + """Abstraction around tpu nodes""" + + # https://cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.nodes#State + + NON_TERMINATED_STATUSES = {"CREATING", "STARTING", "RESTARTING", "READY"} + RUNNING_STATUSES = {"READY"} + STATUS_FIELD = "state" + + def get_labels(self) -> dict: + return self.get("labels", {}) + + @property + def num_workers(self) -> int: + return len(self.get("networkEndpoints", [{}])) + + def get_external_ips(self) -> List[str]: + return self.get("networkEndpoints", [{}]) + + def get_external_ip(self, worker_index: int = 0) -> str: + return ( + self.get_external_ips()[worker_index] + .get("accessConfig", {}) + .get("externalIp", None) + ) + + def get_internal_ips(self) -> List[str]: + return self.get("networkEndpoints", [{}]) + + def get_internal_ip(self, worker_index: int = 0) -> str: + return self.get_internal_ips()[worker_index].get("ipAddress", None) + + +class GCPResource(metaclass=abc.ABCMeta): + """Abstraction around compute and TPU resources""" + + def __init__( + self, + resource: Resource, + project_id: str, + availability_zone: str, + cluster_name: str, + ) -> None: + self.resource = resource + self.project_id = project_id + self.availability_zone = availability_zone + self.cluster_name = cluster_name + + @abc.abstractmethod + def get_new_authorized_http(self, http: AuthorizedHttp) -> AuthorizedHttp: + """Generate a new AuthorizedHttp object with the given credentials.""" + return + + @abc.abstractmethod + def wait_for_operation( + self, + operation: dict, + max_polls: int = MAX_POLLS, + poll_interval: int = POLL_INTERVAL, + ) -> dict: + """Waits a preset amount of time for operation to complete.""" + return None + + @abc.abstractmethod + def list_instances( + self, + label_filters: Optional[dict] = None, + is_terminated: bool = False, + ) -> List["GCPNode"]: + """Returns a filtered list of all instances. + + The filter removes all terminated instances and, if ``label_filters`` + are provided, all instances which labels are not matching the + ones provided. + """ + return + + @abc.abstractmethod + def get_instance(self, node_id: str) -> "GCPNode": + """Returns a single instance.""" + return + + @abc.abstractmethod + def set_labels( + self, node: GCPNode, labels: dict, wait_for_operation: bool = True + ) -> dict: + """Sets labels on an instance and returns result. + + Completely replaces the labels dictionary.""" + return + + @abc.abstractmethod + def create_instance( + self, base_config: dict, labels: dict, wait_for_operation: bool = True + ) -> Tuple[dict, str]: + """Creates a single instance and returns result. + + Returns a tuple of (result, node_name). + """ + return + + def create_instances( + self, + base_config: dict, + labels: dict, + count: int, + wait_for_operation: bool = True, + ) -> List[Tuple[dict, str]]: + """Creates multiple instances and returns result. + + Returns a list of tuples of (result, node_name). + """ + operations = [ + self.create_instance(base_config, labels, wait_for_operation=False) + for i in range(count) + ] + + if wait_for_operation: + results = [ + (self.wait_for_operation(operation), node_name) + for operation, node_name in operations + ] + else: + results = operations + + return results + + @abc.abstractmethod + def delete_instance(self, node_id: str, wait_for_operation: bool = True) -> dict: + """Deletes an instance and returns result.""" + return + + @abc.abstractmethod + def stop_instance(self, node_id: str, wait_for_operation: bool = True) -> dict: + """Deletes an instance and returns result.""" + return + + @abc.abstractmethod + def start_instance(self, node_id: str, wait_for_operation: bool = True) -> dict: + """Starts a single instance and returns result.""" + return + + +class GCPCompute(GCPResource): + """Abstraction around GCP compute resource""" + + def get_new_authorized_http(self, http: AuthorizedHttp) -> AuthorizedHttp: + """Generate a new AuthorizedHttp object with the given credentials.""" + new_http = AuthorizedHttp(http.credentials, http=httplib2.Http()) + return new_http + + def wait_for_operation( + self, + operation: dict, + max_polls: int = MAX_POLLS, + poll_interval: int = POLL_INTERVAL, + ) -> dict: + """Poll for compute zone operation until finished.""" + logger.info( + "wait_for_compute_zone_operation: " + f"Waiting for operation {operation['name']} to finish..." + ) + + for _ in range(max_polls): + result = ( + self.resource.zoneOperations() + .get( + project=self.project_id, + operation=operation["name"], + zone=self.availability_zone, + ) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + if "error" in result: + raise Exception(result["error"]) + + if result["status"] == "DONE": + logger.info( + "wait_for_compute_zone_operation: " + f"Operation {operation['name']} finished." + ) + break + + time.sleep(poll_interval) + + return result + + def list_instances( + self, + label_filters: Optional[dict] = None, + is_terminated: bool = False, + ) -> List[GCPComputeNode]: + label_filters = label_filters or {} + + if label_filters: + label_filter_expr = ( + "(" + + " AND ".join( + [ + "(labels.{key} = {value})".format(key=key, value=value) + for key, value in label_filters.items() + ] + ) + + ")" + ) + else: + label_filter_expr = "" + + statuses = ( + GCPComputeNode.TERMINATED_STATUSES + if is_terminated + else GCPComputeNode.NON_TERMINATED_STATUSES + ) + + instance_state_filter_expr = ( + "(" + + " OR ".join( + ["(status = {status})".format(status=status) for status in statuses] + ) + + ")" + ) + + cluster_name_filter_expr = "(labels.{key} = {value})".format( + key=TAG_RAY_CLUSTER_NAME, value=self.cluster_name + ) + + # TPU VMs spawn accompanying Compute Instances that must be filtered out, + # else this results in duplicated nodes. + tpu_negation_filter_expr = "(NOT labels.{label}:*)".format(label="tpu_cores") + + not_empty_filters = [ + f + for f in [ + label_filter_expr, + instance_state_filter_expr, + cluster_name_filter_expr, + tpu_negation_filter_expr, + ] + if f + ] + + filter_expr = " AND ".join(not_empty_filters) + + response = ( + self.resource.instances() + .list( + project=self.project_id, + zone=self.availability_zone, + filter=filter_expr, + ) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + instances = response.get("items", []) + return [GCPComputeNode(i, self) for i in instances] + + def get_instance(self, node_id: str) -> GCPComputeNode: + instance = ( + self.resource.instances() + .get( + project=self.project_id, + zone=self.availability_zone, + instance=node_id, + ) + .execute() + ) + + return GCPComputeNode(instance, self) + + def set_labels( + self, node: GCPComputeNode, labels: dict, wait_for_operation: bool = True + ) -> dict: + body = { + "labels": dict(node["labels"], **labels), + "labelFingerprint": node["labelFingerprint"], + } + node_id = node["name"] + operation = ( + self.resource.instances() + .setLabels( + project=self.project_id, + zone=self.availability_zone, + instance=node_id, + body=body, + ) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + if wait_for_operation: + result = self.wait_for_operation(operation) + else: + result = operation + + return result + + def _convert_resources_to_urls( + self, configuration_dict: Dict[str, Any] + ) -> Dict[str, Any]: + """Ensures that resources are in their full URL form. + + GCP expects machineType and acceleratorType to be a full URL (e.g. + `zones/us-west1/machineTypes/n1-standard-2`) instead of just the + type (`n1-standard-2`) + + Args: + configuration_dict: Dict of options that will be passed to GCP + Returns: + Input dictionary, but with possibly expanding `machineType` and + `acceleratorType`. + """ + configuration_dict = deepcopy(configuration_dict) + existing_machine_type = configuration_dict["machineType"] + if not re.search(".*/machineTypes/.*", existing_machine_type): + configuration_dict[ + "machineType" + ] = "zones/{zone}/machineTypes/{machine_type}".format( + zone=self.availability_zone, + machine_type=configuration_dict["machineType"], + ) + + for accelerator in configuration_dict.get("guestAccelerators", []): + gpu_type = accelerator["acceleratorType"] + if not re.search(".*/acceleratorTypes/.*", gpu_type): + accelerator[ + "acceleratorType" + ] = "projects/{project}/zones/{zone}/acceleratorTypes/{accelerator}".format( # noqa: E501 + project=self.project_id, + zone=self.availability_zone, + accelerator=gpu_type, + ) + + return configuration_dict + + def create_instance( + self, base_config: dict, labels: dict, wait_for_operation: bool = True + ) -> Tuple[dict, str]: + + config = self._convert_resources_to_urls(base_config) + # removing TPU-specific default key set in config.py + config.pop("networkConfig", None) + name = _generate_node_name(labels, GCPNodeType.COMPUTE.value) + + labels = dict(config.get("labels", {}), **labels) + + config.update( + { + "labels": dict(labels, **{TAG_RAY_CLUSTER_NAME: self.cluster_name}), + "name": name, + } + ) + + # Allow Google Compute Engine instance templates. + # + # Config example: + # + # ... + # node_config: + # sourceInstanceTemplate: global/instanceTemplates/worker-16 + # machineType: e2-standard-16 + # ... + # + # node_config parameters override matching template parameters, if any. + # + # https://cloud.google.com/compute/docs/instance-templates + # https://cloud.google.com/compute/docs/reference/rest/v1/instances/insert + source_instance_template = config.pop("sourceInstanceTemplate", None) + + operation = ( + self.resource.instances() + .insert( + project=self.project_id, + zone=self.availability_zone, + sourceInstanceTemplate=source_instance_template, + body=config, + ) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + if wait_for_operation: + result = self.wait_for_operation(operation) + else: + result = operation + + return result, name + + def delete_instance(self, node_id: str, wait_for_operation: bool = True) -> dict: + operation = ( + self.resource.instances() + .delete( + project=self.project_id, + zone=self.availability_zone, + instance=node_id, + ) + .execute() + ) + + if wait_for_operation: + result = self.wait_for_operation(operation) + else: + result = operation + + return result + + def stop_instance(self, node_id: str, wait_for_operation: bool = True) -> dict: + operation = ( + self.resource.instances() + .stop( + project=self.project_id, + zone=self.availability_zone, + instance=node_id, + ) + .execute() + ) + + if wait_for_operation: + result = self.wait_for_operation(operation) + else: + result = operation + return result + + def start_instance(self, node_id: str, wait_for_operation: bool = True) -> dict: + + operation = ( + self.resource.instances() + .start( + project=self.project_id, + zone=self.availability_zone, + instance=node_id, + ) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + if wait_for_operation: + result = self.wait_for_operation(operation) + else: + result = operation + return result + + +class GCPTPU(GCPResource): + """Abstraction around GCP TPU resource""" + + # node names already contain the path, but this is required for `parent` + # arguments + @property + def path(self): + return f"projects/{self.project_id}/locations/{self.availability_zone}" + + def get_new_authorized_http(self, http: AuthorizedHttp) -> AuthorizedHttp: + """Generate a new AuthorizedHttp object with the given credentials.""" + new_http = AuthorizedHttp(http.credentials, http=httplib2.Http()) + return new_http + + def wait_for_operation( + self, + operation: dict, + max_polls: int = MAX_POLLS_TPU, + poll_interval: int = POLL_INTERVAL, + ) -> dict: + """Poll for TPU operation until finished.""" + logger.info( + "wait_for_tpu_operation: " + f"Waiting for operation {operation['name']} to finish..." + ) + + for _ in range(max_polls): + result = ( + self.resource.projects() + .locations() + .operations() + .get(name=f"{operation['name']}") + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + if "error" in result: + raise Exception(result["error"]) + + if "response" in result: + logger.info( + "wait_for_tpu_operation: " + f"Operation {operation['name']} finished." + ) + break + + time.sleep(poll_interval) + + return result + + def list_instances( + self, + label_filters: Optional[dict] = None, + is_terminated: bool = False, + ) -> List[GCPTPUNode]: + response = ( + self.resource.projects() + .locations() + .nodes() + .list(parent=self.path) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + instances = response.get("nodes", []) + instances = [GCPTPUNode(i, self) for i in instances] + + # filter_expr cannot be passed directly to API + # so we need to filter the results ourselves + + # same logic as in GCPCompute.list_instances + label_filters = label_filters or {} + label_filters[TAG_RAY_CLUSTER_NAME] = self.cluster_name + + def filter_instance(instance: GCPTPUNode) -> bool: + if instance.is_terminated(): + return False + + labels = instance.get_labels() + if label_filters: + for key, value in label_filters.items(): + if key not in labels: + return False + if value != labels[key]: + return False + + return True + + instances = list(filter(filter_instance, instances)) + + return instances + + def get_instance(self, node_id: str) -> GCPTPUNode: + instance = ( + self.resource.projects() + .locations() + .nodes() + .get(name=node_id) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + return GCPTPUNode(instance, self) + + # this sometimes fails without a clear reason, so we retry it + # MAX_POLLS times + @_retry_on_exception(HttpError, "unable to queue the operation") + def set_labels( + self, node: GCPTPUNode, labels: dict, wait_for_operation: bool = True + ) -> dict: + body = { + "labels": dict(node["labels"], **labels), + } + update_mask = "labels" + + operation = ( + self.resource.projects() + .locations() + .nodes() + .patch( + name=node["name"], + updateMask=update_mask, + body=body, + ) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + if wait_for_operation: + result = self.wait_for_operation(operation) + else: + result = operation + + return result + + def create_instance( + self, base_config: dict, labels: dict, wait_for_operation: bool = True + ) -> Tuple[dict, str]: + config = base_config.copy() + # removing Compute-specific default key set in config.py + config.pop("networkInterfaces", None) + name = _generate_node_name(labels, GCPNodeType.TPU.value) + + labels = dict(config.get("labels", {}), **labels) + + config.update( + { + "labels": dict(labels, **{TAG_RAY_CLUSTER_NAME: self.cluster_name}), + } + ) + + if "networkConfig" not in config: + config["networkConfig"] = {} + if "enableExternalIps" not in config["networkConfig"]: + # this is required for SSH to work, per google documentation + # https://cloud.google.com/tpu/docs/users-guide-tpu-vm#create-curl + config["networkConfig"]["enableExternalIps"] = True + + # replace serviceAccounts with serviceAccount, and scopes with scope + # this is necessary for the head node to work + # see here: https://tpu.googleapis.com/$discovery/rest?version=v2alpha1 + if "serviceAccounts" in config: + config["serviceAccount"] = config.pop("serviceAccounts")[0] + config["serviceAccount"]["scope"] = config["serviceAccount"].pop("scopes") + + operation = ( + self.resource.projects() + .locations() + .nodes() + .create( + parent=self.path, + body=config, + nodeId=name, + ) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + if wait_for_operation: + result = self.wait_for_operation(operation) + else: + result = operation + + return result, name + + def delete_instance(self, node_id: str, wait_for_operation: bool = True) -> dict: + operation = ( + self.resource.projects() + .locations() + .nodes() + .delete(name=node_id) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + # No need to increase MAX_POLLS for deletion + if wait_for_operation: + result = self.wait_for_operation(operation, max_polls=MAX_POLLS) + else: + result = operation + + return result + + def stop_instance(self, node_id: str, wait_for_operation: bool = True) -> dict: + operation = ( + self.resource.projects() + .locations() + .nodes() + .stop(name=node_id) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + if wait_for_operation: + result = self.wait_for_operation(operation, max_polls=MAX_POLLS) + else: + result = operation + + return result + + def start_instance(self, node_id: str, wait_for_operation: bool = True) -> dict: + operation = ( + self.resource.projects() + .locations() + .nodes() + .start(name=node_id) + .execute(http=self.get_new_authorized_http(self.resource._http)) + ) + + if wait_for_operation: + result = self.wait_for_operation(operation, max_polls=MAX_POLLS) + else: + result = operation + + return result diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..2d7147a6061942763c991ece2427fb657479ece8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/node_provider.py @@ -0,0 +1,350 @@ +import copy +import logging +import time +from functools import wraps +from threading import RLock +from types import ModuleType +from typing import Any, Dict, List, Optional, Tuple + +import googleapiclient + +from ray.autoscaler._private.gcp.config import ( + bootstrap_gcp, + construct_clients_from_provider_config, + get_node_type, + tpu_accelerator_config_to_type, +) + +# The logic has been abstracted away here to allow for different GCP resources +# (API endpoints), which can differ widely, making it impossible to use +# the same logic for everything. +from ray.autoscaler._private.gcp.node import GCPTPU # noqa +from ray.autoscaler._private.gcp.node import ( + GCPCompute, + GCPNode, + GCPNodeType, + GCPResource, +) +from ray.autoscaler._private.gcp.tpu_command_runner import TPUCommandRunner +from ray.autoscaler.command_runner import CommandRunnerInterface +from ray.autoscaler.node_provider import NodeProvider + +logger = logging.getLogger(__name__) + + +def _retry(method, max_tries=5, backoff_s=1): + """Retry decorator for methods of GCPNodeProvider. + + Upon catching BrokenPipeError, API clients are rebuilt and + decorated methods are retried. + + Work-around for https://github.com/ray-project/ray/issues/16072. + Based on https://github.com/kubeflow/pipelines/pull/5250/files. + """ + + @wraps(method) + def method_with_retries(self, *args, **kwargs): + try_count = 0 + while try_count < max_tries: + try: + return method(self, *args, **kwargs) + except BrokenPipeError: + logger.warning("Caught a BrokenPipeError. Retrying.") + try_count += 1 + if try_count < max_tries: + self._construct_clients() + time.sleep(backoff_s) + else: + raise + + return method_with_retries + + +class GCPNodeProvider(NodeProvider): + def __init__(self, provider_config: dict, cluster_name: str): + NodeProvider.__init__(self, provider_config, cluster_name) + self.lock = RLock() + self._construct_clients() + self.cache_stopped_nodes = provider_config.get("cache_stopped_nodes", False) + + # Cache of node objects from the last nodes() call. This avoids + # excessive DescribeInstances requests. + self.cached_nodes: Dict[str, GCPNode] = {} + + def _construct_clients(self): + _, _, compute, tpu = construct_clients_from_provider_config( + self.provider_config + ) + + # Dict of different resources provided by GCP. + # At this moment - Compute and TPUs + self.resources: Dict[GCPNodeType, GCPResource] = {} + + # Compute is always required + self.resources[GCPNodeType.COMPUTE] = GCPCompute( + compute, + self.provider_config["project_id"], + self.provider_config["availability_zone"], + self.cluster_name, + ) + + # if there are no TPU nodes defined in config, tpu will be None. + if tpu is not None: + self.resources[GCPNodeType.TPU] = GCPTPU( + tpu, + self.provider_config["project_id"], + self.provider_config["availability_zone"], + self.cluster_name, + ) + + def _get_resource_depending_on_node_name(self, node_name: str) -> GCPResource: + """Return the resource responsible for the node, based on node_name. + + This expects the name to be in format '[NAME]-[UUID]-[TYPE]', + where [TYPE] is either 'compute' or 'tpu' (see ``GCPNodeType``). + """ + return self.resources[GCPNodeType.name_to_type(node_name)] + + @_retry + def non_terminated_nodes(self, tag_filters: dict): + with self.lock: + instances = [] + + for resource in self.resources.values(): + node_instances = resource.list_instances(tag_filters) + instances += node_instances + + # Note: All the operations use "name" as the unique instance id + self.cached_nodes = {i["name"]: i for i in instances} + return [i["name"] for i in instances] + + def is_running(self, node_id: str): + with self.lock: + node = self._get_cached_node(node_id) + return node.is_running() + + def is_terminated(self, node_id: str): + with self.lock: + node = self._get_cached_node(node_id) + return node.is_terminated() + + def node_tags(self, node_id: str): + with self.lock: + node = self._get_cached_node(node_id) + return node.get_labels() + + @_retry + def set_node_tags(self, node_id: str, tags: dict): + with self.lock: + labels = tags + node = self._get_node(node_id) + + resource = self._get_resource_depending_on_node_name(node_id) + + result = resource.set_labels(node=node, labels=labels) + + return result + + def external_ip(self, node_id: str): + with self.lock: + node = self._get_cached_node(node_id) + + ip = node.get_external_ip() + if ip is None: + node = self._get_node(node_id) + ip = node.get_external_ip() + + return ip + + def internal_ip(self, node_id: str): + with self.lock: + node = self._get_cached_node(node_id) + + ip = node.get_internal_ip() + if ip is None: + node = self._get_node(node_id) + ip = node.get_internal_ip() + + return ip + + @_retry + def create_node(self, base_config: dict, tags: dict, count: int) -> Dict[str, dict]: + """Creates instances. + + Returns dict mapping instance id to each create operation result for the created + instances. + """ + with self.lock: + labels = tags # gcp uses "labels" instead of aws "tags" + + node_type = get_node_type(base_config) + resource = self.resources[node_type] + + all_nodes = {} + if self.cache_stopped_nodes: + filters = { + "ray-node-name": labels["ray-node-name"], + "ray-node-type": labels["ray-node-type"], + "ray-user-node-type": labels["ray-user-node-type"], + } + reuse_nodes = resource.list_instances(filters, True)[:count] + if reuse_nodes: + reused_nodes_dict = { + n["name"]: resource.start_instance(n["name"]) + for n in reuse_nodes + } + all_nodes.update(reused_nodes_dict) + count -= len(reuse_nodes) + + if count > 0: + results: List[Tuple[dict, str]] = resource.create_instances( + base_config, labels, count + ) + + created_nodes_dict = { + instance_id: result for result, instance_id in results + } + all_nodes.update(created_nodes_dict) + + return all_nodes + + def _thread_unsafe_terminate_node(self, node_id: str): + # Assumes the global lock is held for the duration of this operation. + # The lock may be held by a different thread if in `terminate_nodes()` case. + logger.info("NodeProvider: {}: Terminating node".format(node_id)) + resource = self._get_resource_depending_on_node_name(node_id) + try: + result = resource.delete_instance( + node_id=node_id, + ) + except googleapiclient.errors.HttpError as http_error: + if http_error.resp.status == 404: + logger.warning( + f"Tried to delete the node with id {node_id} " + "but it was already gone." + ) + result = None + else: + raise http_error from None + return result + + @_retry + def terminate_node(self, node_id: str): + with self.lock: + resource = self._get_resource_depending_on_node_name(node_id) + try: + if self.cache_stopped_nodes: + node = self._get_cached_node(node_id) + if node.is_running(): + result = resource.stop_instance(node_id=node_id) + else: + result = None + else: + result = resource.delete_instance( + node_id=node_id, + ) + except googleapiclient.errors.HttpError as http_error: + if http_error.resp.status == 404: + logger.warning( + f"Tried to delete the node with id {node_id} " + "but it was already gone." + ) + else: + raise http_error from None + return result + + @_retry + def _get_node(self, node_id: str) -> GCPNode: + self.non_terminated_nodes({}) # Side effect: updates cache + + with self.lock: + if node_id in self.cached_nodes: + return self.cached_nodes[node_id] + + resource = self._get_resource_depending_on_node_name(node_id) + instance = resource.get_instance(node_id=node_id) + + return instance + + def _get_cached_node(self, node_id: str) -> GCPNode: + if node_id in self.cached_nodes: + return self.cached_nodes[node_id] + + return self._get_node(node_id) + + @staticmethod + def bootstrap_config(cluster_config): + return bootstrap_gcp(cluster_config) + + @staticmethod + def fillout_available_node_types_resources( + cluster_config: Dict[str, Any] + ) -> Dict[str, Any]: + """Fill out TPU resources to the cluster config. + + To enable TPU pod autoscaling, we provide the TPU accelerator + type as a resource that only exists on worker 0 of the pod slice. + For instance, a v4-16 should have the resource labels: + worker 0: resources = {"TPU": 4, "TPU-v4-16-head": 1} + worker 1: resources = {"TPU": 4} + + For the autoscaler to correctly process the demands of + creating a new TPU pod, then the autoscaler must know what + a TPU pod is in the form of the TPU accelerator resource. + + Therefore we fill out TPU pods appropriately by providing the + expected resource which we can deduce from the cluster config. + + """ + if "available_node_types" not in cluster_config: + return cluster_config + cluster_config = copy.deepcopy(cluster_config) + available_node_types = cluster_config["available_node_types"] + for node_type in available_node_types: + node_config = available_node_types[node_type]["node_config"] + if get_node_type(node_config) == GCPNodeType.TPU: + autodetected_resources = {} + accelerator_type = "" + if "acceleratorType" in node_config: + accelerator_type = node_config["acceleratorType"] + elif "acceleratorConfig" in node_config: + accelerator_type = tpu_accelerator_config_to_type( + node_config["acceleratorConfig"] + ) + if not accelerator_type: + continue + autodetected_resources[f"TPU-{accelerator_type}-head"] = 1 + available_node_types[node_type]["resources"].update( + autodetected_resources + ) + return cluster_config + + def get_command_runner( + self, + log_prefix: str, + node_id: str, + auth_config: Dict[str, Any], + cluster_name: str, + process_runner: ModuleType, + use_internal_ip: bool, + docker_config: Optional[Dict[str, Any]] = None, + ) -> CommandRunnerInterface: + """Returns a TPU command runner as applicable.""" + resource = self._get_resource_depending_on_node_name(node_id) + instance = resource.get_instance(node_id) + common_args = { + "docker_config": docker_config, + "log_prefix": log_prefix, + "node_id": node_id, + "auth_config": auth_config, + "cluster_name": cluster_name, + "process_runner": process_runner, + "use_internal_ip": use_internal_ip, + } + if ( + GCPNodeType.TPU in self.resources + and resource == self.resources[GCPNodeType.TPU] + ): + return TPUCommandRunner(instance=instance, provider=self, **common_args) + else: + return super().get_command_runner(**common_args) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/tpu_command_runner.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/tpu_command_runner.py new file mode 100644 index 0000000000000000000000000000000000000000..b27920863a19f82e217927b903dd4a7c3a085bbd --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/gcp/tpu_command_runner.py @@ -0,0 +1,328 @@ +"""Command runners specific to TPU VM pods. + +TPU VM pods may contain multiple hosts, each including attached TPU chips and +associated internal/external IP addresses. + +To support TPU VM pods, we represent entire TPU pods as "Ray Nodes", meaning +that TPU pods will need to run the operations specified in `CommandRunnerInterface` +N times, where N denotes the number of hosts that comprise a TPU pod. + +To maintain feature completeness, we simply wrap the existing `SSHCommandRunner` and +`DockerCommandRunner` and run them as batched calls. + +""" +import copy +from concurrent.futures import ThreadPoolExecutor +from types import ModuleType +from typing import Any, Dict, Optional + +from ray._private import ray_constants +from ray.autoscaler._private.command_runner import DockerCommandRunner, SSHCommandRunner +from ray.autoscaler._private.gcp.node import GCPTPUNode +from ray.autoscaler.command_runner import CommandRunnerInterface +from ray.autoscaler.node_provider import NodeProvider + + +class TPUVMSSHCommandRunner(SSHCommandRunner): + """An SSH command runner with overwritten IP address calls.""" + + def __init__( + self, + internal_ip: str, + external_ip: str, + worker_id: int, + accelerator_type: str, + *args, + **kwargs, + ): + self._internal_ip = internal_ip + self._external_ip = external_ip + self._worker_id = worker_id + self._accelerator_type = accelerator_type + super().__init__(*args, **kwargs) + + def _get_node_ip(self) -> str: + if self.use_internal_ip: + return self._internal_ip + else: + return self._external_ip + + def run( + self, + cmd, + timeout=120, + exit_on_fail=False, + port_forward=None, + with_output=False, + environment_variables: Dict[str, object] = None, + run_env="auto", # Unused argument. + ssh_options_override_ssh_key="", + shutdown_after_run=False, + ) -> str: + """Override the SSH run for TPU VM pods. + + Main functionality here we need to inject is to intercept the resources + provided by the node_provider TPU node type fillout. + + node_provider will provide a resource "TPU-{TPU_POD_TYPE}-head" which: + 1) allows application developers to target worker 0 of an arbitary TPU pod, and + 2) signals to the autoscaler how to address the demand for more TPU pods. + + Without this intercept, then all workers of a TPU pod will have the + "TPU-{TPU_POD_TYPE}-head" resource which will violate functionality (1) + above. + + """ + + if environment_variables: + environment_variables = _maybe_remove_head_resource( + environment_variables, self._worker_id, self._accelerator_type + ) + + return super().run( + cmd=cmd, + timeout=timeout, + exit_on_fail=exit_on_fail, + port_forward=port_forward, + with_output=with_output, + environment_variables=environment_variables, + run_env=run_env, + ssh_options_override_ssh_key=ssh_options_override_ssh_key, + shutdown_after_run=shutdown_after_run, + ) + + +class TPUVMDockerCommandRunner(DockerCommandRunner): + """A Docker command runner with overwritten IP addresses.""" + + def __init__( + self, + docker_config: Dict[str, Any], + internal_ip: str, + external_ip: str, + worker_id: int, + accelerator_type: str, + **common_args, + ): + super().__init__(docker_config=docker_config, **common_args) + self._worker_id = worker_id + self._accelerator_type = accelerator_type + + self.ssh_command_runner = TPUVMSSHCommandRunner( + internal_ip=internal_ip, + external_ip=external_ip, + worker_id=worker_id, + accelerator_type=accelerator_type, + **common_args, + ) + + def run( + self, + cmd, + timeout=120, + exit_on_fail=False, + port_forward=None, + with_output=False, + environment_variables: Optional[Dict[str, object]] = None, + run_env="auto", + ssh_options_override_ssh_key="", + shutdown_after_run=False, + ): + if environment_variables: + environment_variables = _maybe_remove_head_resource( + environment_variables, self._worker_id, self._accelerator_type + ) + return super().run( + cmd, + timeout, + exit_on_fail, + port_forward, + with_output, + environment_variables, + run_env, + ssh_options_override_ssh_key, + shutdown_after_run, + ) + + +class TPUCommandRunner(CommandRunnerInterface): + """A TPU pod command runner.""" + + def __init__( + self, + instance: GCPTPUNode, + log_prefix: str, + node_id: str, + auth_config: Dict[str, Any], + provider: NodeProvider, + cluster_name: str, + process_runner: ModuleType, + use_internal_ip: bool, + docker_config: Optional[Dict[str, Any]] = None, + ): + def create_command_runner( + worker_id: int, accelerator_type: str, internal_ip: str, external_ip: str + ) -> CommandRunnerInterface: + """Returns the correct base command runner.""" + + common_args = { + "internal_ip": internal_ip, + "external_ip": external_ip, + "worker_id": worker_id, + "accelerator_type": accelerator_type, + "log_prefix": "[tpu_worker_{}] ".format(worker_id) + log_prefix, + "node_id": node_id, + "provider": provider, + "auth_config": auth_config, + "cluster_name": cluster_name, + "process_runner": process_runner, + "use_internal_ip": use_internal_ip, + } + if docker_config and docker_config["container_name"] != "": + return TPUVMDockerCommandRunner( + docker_config=docker_config, **common_args + ) + else: + return TPUVMSSHCommandRunner(**common_args) + + self._command_runners = [] + self._num_workers = instance.num_workers + for i in range(self._num_workers): + self._command_runners.append( + create_command_runner( + worker_id=i, + accelerator_type=instance.get("acceleratorType"), + internal_ip=instance.get_internal_ip(i), + external_ip=instance.get_external_ip(i), + ) + ) + + @property + def num_connections(self) -> int: + """Return the number of active connections allowed at a time. + + We occasionally see issues where too many concurrent connections may lead to + failed SSH connections when there are too many TPU hosts. + + We utilize this property to cap the maximum number of active connections + at a time until a proper fix is found. + + """ + num_max_concurrent_active_connections = ray_constants.env_integer( + ray_constants.RAY_TPU_MAX_CONCURRENT_CONNECTIONS_ENV_VAR, default=16 + ) + return min(self._num_workers, num_max_concurrent_active_connections) + + def run( + self, + cmd, + timeout=120, + exit_on_fail=False, + port_forward=None, + with_output=False, + environment_variables: Dict[str, object] = None, + run_env="auto", # Unused argument. + ssh_options_override_ssh_key="", + shutdown_after_run=False, + ) -> str: + with ThreadPoolExecutor(self.num_connections) as executor: + results = executor.map( + lambda i: self._command_runners[i].run( + cmd=cmd, + timeout=timeout, + exit_on_fail=exit_on_fail, + port_forward=port_forward, + with_output=with_output, + environment_variables=copy.deepcopy(environment_variables), + run_env=run_env, + ssh_options_override_ssh_key=ssh_options_override_ssh_key, + shutdown_after_run=shutdown_after_run, + ), + range(self._num_workers), + ) + # Note: the `run` abstract function may return a string representing + # representing command output, but this result is rarely used - especially + # if the node is a worker (which a TPU pod is). + # We return only the results from worker 0 which may not always be expected. + return list(results)[0] + + def run_rsync_up(self, *args, **kwargs) -> None: + with ThreadPoolExecutor(self.num_connections) as executor: + executor.map( + lambda i: self._command_runners[i].run_rsync_up(*args, **kwargs), + range(self._num_workers), + ) + + def run_rsync_down(self, *args, **kwargs) -> None: + """Rsync files down from the cluster node. + + Args: + source: The (remote) source directory or file. + target: The (local) destination path. + """ + with ThreadPoolExecutor(self.num_connections) as executor: + executor.map( + lambda i: self._command_runners[i].run_rsync_down(*args, **kwargs), + range(self._num_workers), + ) + + def remote_shell_command_str(self) -> str: + """Return the command the user can use to open a shell.""" + # Note: this function is rarely used if the node is a worker. + # We return only the results from worker 0 which may not always be expected. + return self._command_runners[0].remote_shell_command_str() + + def run_init(self, *args, **kwargs) -> Optional[bool]: + """Used to run extra initialization commands. + + Args: + as_head: Run as head image or worker. + file_mounts: Files to copy to the head and worker nodes. + sync_run_yet: Whether sync has been run yet. + + Returns: + optional: Whether initialization is necessary. + """ + with ThreadPoolExecutor(self.num_connections) as executor: + results = executor.map( + lambda i: self._command_runners[i].run_init(*args, **kwargs), + range(self._num_workers), + ) + # Note: the `run_init` abstract function may return a bool representing + # whether initialization is necessary, but this result is rarely used - + # especially if the node is a worker (which a TPU pod is). + # Here we return whether any workers require initialization, which may not be + # the expected result. + return any(results) + + +def _maybe_remove_head_resource( + environment_variables: Dict[str, Any], worker_id: int, accelerator_type: str +): + """ + node_provider will provide a resource "TPU-{TPU_POD_TYPE}-head" which: + 1) allows application developers to target worker 0 of an arbitary TPU pod, and + 2) signals to the autoscaler how to address the demand for more TPU pods. + + Without this intercept, then all workers of a TPU pod will have the + "TPU-{TPU_POD_TYPE}-head" resource which will violate functionality (1) + above. + """ + resources = environment_variables.get( + ray_constants.RESOURCES_ENVIRONMENT_VARIABLE, None + ) + + if resources: + # For TPU pod support, we need to ensure that the + # tpu pod resource type only propagates to worker 0. + if worker_id != 0: + tpu_pod_resource_type = f"TPU-{accelerator_type}-head" + if tpu_pod_resource_type in resources: + resources = copy.copy(resources) + resources.pop(tpu_pod_resource_type, None) + environment_variables = { + **environment_variables, + ray_constants.RESOURCES_ENVIRONMENT_VARIABLE: resources, + } + + return environment_variables diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..46b8cee9b3b67b9cc15ad4a68d2b8af24057d413 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/autoscaling_config.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/autoscaling_config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0955e4e0365e2c93a39623602a059b029fc383af Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/autoscaling_config.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..10e7fc3e6ed2e04242e0cd31eec3b851e86d3567 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/run_autoscaler.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/run_autoscaler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b8fd0bd2916fa74a641d542195f5a44857bb70e6 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/run_autoscaler.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd06f5686b022059cf4408a7778469e58a6f4921 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/__pycache__/utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/autoscaling_config.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/autoscaling_config.py new file mode 100644 index 0000000000000000000000000000000000000000..8960dd2df89f3e0887a2af0d525ec9810149b174 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/autoscaling_config.py @@ -0,0 +1,440 @@ +import decimal +import json +import logging +import time +from itertools import chain +from typing import Any, Dict, Optional + +import requests + +from ray.autoscaler._private.constants import ( + DISABLE_LAUNCH_CONFIG_CHECK_KEY, + DISABLE_NODE_UPDATERS_KEY, + FOREGROUND_NODE_LAUNCH_KEY, + WORKER_LIVENESS_CHECK_KEY, +) +from ray.autoscaler._private.kuberay import node_provider, utils +from ray.autoscaler._private.util import validate_config + +logger = logging.getLogger(__name__) + +AUTOSCALER_OPTIONS_KEY = "autoscalerOptions" +IDLE_SECONDS_KEY = "idleTimeoutSeconds" +UPSCALING_KEY = "upscalingMode" +UPSCALING_VALUE_AGGRESSIVE = "Aggressive" +UPSCALING_VALUE_DEFAULT = "Default" +UPSCALING_VALUE_CONSERVATIVE = "Conservative" + +MAX_RAYCLUSTER_FETCH_TRIES = 5 +RAYCLUSTER_FETCH_RETRY_S = 5 + +GKE_TPU_TOPOLOGY_LABEL = "cloud.google.com/gke-tpu-topology" +GKE_TPU_ACCELERATOR_LABEL = "cloud.google.com/gke-tpu-accelerator" + +# Logical group name for the KubeRay head group. +# Used as the name of the "head node type" by the autoscaler. +_HEAD_GROUP_NAME = "headgroup" + + +class AutoscalingConfigProducer: + """Produces an autoscaling config by reading data from the RayCluster CR. + + Used to fetch the autoscaling config at the beginning of each autoscaler iteration. + + In the context of Ray deployment on Kubernetes, the autoscaling config is an + internal interface. + + The autoscaling config carries the strict subset of RayCluster CR data required by + the autoscaler to make scaling decisions; in particular, the autoscaling config does + not carry pod configuration data. + + This class is the only public object in this file. + """ + + def __init__(self, ray_cluster_name, ray_cluster_namespace): + self.kubernetes_api_client = node_provider.KubernetesHttpApiClient( + namespace=ray_cluster_namespace + ) + self._ray_cr_path = f"rayclusters/{ray_cluster_name}" + + def __call__(self): + ray_cr = self._fetch_ray_cr_from_k8s_with_retries() + autoscaling_config = _derive_autoscaling_config_from_ray_cr(ray_cr) + return autoscaling_config + + def _fetch_ray_cr_from_k8s_with_retries(self) -> Dict[str, Any]: + """Fetch the RayCluster CR by querying the K8s API server. + + Retry on HTTPError for robustness, in particular to protect autoscaler + initialization. + """ + for i in range(1, MAX_RAYCLUSTER_FETCH_TRIES + 1): + try: + return self.kubernetes_api_client.get(self._ray_cr_path) + except requests.HTTPError as e: + if i < MAX_RAYCLUSTER_FETCH_TRIES: + logger.exception( + "Failed to fetch RayCluster CR from K8s. Retrying." + ) + time.sleep(RAYCLUSTER_FETCH_RETRY_S) + else: + raise e from None + + # This branch is inaccessible. Raise to satisfy mypy. + raise AssertionError + + +def _derive_autoscaling_config_from_ray_cr(ray_cr: Dict[str, Any]) -> Dict[str, Any]: + provider_config = _generate_provider_config(ray_cr["metadata"]["namespace"]) + + available_node_types = _generate_available_node_types_from_ray_cr_spec( + ray_cr["spec"] + ) + + # The autoscaler expects a global max workers field. We set it to the sum of + # node type max workers. + global_max_workers = sum( + node_type["max_workers"] for node_type in available_node_types.values() + ) + + # Legacy autoscaling fields carry no information but are required for compatibility. + legacy_autoscaling_fields = _generate_legacy_autoscaling_config_fields() + + # Process autoscaler options. + autoscaler_options = ray_cr["spec"].get(AUTOSCALER_OPTIONS_KEY, {}) + if IDLE_SECONDS_KEY in autoscaler_options: + idle_timeout_minutes = autoscaler_options[IDLE_SECONDS_KEY] / 60.0 + else: + idle_timeout_minutes = 1.0 + + if autoscaler_options.get(UPSCALING_KEY) == UPSCALING_VALUE_CONSERVATIVE: + upscaling_speed = 1 # Rate-limit upscaling if "Conservative" is set by user. + # This elif is redudant but included for clarity. + elif autoscaler_options.get(UPSCALING_KEY) == UPSCALING_VALUE_DEFAULT: + upscaling_speed = 1000 # i.e. big, no rate-limiting by default + # This elif is redudant but included for clarity. + elif autoscaler_options.get(UPSCALING_KEY) == UPSCALING_VALUE_AGGRESSIVE: + upscaling_speed = 1000 + else: + upscaling_speed = 1000 + + autoscaling_config = { + "provider": provider_config, + "cluster_name": ray_cr["metadata"]["name"], + "head_node_type": _HEAD_GROUP_NAME, + "available_node_types": available_node_types, + "max_workers": global_max_workers, + # Should consider exposing `idleTimeoutMinutes` in the RayCluster CRD, + # under an `autoscaling` field. + "idle_timeout_minutes": idle_timeout_minutes, + # Should consider exposing `upscalingSpeed` in the RayCluster CRD, + # under an `autoscaling` field. + "upscaling_speed": upscaling_speed, + **legacy_autoscaling_fields, + } + + # Make sure the config is readable by the autoscaler. + validate_config(autoscaling_config) + + return autoscaling_config + + +def _generate_provider_config(ray_cluster_namespace: str) -> Dict[str, Any]: + """Generates the `provider` field of the autoscaling config, which carries data + required to instantiate the KubeRay node provider. + """ + return { + "type": "kuberay", + "namespace": ray_cluster_namespace, + DISABLE_NODE_UPDATERS_KEY: True, + DISABLE_LAUNCH_CONFIG_CHECK_KEY: True, + FOREGROUND_NODE_LAUNCH_KEY: True, + WORKER_LIVENESS_CHECK_KEY: False, + } + + +def _generate_legacy_autoscaling_config_fields() -> Dict[str, Any]: + """Generates legacy autoscaling config fields required for compatibiliy.""" + return { + "file_mounts": {}, + "cluster_synced_files": [], + "file_mounts_sync_continuously": False, + "initialization_commands": [], + "setup_commands": [], + "head_setup_commands": [], + "worker_setup_commands": [], + "head_start_ray_commands": [], + "worker_start_ray_commands": [], + "auth": {}, + } + + +def _generate_available_node_types_from_ray_cr_spec( + ray_cr_spec: Dict[str, Any], +) -> Dict[str, Any]: + """Formats autoscaler "available_node_types" field based on the Ray CR's group + specs. + """ + headGroupSpec = ray_cr_spec["headGroupSpec"] + return { + _HEAD_GROUP_NAME: _node_type_from_group_spec(headGroupSpec, is_head=True), + **{ + worker_group_spec["groupName"]: _node_type_from_group_spec( + worker_group_spec, is_head=False + ) + for worker_group_spec in ray_cr_spec["workerGroupSpecs"] + }, + } + + +def _node_type_from_group_spec( + group_spec: Dict[str, Any], is_head: bool +) -> Dict[str, Any]: + """Converts CR group spec to autoscaler node type.""" + if is_head: + # The head node type has no workers because the head is not a worker. + min_workers = max_workers = 0 + else: + # `minReplicas` and `maxReplicas` are required fields for each workerGroupSpec. + # numOfHosts specifies the number of workers per replica in KubeRay v1.1+. + min_workers = group_spec["minReplicas"] * group_spec.get("numOfHosts", 1) + max_workers = group_spec["maxReplicas"] * group_spec.get("numOfHosts", 1) + + resources = _get_ray_resources_from_group_spec(group_spec, is_head) + + node_type = { + "min_workers": min_workers, + "max_workers": max_workers, + # `node_config` is a legacy field required for compatibility. + # Pod config data is required by the operator but not by the autoscaler. + "node_config": {}, + "resources": resources, + } + + idle_timeout_s = group_spec.get(IDLE_SECONDS_KEY) + if idle_timeout_s is not None: + node_type["idle_timeout_s"] = float(idle_timeout_s) + + return node_type + + +def _get_ray_resources_from_group_spec( + group_spec: Dict[str, Any], is_head: bool +) -> Dict[str, int]: + """ + Infers Ray resources from rayStartCommands and K8s limits. + The resources extracted are used in autoscaling calculations. + + TODO: Expose a better interface in the RayCluster CRD for Ray resource annotations. + For now, we take the rayStartParams as the primary source of truth. + """ + ray_start_params = group_spec.get("rayStartParams", {}) + # In KubeRay, Ray container is always the first application container of a Ray Pod. + k8s_resources = group_spec["template"]["spec"]["containers"][0].get("resources", {}) + group_name = _HEAD_GROUP_NAME if is_head else group_spec["groupName"] + + num_cpus = _get_num_cpus(ray_start_params, k8s_resources, group_name) + num_gpus = _get_num_gpus(ray_start_params, k8s_resources, group_name) + custom_resource_dict = _get_custom_resources(ray_start_params, group_name) + num_tpus = _get_num_tpus(custom_resource_dict, k8s_resources) + memory = _get_memory(ray_start_params, k8s_resources) + + # It's not allowed to use object store memory as a resource request, so we don't + # add that to the autoscaler's resources annotations. + + resources = {} + + assert isinstance(num_cpus, int) + resources["CPU"] = num_cpus + + if num_gpus is not None: + resources["GPU"] = num_gpus + + if num_tpus is not None: + # Add TPU Ray resource if not already added by ray_start_params, + # but specified in k8s_resource_limits. + if "TPU" not in custom_resource_dict: + resources["TPU"] = num_tpus + + """Add TPU head resource, similar to the GCP node_provider. + Sets the Ray resource TPU-{...}-head to ensure the Ray autoscaler + has sufficient resources to make scaling decisions. + TPU worker groups treat each TPU podslice as a replica, with `NumOfHosts` + specifying the number of workers per slice. Each replica of a TPU worker + group has one TPU head. + + For example, a v4-16 worker group with 2 replicas should have the following + resource labels on worker 0 of each replica: + worker 0: resources = {"TPU": 4, "TPU-v4-16-head": 1} + """ + if ( + "nodeSelector" in group_spec["template"]["spec"] + and GKE_TPU_TOPOLOGY_LABEL in group_spec["template"]["spec"]["nodeSelector"] + and GKE_TPU_ACCELERATOR_LABEL + in group_spec["template"]["spec"]["nodeSelector"] + ): + topology = group_spec["template"]["spec"]["nodeSelector"][ + GKE_TPU_TOPOLOGY_LABEL + ] + accelerator = group_spec["template"]["spec"]["nodeSelector"][ + GKE_TPU_ACCELERATOR_LABEL + ] + accelerator_type = utils.tpu_node_selectors_to_type(topology, accelerator) + if accelerator_type: + resources[f"TPU-{accelerator_type}-head"] = 1 + else: + logger.error( + f"Pods using TPUs require both `{GKE_TPU_TOPOLOGY_LABEL}` and `{GKE_TPU_ACCELERATOR_LABEL}` node selectors. " + "See https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/tpu.html#configuring-ray-pods-for-tpu-usage " + "and https://cloud.google.com/kubernetes-engine/docs/how-to/tpus." + ) + + if memory is not None: + resources["memory"] = memory + + resources.update(custom_resource_dict) + + return resources + + +def _get_num_cpus( + ray_start_params: Dict[str, str], + k8s_resources: Dict[str, Dict[str, str]], + group_name: str, +) -> int: + """Get CPU annotation from ray_start_params or k8s_resources, + with priority for ray_start_params. + """ + if "num-cpus" in ray_start_params: + return int(ray_start_params["num-cpus"]) + elif "cpu" in k8s_resources.get("limits", {}): + cpu_quantity: str = k8s_resources["limits"]["cpu"] + return _round_up_k8s_quantity(cpu_quantity) + elif "cpu" in k8s_resources.get("requests", {}): + cpu_quantity: str = k8s_resources["requests"]["cpu"] + return _round_up_k8s_quantity(cpu_quantity) + else: + # Getting the number of CPUs is important, so raise an error if we can't do it. + raise ValueError( + f"Autoscaler failed to detect `CPU` resources for group {group_name}." + "\nSet the `--num-cpus` rayStartParam and/or " + "the CPU resource limit for the Ray container." + ) + + +def _get_memory( + ray_start_params: Dict[str, str], k8s_resources: Dict[str, Dict[str, str]] +) -> Optional[int]: + """Get memory resource annotation from ray_start_params or k8s_resources, + with priority for ray_start_params. + """ + if "memory" in ray_start_params: + return int(ray_start_params["memory"]) + elif "memory" in k8s_resources.get("limits", {}): + memory_quantity: str = k8s_resources["limits"]["memory"] + return _round_up_k8s_quantity(memory_quantity) + elif "memory" in k8s_resources.get("requests", {}): + memory_quantity: str = k8s_resources["requests"]["memory"] + return _round_up_k8s_quantity(memory_quantity) + return None + + +def _get_num_gpus( + ray_start_params: Dict[str, str], + k8s_resources: Dict[str, Dict[str, str]], + group_name: str, +) -> Optional[int]: + """Get memory resource annotation from ray_start_params or k8s_resources, + with priority for ray_start_params. + """ + + if "num-gpus" in ray_start_params: + return int(ray_start_params["num-gpus"]) + else: + for key, resource_quantity in chain( + k8s_resources.get("limits", {}).items(), + k8s_resources.get("requests", {}).items(), + ): + # e.g. nvidia.com/gpu + if key.endswith("gpu"): + # Typically, this is a string representing an interger, e.g. "1". + # Convert to int, making no assumptions on the resource_quantity, + # besides that it's valid as a K8s resource quantity. + num_gpus = _round_up_k8s_quantity(resource_quantity) + if num_gpus > 0: + # Only one GPU type supported for now, break out on first + # "/gpu" match. + return num_gpus + return None + + +def _get_num_tpus( + custom_resource_dict: Dict[str, int], + k8s_resources: Dict[str, Dict[str, str]], +) -> Optional[int]: + """Get TPU custom resource annotation from custom_resource_dict in ray_start_params, + or k8s_resources, with priority for custom_resource_dict. + """ + if "TPU" in custom_resource_dict: + return custom_resource_dict["TPU"] + else: + for typ in ["limits", "requests"]: + tpu_resource_quantity = k8s_resources.get(typ, {}).get("google.com/tpu") + if tpu_resource_quantity is not None: + # Typically, this is a string representing an integer, e.g. "1". + # Convert to int, making no assumptions on the tpu_resource_quantity, + # besides that it's valid as a K8s resource quantity. + num_tpus = _round_up_k8s_quantity(tpu_resource_quantity) + if num_tpus > 0: + return num_tpus + return None + + +def _round_up_k8s_quantity(quantity: str) -> int: + """Rounds a Kubernetes resource quantity up to the nearest integer. + + Args: + quantity: Resource quantity as a string in the canonical K8s form. + + Returns: + The quantity, rounded up, as an integer. + """ + resource_decimal: decimal.Decimal = utils.parse_quantity(quantity) + rounded = resource_decimal.to_integral_value(rounding=decimal.ROUND_UP) + return int(rounded) + + +def _get_custom_resources( + ray_start_params: Dict[str, Any], group_name: str +) -> Dict[str, int]: + """Format custom resources based on the `resources` Ray start param. + + Currently, the value of the `resources` field must + be formatted as follows: + '"{\"Custom1\": 1, \"Custom2\": 5}"'. + + This method first converts the input to a correctly formatted + json string and then loads that json string to a dict. + """ + if "resources" not in ray_start_params: + return {} + resources_string = ray_start_params["resources"] + try: + # Drop the extra pair of quotes and remove the backslash escapes. + # resources_json should be a json string. + resources_json = resources_string[1:-1].replace("\\", "") + # Load a dict from the json string. + resources = json.loads(resources_json) + assert isinstance(resources, dict) + for key, value in resources.items(): + assert isinstance(key, str) + assert isinstance(value, int) + except Exception as e: + logger.error( + f"Error reading `resource` rayStartParam for group {group_name}." + " For the correct format, refer to example configuration at " + "https://github.com/ray-project/ray/blob/master/python/" + "ray/autoscaler/kuberay/ray-cluster.complete.yaml." + ) + raise e + return resources diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..b62b5ca78fa220d2dc99de17728b4d6e1a068db1 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/node_provider.py @@ -0,0 +1,537 @@ +import datetime +import json +import logging +import os +from abc import ABC, abstractmethod +from collections import defaultdict +from typing import Any, Dict, List, Optional, Tuple + +import requests + +from ray.autoscaler._private.constants import WORKER_LIVENESS_CHECK_KEY +from ray.autoscaler._private.util import NodeID, NodeIP, NodeKind, NodeStatus, NodeType +from ray.autoscaler.batching_node_provider import ( + BatchingNodeProvider, + NodeData, + ScaleRequest, +) +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + NODE_KIND_WORKER, + STATUS_UP_TO_DATE, + STATUS_UPDATE_FAILED, + TAG_RAY_USER_NODE_TYPE, +) +from ray._common.network_utils import build_address + +# Key for KubeRay label that identifies a Ray pod as head or worker. +KUBERAY_LABEL_KEY_KIND = "ray.io/node-type" +# Key for KubeRay label that identifies the worker group (autoscaler node type) of a +# Ray pod. +KUBERAY_LABEL_KEY_TYPE = "ray.io/group" + +# These should be synced with: +# https://github.com/ray-project/kuberay/blob/f2d94ffe213dd8f69481b09c474047cb899fa73b/ray-operator/apis/ray/v1/raycluster_types.go#L165-L171 # noqa +# Kind label value indicating the pod is the head. +KUBERAY_KIND_HEAD = "head" +# Kind label value indicating the pod is the worker. +KUBERAY_KIND_WORKER = "worker" + +# KubeRay CRD version +KUBERAY_CRD_VER = os.getenv("KUBERAY_CRD_VER", "v1alpha1") + +KUBERAY_REQUEST_TIMEOUT_S = int(os.getenv("KUBERAY_REQUEST_TIMEOUT_S", 60)) + +RAY_HEAD_POD_NAME = os.getenv("RAY_HEAD_POD_NAME") + +# https://kubernetes.io/docs/tasks/run-application/access-api-from-pod +# While running in a Pod, your container can create an HTTPS URL for the +# Kubernetes API server by fetching the KUBERNETES_SERVICE_HOST and +# KUBERNETES_SERVICE_PORT_HTTPS environment variables. +KUBERNETES_SERVICE_HOST = os.getenv( + "KUBERNETES_SERVICE_HOST", "https://kubernetes.default" +) +KUBERNETES_SERVICE_PORT = os.getenv("KUBERNETES_SERVICE_PORT_HTTPS", "443") +KUBERNETES_HOST = build_address(KUBERNETES_SERVICE_HOST, KUBERNETES_SERVICE_PORT) +# Key for GKE label that identifies which multi-host replica a pod belongs to +REPLICA_INDEX_KEY = "replicaIndex" + +TOKEN_REFRESH_PERIOD = datetime.timedelta(minutes=1) + +# Design: + +# Each modification the autoscaler wants to make is posted to the API server goal state +# (e.g. if the autoscaler wants to scale up, it increases the number of +# replicas of the worker group it wants to scale, if it wants to scale down +# it decreases the number of replicas and adds the exact pods that should be +# terminated to the scaleStrategy). + +# KubeRayNodeProvider inherits from BatchingNodeProvider. +# Thus, the autoscaler's create and terminate requests are batched into a single +# Scale Request object which is submitted at the end of autoscaler update. +# KubeRay node provider converts the ScaleRequest into a RayCluster CR patch +# and applies the patch in the submit_scale_request method. + +# To reduce potential for race conditions, KubeRayNodeProvider +# aborts the autoscaler update if the operator has not yet processed workersToDelete - +# see KubeRayNodeProvider.safe_to_scale(). +# Once it is confirmed that workersToDelete have been cleaned up, KubeRayNodeProvider +# clears the workersToDelete list. + + +# Note: Log handlers set up in autoscaling monitor entrypoint. +logger = logging.getLogger(__name__) + + +def node_data_from_pod(pod: Dict[str, Any]) -> NodeData: + """Converts a Ray pod extracted from K8s into Ray NodeData. + NodeData is processed by BatchingNodeProvider. + """ + kind, type = kind_and_type(pod) + status = status_tag(pod) + ip = pod_ip(pod) + replica_index = _replica_index_label(pod) + return NodeData( + kind=kind, type=type, replica_index=replica_index, status=status, ip=ip + ) + + +def kind_and_type(pod: Dict[str, Any]) -> Tuple[NodeKind, NodeType]: + """Determine Ray node kind (head or workers) and node type (worker group name) + from a Ray pod's labels. + """ + labels = pod["metadata"]["labels"] + kind = ( + NODE_KIND_HEAD + if labels[KUBERAY_LABEL_KEY_KIND] == KUBERAY_KIND_HEAD + else NODE_KIND_WORKER + ) + type = labels[KUBERAY_LABEL_KEY_TYPE] + return kind, type + + +def _replica_index_label(pod: Dict[str, Any]) -> Optional[str]: + """Returns the replicaIndex label for a Pod in a multi-host TPU worker group. + The replicaIndex label is set by the GKE TPU Ray webhook and is of + the form {$WORKER_GROUP_NAME-$REPLICA_INDEX} where $REPLICA_INDEX + is an integer from 0 to Replicas-1. + """ + labels = pod["metadata"]["labels"] + return labels.get(REPLICA_INDEX_KEY, None) + + +def pod_ip(pod: Dict[str, Any]) -> NodeIP: + return pod["status"].get("podIP", "IP not yet assigned") + + +def status_tag(pod: Dict[str, Any]) -> NodeStatus: + """Convert pod state to Ray autoscaler node status. + + See the doc string of the class + batching_node_provider.NodeData for the semantics of node status. + """ + if ( + "containerStatuses" not in pod["status"] + or not pod["status"]["containerStatuses"] + ): + return "pending" + + state = pod["status"]["containerStatuses"][0]["state"] + + if "pending" in state: + return "pending" + if "running" in state: + return STATUS_UP_TO_DATE + if "waiting" in state: + return "waiting" + if "terminated" in state: + return STATUS_UPDATE_FAILED + raise ValueError("Unexpected container state.") + + +def worker_delete_patch(group_index: str, workers_to_delete: List[NodeID]): + path = f"/spec/workerGroupSpecs/{group_index}/scaleStrategy" + value = {"workersToDelete": workers_to_delete} + return replace_patch(path, value) + + +def worker_replica_patch(group_index: str, target_replicas: int): + path = f"/spec/workerGroupSpecs/{group_index}/replicas" + value = target_replicas + return replace_patch(path, value) + + +def replace_patch(path: str, value: Any) -> Dict[str, Any]: + return {"op": "replace", "path": path, "value": value} + + +def load_k8s_secrets() -> Tuple[Dict[str, str], str]: + """ + Loads secrets needed to access K8s resources. + + Returns: + headers: Headers with K8s access token + verify: Path to certificate + """ + with open("/var/run/secrets/kubernetes.io/serviceaccount/token") as secret: + token = secret.read() + + headers = { + "Authorization": "Bearer " + token, + } + verify = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + + return headers, verify + + +def url_from_resource( + namespace: str, + path: str, + kuberay_crd_version: str = KUBERAY_CRD_VER, + kubernetes_host: str = KUBERNETES_HOST, +) -> str: + """Convert resource path to REST URL for Kubernetes API server. + + Args: + namespace: The K8s namespace of the resource + path: The part of the resource path that starts with the resource type. + Supported resource types are "pods" and "rayclusters". + kuberay_crd_version: The API version of the KubeRay CRD. + Looks like "v1alpha1", "v1". + kubernetes_host: The host of the Kubernetes API server. + Uses $KUBERNETES_SERVICE_HOST and + $KUBERNETES_SERVICE_PORT to construct the kubernetes_host if not provided. + + When set by Kubernetes, + $KUBERNETES_SERVICE_HOST could be an IP address. That's why the https + scheme is added here. + + Defaults to "https://kubernetes.default:443". + """ + if kubernetes_host.startswith("http://"): + raise ValueError("Kubernetes host must be accessed over HTTPS.") + if not kubernetes_host.startswith("https://"): + kubernetes_host = "https://" + kubernetes_host + if path.startswith("pods"): + api_group = "/api/v1" + elif path.startswith("rayclusters"): + api_group = "/apis/ray.io/" + kuberay_crd_version + else: + raise NotImplementedError("Tried to access unknown entity at {}".format(path)) + return kubernetes_host + api_group + "/namespaces/" + namespace + "/" + path + + +def _worker_group_index(raycluster: Dict[str, Any], group_name: str) -> int: + """Extract worker group index from RayCluster.""" + group_names = [ + spec["groupName"] for spec in raycluster["spec"].get("workerGroupSpecs", []) + ] + return group_names.index(group_name) + + +def _worker_group_max_replicas( + raycluster: Dict[str, Any], group_index: int +) -> Optional[int]: + """Extract the maxReplicas of a worker group. + + If maxReplicas is unset, return None, to be interpreted as "no constraint". + At time of writing, it should be impossible for maxReplicas to be unset, but it's + better to handle this anyway. + """ + return raycluster["spec"]["workerGroupSpecs"][group_index].get("maxReplicas") + + +def _worker_group_replicas(raycluster: Dict[str, Any], group_index: int): + # 1 is the default replicas value used by the KubeRay operator + return raycluster["spec"]["workerGroupSpecs"][group_index].get("replicas", 1) + + +class IKubernetesHttpApiClient(ABC): + """ + An interface for a Kubernetes HTTP API client. + + This interface could be used to mock the Kubernetes API client in tests. + """ + + @abstractmethod + def get(self, path: str) -> Dict[str, Any]: + """Wrapper for REST GET of resource with proper headers.""" + pass + + @abstractmethod + def patch(self, path: str, payload: List[Dict[str, Any]]) -> Dict[str, Any]: + """Wrapper for REST PATCH of resource with proper headers.""" + pass + + +class KubernetesHttpApiClient(IKubernetesHttpApiClient): + def __init__(self, namespace: str, kuberay_crd_version: str = KUBERAY_CRD_VER): + self._kuberay_crd_version = kuberay_crd_version + self._namespace = namespace + self._token_expires_at = datetime.datetime.now() + TOKEN_REFRESH_PERIOD + self._headers, self._verify = None, None + + def _get_refreshed_headers_and_verify(self): + if (datetime.datetime.now() >= self._token_expires_at) or ( + self._headers is None or self._verify is None + ): + logger.info("Refreshing K8s API client token and certs.") + self._headers, self._verify = load_k8s_secrets() + self._token_expires_at = datetime.datetime.now() + TOKEN_REFRESH_PERIOD + return self._headers, self._verify + else: + return self._headers, self._verify + + def get(self, path: str) -> Dict[str, Any]: + """Wrapper for REST GET of resource with proper headers. + + Args: + path: The part of the resource path that starts with the resource type. + + Returns: + The JSON response of the GET request. + + Raises: + HTTPError: If the GET request fails. + """ + url = url_from_resource( + namespace=self._namespace, + path=path, + kuberay_crd_version=self._kuberay_crd_version, + ) + + headers, verify = self._get_refreshed_headers_and_verify() + result = requests.get( + url, + headers=headers, + timeout=KUBERAY_REQUEST_TIMEOUT_S, + verify=verify, + ) + if not result.status_code == 200: + result.raise_for_status() + return result.json() + + def patch(self, path: str, payload: List[Dict[str, Any]]) -> Dict[str, Any]: + """Wrapper for REST PATCH of resource with proper headers + + Args: + path: The part of the resource path that starts with the resource type. + payload: The JSON patch payload. + + Returns: + The JSON response of the PATCH request. + + Raises: + HTTPError: If the PATCH request fails. + """ + url = url_from_resource( + namespace=self._namespace, + path=path, + kuberay_crd_version=self._kuberay_crd_version, + ) + headers, verify = self._get_refreshed_headers_and_verify() + result = requests.patch( + url, + json.dumps(payload), + headers={**headers, "Content-type": "application/json-patch+json"}, + verify=verify, + ) + if not result.status_code == 200: + result.raise_for_status() + return result.json() + + +class KubeRayNodeProvider(BatchingNodeProvider): # type: ignore + def __init__( + self, + provider_config: Dict[str, Any], + cluster_name: str, + ): + logger.info("Creating KubeRayNodeProvider.") + self.namespace = provider_config["namespace"] + self.cluster_name = cluster_name + + self.k8s_api_client = KubernetesHttpApiClient(self.namespace) + + assert ( + provider_config.get(WORKER_LIVENESS_CHECK_KEY, True) is False + ), f"To use KubeRayNodeProvider, must set `{WORKER_LIVENESS_CHECK_KEY}:False`." + BatchingNodeProvider.__init__(self, provider_config, cluster_name) + + def get_node_data(self) -> Dict[NodeID, NodeData]: + """Queries K8s for pods in the RayCluster. Converts that pod data into a + map of pod name to Ray NodeData, as required by BatchingNodeProvider. + """ + # Store the raycluster CR + self._raycluster = self._get(f"rayclusters/{self.cluster_name}") + + # Get the pods resource version. + # Specifying a resource version in list requests is important for scalability: + # https://kubernetes.io/docs/reference/using-api/api-concepts/#semantics-for-get-and-list + resource_version = self._get_pods_resource_version() + if resource_version: + logger.info( + f"Listing pods for RayCluster {self.cluster_name}" + f" in namespace {self.namespace}" + f" at pods resource version >= {resource_version}." + ) + + # Filter pods by cluster_name. + label_selector = requests.utils.quote(f"ray.io/cluster={self.cluster_name}") + + resource_path = f"pods?labelSelector={label_selector}" + if resource_version: + resource_path += ( + f"&resourceVersion={resource_version}" + + "&resourceVersionMatch=NotOlderThan" + ) + + pod_list = self._get(resource_path) + fetched_resource_version = pod_list["metadata"]["resourceVersion"] + logger.info( + f"Fetched pod data at resource version" f" {fetched_resource_version}." + ) + + # Extract node data from the pod list. + node_data_dict = {} + for pod in pod_list["items"]: + # Kubernetes sets metadata.deletionTimestamp immediately after admitting a + # request to delete an object. Full removal of the object may take some time + # after the deletion timestamp is set. See link for details: + # https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-deletion + if "deletionTimestamp" in pod["metadata"]: + # Ignore pods marked for termination. + continue + pod_name = pod["metadata"]["name"] + node_data_dict[pod_name] = node_data_from_pod(pod) + return node_data_dict + + def submit_scale_request(self, scale_request: ScaleRequest): + """Converts the scale request generated by BatchingNodeProvider into + a patch that modifies the RayCluster CR's replicas and/or workersToDelete + fields. Then submits the patch to the K8s API server. + """ + # Transform the scale request into a patch payload. + patch_payload = self._scale_request_to_patch_payload( + scale_request, self._raycluster + ) + + # Submit the patch to K8s. + logger.info( + "Autoscaler is submitting the following patch to RayCluster " + f"{self.cluster_name} in namespace {self.namespace}." + ) + logger.info(patch_payload) + self._submit_raycluster_patch(patch_payload) + + def safe_to_scale(self) -> bool: + """Returns False iff non_terminated_nodes contains any pods in the RayCluster's + workersToDelete lists. + + Explanation: + If there are any workersToDelete which are non-terminated, + we should wait for the operator to do its job and delete those + pods. Therefore, we back off the autoscaler update. + + If, on the other hand, all of the workersToDelete have already been cleaned up, + then we patch away the workersToDelete lists and return True. + In the future, we may consider having the operator clean up workersToDelete + on it own: + https://github.com/ray-project/kuberay/issues/733 + + Note (Dmitri): + It is stylistically bad that this function has a side effect. + """ + # Get the list of nodes. + node_set = set(self.node_data_dict.keys()) + worker_groups = self._raycluster["spec"].get("workerGroupSpecs", []) + + # Accumulates the indices of worker groups with non-empty workersToDelete + non_empty_worker_group_indices = [] + + for group_index, worker_group in enumerate(worker_groups): + workersToDelete = worker_group.get("scaleStrategy", {}).get( + "workersToDelete", [] + ) + if workersToDelete: + non_empty_worker_group_indices.append(group_index) + for worker in workersToDelete: + if worker in node_set: + # The operator hasn't removed this worker yet. Abort + # the autoscaler update. + logger.warning(f"Waiting for operator to remove worker {worker}.") + return False + + # All required workersToDelete have been removed. + # Clean up the workersToDelete field. + patch_payload = [] + for group_index in non_empty_worker_group_indices: + patch = worker_delete_patch(group_index, workers_to_delete=[]) + patch_payload.append(patch) + if patch_payload: + logger.info("Cleaning up workers to delete.") + logger.info(f"Submitting patch {patch_payload}.") + self._submit_raycluster_patch(patch_payload) + + # It's safe to proceed with the autoscaler update. + return True + + def _get_pods_resource_version(self) -> str: + """ + Extract a recent pods resource version by reading the head pod's + metadata.resourceVersion of the response. + """ + if not RAY_HEAD_POD_NAME: + return None + pod_resp = self._get(f"pods/{RAY_HEAD_POD_NAME}") + return pod_resp["metadata"]["resourceVersion"] + + def _scale_request_to_patch_payload( + self, scale_request: ScaleRequest, raycluster: Dict[str, Any] + ) -> List[Dict[str, Any]]: + """Converts autoscaler scale request into a RayCluster CR patch payload.""" + patch_payload = [] + # Collect patches for replica counts. + for node_type, target_replicas in scale_request.desired_num_workers.items(): + group_index = _worker_group_index(raycluster, node_type) + group_max_replicas = _worker_group_max_replicas(raycluster, group_index) + # Cap the replica count to maxReplicas. + if group_max_replicas is not None and group_max_replicas < target_replicas: + logger.warning( + "Autoscaler attempted to create " + + "more than maxReplicas pods of type {}.".format(node_type) + ) + target_replicas = group_max_replicas + # Check if we need to change the target count. + if target_replicas == _worker_group_replicas(raycluster, group_index): + # No patch required. + continue + # Need to patch replica count. Format the patch and add it to the payload. + patch = worker_replica_patch(group_index, target_replicas) + patch_payload.append(patch) + + # Maps node_type to nodes to delete for that group. + deletion_groups = defaultdict(list) + for worker in scale_request.workers_to_delete: + node_type = self.node_tags(worker)[TAG_RAY_USER_NODE_TYPE] + deletion_groups[node_type].append(worker) + + for node_type, workers_to_delete in deletion_groups.items(): + group_index = _worker_group_index(raycluster, node_type) + patch = worker_delete_patch(group_index, workers_to_delete) + patch_payload.append(patch) + + return patch_payload + + def _submit_raycluster_patch(self, patch_payload: List[Dict[str, Any]]): + """Submits a patch to modify a RayCluster CR.""" + path = "rayclusters/{}".format(self.cluster_name) + self._patch(path, patch_payload) + + def _get(self, path: str) -> Dict[str, Any]: + """Wrapper for REST GET of resource with proper headers.""" + return self.k8s_api_client.get(path) + + def _patch(self, path: str, payload: List[Dict[str, Any]]) -> Dict[str, Any]: + """Wrapper for REST PATCH of resource with proper headers.""" + return self.k8s_api_client.patch(path, payload) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/run_autoscaler.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/run_autoscaler.py new file mode 100644 index 0000000000000000000000000000000000000000..dcc8100737974500d90e77d021908134abb3e48c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/run_autoscaler.py @@ -0,0 +1,124 @@ +import logging +import os +import subprocess +import time + +import ray +from ray._private import ray_constants +from ray._common.ray_constants import ( + LOGGING_ROTATE_BYTES, + LOGGING_ROTATE_BACKUP_COUNT, +) +from ray._private.ray_logging import setup_component_logger +from ray._private.services import get_node_ip_address +from ray._common.network_utils import build_address +from ray._common.utils import try_to_create_directory +from ray._raylet import GcsClient +from ray.autoscaler._private.kuberay.autoscaling_config import AutoscalingConfigProducer +from ray.autoscaler._private.monitor import Monitor +from ray.autoscaler.v2.instance_manager.config import KubeRayConfigReader +from ray.autoscaler.v2.utils import is_autoscaler_v2 + +logger = logging.getLogger(__name__) + +BACKOFF_S = 5 + + +def _get_log_dir() -> str: + return os.path.join( + ray._common.utils.get_ray_temp_dir(), + ray._private.ray_constants.SESSION_LATEST, + "logs", + ) + + +def run_kuberay_autoscaler(cluster_name: str, cluster_namespace: str): + """Wait until the Ray head container is ready. Then start the autoscaler.""" + head_ip = get_node_ip_address() + ray_address = build_address(head_ip, 6379) + while True: + try: + # Autoscaler Ray version might not exactly match GCS version, so skip the + # version check when checking GCS status. + subprocess.check_call( + [ + "ray", + "health-check", + "--address", + ray_address, + "--skip-version-check", + ] + ) + logger.info("The Ray head is ready. Starting the autoscaler.") + break + except subprocess.CalledProcessError: + logger.warning( + f"The Ray head is not ready. Will check again in {BACKOFF_S} seconds." + ) + time.sleep(BACKOFF_S) + + # The Ray head container sets up the log directory. Thus, we set up logging + # only after the Ray head is ready. + _setup_logging() + + # autoscaling_config_producer reads the RayCluster CR from K8s and uses the CR + # to output an autoscaling config. + autoscaling_config_producer = AutoscalingConfigProducer( + cluster_name, cluster_namespace + ) + + gcs_client = GcsClient(ray_address) + if is_autoscaler_v2(fetch_from_server=True, gcs_client=gcs_client): + from ray.autoscaler.v2.monitor import AutoscalerMonitor as MonitorV2 + + MonitorV2( + address=gcs_client.address, + config_reader=KubeRayConfigReader(autoscaling_config_producer), + log_dir=_get_log_dir(), + monitor_ip=head_ip, + ).run() + else: + Monitor( + address=gcs_client.address, + # The `autoscaling_config` arg can be a dict or a `Callable: () -> dict`. + # In this case, it's a callable. + autoscaling_config=autoscaling_config_producer, + monitor_ip=head_ip, + # Let the autoscaler process exit after it hits 5 exceptions. + # (See ray.autoscaler._private.constants.AUTOSCALER_MAX_NUM_FAILURES.) + # Kubernetes will then restart the autoscaler container. + retry_on_failure=False, + ).run() + + +def _setup_logging() -> None: + """Log to autoscaler log file + (typically, /tmp/ray/session_latest/logs/monitor.*) + + Also log to pod stdout (logs viewable with `kubectl logs -c autoscaler`). + """ + log_dir = _get_log_dir() + # The director should already exist, but try (safely) to create it just in case. + try_to_create_directory(log_dir) + + # Write logs at info level to monitor.log. + setup_component_logger( + logging_level=ray_constants.LOGGER_LEVEL, + logging_format=ray_constants.LOGGER_FORMAT, + log_dir=log_dir, + filename=ray_constants.MONITOR_LOG_FILE_NAME, # monitor.log + max_bytes=LOGGING_ROTATE_BYTES, + backup_count=LOGGING_ROTATE_BACKUP_COUNT, + ) + + # For the autoscaler, the root logger _also_ needs to write to stderr, not just + # ray_constants.MONITOR_LOG_FILE_NAME. + level = logging.getLevelName(ray_constants.LOGGER_LEVEL.upper()) + stderr_handler = logging._StderrHandler() + stderr_handler.setFormatter(logging.Formatter(ray_constants.LOGGER_FORMAT)) + stderr_handler.setLevel(level) + logging.root.setLevel(level) + logging.root.addHandler(stderr_handler) + + # The stdout handler was set up in the Ray CLI entry point. + # See ray.scripts.scripts::cli(). diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/utils.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..24ec131dbea54ae59b655089611a14318db9c09a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/kuberay/utils.py @@ -0,0 +1,110 @@ +# Source: +# https://github.com/kubernetes-client/python/blob/master/kubernetes/utils/quantity.py +from decimal import Decimal, InvalidOperation +from functools import reduce +from typing import Optional + +# Mapping used to get generation for TPU-{accelerator}-head resource +# https://cloud.google.com/kubernetes-engine/docs/how-to/tpus#run +gke_tpu_accelerator_to_generation = { + "tpu-v4-podslice": "v4", + "tpu-v5-lite-device": "v5e", + "tpu-v5-lite-podslice": "v5e", + "tpu-v5p-slice": "v5p", + "tpu-v6e-slice": "v6e", +} + + +def parse_quantity(quantity): + """Parse kubernetes canonical form quantity like 200Mi to a decimal number. + Supported SI suffixes: + base1024: Ki | Mi | Gi | Ti | Pi | Ei + base1000: n | u | m | "" | k | M | G | T | P | E + + See + https://github.com/kubernetes/apimachinery/blob/master/pkg/api/resource/quantity.go + + Args: + quantity: string. kubernetes canonical form quantity + + Returns: + Decimal: The parsed quantity as a decimal number + + Raises: + ValueError: On invalid or unknown input + """ + if isinstance(quantity, (int, float, Decimal)): + return Decimal(quantity) + + exponents = { + "n": -3, + "u": -2, + "m": -1, + "K": 1, + "k": 1, + "M": 2, + "G": 3, + "T": 4, + "P": 5, + "E": 6, + } + + quantity = str(quantity) + number = quantity + suffix = None + if len(quantity) >= 2 and quantity[-1] == "i": + if quantity[-2] in exponents: + number = quantity[:-2] + suffix = quantity[-2:] + elif len(quantity) >= 1 and quantity[-1] in exponents: + number = quantity[:-1] + suffix = quantity[-1:] + + try: + number = Decimal(number) + except InvalidOperation: + raise ValueError("Invalid number format: {}".format(number)) + + if suffix is None: + return number + + if suffix.endswith("i"): + base = 1024 + elif len(suffix) == 1: + base = 1000 + else: + raise ValueError("{} has unknown suffix".format(quantity)) + + # handle SI inconsistency + if suffix == "ki": + raise ValueError("{} has unknown suffix".format(quantity)) + + if suffix[0] not in exponents: + raise ValueError("{} has unknown suffix".format(quantity)) + + exponent = Decimal(exponents[suffix[0]]) + return number * (base**exponent) + + +def tpu_node_selectors_to_type(topology: str, accelerator: str) -> Optional[str]: + """Convert Kubernetes gke-tpu nodeSelectors to TPU accelerator_type + for a kuberay TPU worker group. + Args: + topology: value of the cloud.google.com/gke-tpu-topology Kubernetes + nodeSelector, describes the physical topology of the TPU podslice. + accelerator: value of the cloud.google.com/gke-tpu-accelerator nodeSelector, + the name of the TPU accelerator, e.g. tpu-v4-podslice + Returns: + A string, accelerator_type, e.g. "v4-8". + """ + if topology and accelerator: + generation = gke_tpu_accelerator_to_generation[accelerator] + # Reduce e.g. "2x2x2" to 8 + chip_dimensions = [int(chip_count) for chip_count in topology.split("x")] + num_chips = reduce(lambda x, y: x * y, chip_dimensions) + default_num_cores_per_chip = 1 + if generation == "v4" or generation == "v5p": + default_num_cores_per_chip = 2 + num_cores = num_chips * default_num_cores_per_chip + return f"{generation}-{num_cores}" + return None diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/legacy_info_string.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/legacy_info_string.py new file mode 100644 index 0000000000000000000000000000000000000000..830078345455218a005f7cbf734d0f7c88d93b98 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/legacy_info_string.py @@ -0,0 +1,37 @@ +import logging + +from ray._private.ray_constants import DEBUG_AUTOSCALING_STATUS_LEGACY +from ray.experimental.internal_kv import _internal_kv_initialized, _internal_kv_put + +"""This file provides legacy support for the old info string in order to +ensure the dashboard's `api/cluster_status` does not break backwards +compatibilty. +""" + +logger = logging.getLogger(__name__) + + +def legacy_log_info_string(autoscaler, nodes): + tmp = "Cluster status: " + tmp += info_string(autoscaler, nodes) + tmp += "\n" + tmp += autoscaler.load_metrics.info_string() + tmp += "\n" + tmp += autoscaler.resource_demand_scheduler.debug_string( + nodes, + autoscaler.pending_launches.breakdown(), + autoscaler.load_metrics.get_resource_utilization(), + ) + if _internal_kv_initialized(): + _internal_kv_put(DEBUG_AUTOSCALING_STATUS_LEGACY, tmp, overwrite=True) + logger.debug(tmp) + + +def info_string(autoscaler, nodes): + suffix = "" + if autoscaler.updaters: + suffix += " ({} updating)".format(len(autoscaler.updaters)) + if autoscaler.num_failed_updates: + suffix += " ({} failed to update)".format(len(autoscaler.num_failed_updates)) + + return "{} nodes{}".format(len(nodes), suffix) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/load_metrics.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/load_metrics.py new file mode 100644 index 0000000000000000000000000000000000000000..ec94647bda9c7666ad30a4ef3372b30b68eed609 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/load_metrics.py @@ -0,0 +1,372 @@ +import logging +import time +from collections import Counter +from functools import reduce +from typing import Dict, List + +from ray._private.gcs_utils import PlacementGroupTableData +from ray.autoscaler._private.constants import ( + AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE, + AUTOSCALER_REPORT_PER_NODE_STATUS, +) +from ray.autoscaler._private.util import ( + DictCount, + LoadMetricsSummary, + NodeIP, + ResourceDict, +) +from ray.core.generated.common_pb2 import PlacementStrategy + +logger = logging.getLogger(__name__) + + +def add_resources(dict1: Dict[str, float], dict2: Dict[str, float]) -> Dict[str, float]: + """Add the values in two dictionaries. + + Returns: + dict: A new dictionary (inputs remain unmodified). + """ + new_dict = dict1.copy() + for k, v in dict2.items(): + new_dict[k] = v + new_dict.get(k, 0) + return new_dict + + +def freq_of_dicts(dicts: List[Dict], serializer=None, deserializer=dict) -> DictCount: + """Count a list of dictionaries (or unhashable types). + + This is somewhat annoying because mutable data structures aren't hashable, + and set/dict keys must be hashable. + + Args: + dicts (List[D]): A list of dictionaries to be counted. + serializer (D -> S): A custom serialization function. The output type S + must be hashable. The default serializer converts a dictionary into + a frozenset of KV pairs. + deserializer (S -> U): A custom deserialization function. See the + serializer for information about type S. For dictionaries U := D. + + Returns: + List[Tuple[U, int]]: Returns a list of tuples. Each entry in the list + is a tuple containing a unique entry from `dicts` and its + corresponding frequency count. + """ + if serializer is None: + serializer = lambda d: frozenset(d.items()) # noqa: E731 + + freqs = Counter(serializer(d) for d in dicts) + as_list = [] + for as_set, count in freqs.items(): + as_list.append((deserializer(as_set), count)) + return as_list + + +class LoadMetrics: + """Container for cluster load metrics. + + Metrics here are updated from raylet heartbeats. The autoscaler + queries these metrics to determine when to scale up, and which nodes + can be removed. + """ + + def __init__(self): + self.last_heartbeat_time_by_ip = {} + self.static_resources_by_ip = {} + self.dynamic_resources_by_ip = {} + self.node_id_by_ip = {} + self.waiting_bundles = [] + self.infeasible_bundles = [] + self.pending_placement_groups = [] + self.resource_requests = [] + self.cluster_full_of_actors_detected = False + self.ray_nodes_last_used_time_by_ip = {} + + def __bool__(self): + """A load metrics instance is Falsey iff the autoscaler process + has not received a resource message from the GCS. + """ + return bool(self.node_id_by_ip) + + def update( + self, + ip: str, + node_id: bytes, + static_resources: Dict[str, Dict], + dynamic_resources: Dict[str, Dict], + node_idle_duration_s: float, + waiting_bundles: List[Dict[str, float]] = None, + infeasible_bundles: List[Dict[str, float]] = None, + pending_placement_groups: List[PlacementGroupTableData] = None, + cluster_full_of_actors_detected: bool = False, + ): + self.static_resources_by_ip[ip] = static_resources + self.node_id_by_ip[ip] = node_id + self.cluster_full_of_actors_detected = cluster_full_of_actors_detected + + if not waiting_bundles: + waiting_bundles = [] + if not infeasible_bundles: + infeasible_bundles = [] + if not pending_placement_groups: + pending_placement_groups = [] + + # We are not guaranteed to have a corresponding dynamic resource + # for every static resource because dynamic resources are based on + # the available resources in the heartbeat, which does not exist + # if it is zero. Thus, we have to update dynamic resources here. + dynamic_resources_update = dynamic_resources.copy() + for resource_name, capacity in self.static_resources_by_ip[ip].items(): + if resource_name not in dynamic_resources_update: + dynamic_resources_update[resource_name] = 0.0 + self.dynamic_resources_by_ip[ip] = dynamic_resources_update + + now = time.time() + self.ray_nodes_last_used_time_by_ip[ip] = now - node_idle_duration_s + self.last_heartbeat_time_by_ip[ip] = now + self.waiting_bundles = waiting_bundles + self.infeasible_bundles = infeasible_bundles + self.pending_placement_groups = pending_placement_groups + + def mark_active(self, ip): + assert ip is not None, "IP should be known at this time" + logger.debug("Node {} is newly setup, treating as active".format(ip)) + self.last_heartbeat_time_by_ip[ip] = time.time() + + def prune_active_ips(self, active_ips: List[str]): + """The Raylet ips stored by LoadMetrics are obtained by polling + the GCS in Monitor.update_load_metrics(). + + On the other hand, the autoscaler gets a list of node ips from + its NodeProvider. + + This method removes from LoadMetrics the ips unknown to the autoscaler. + + Args: + active_ips (List[str]): The node ips known to the autoscaler. + """ + active_ips = set(active_ips) + + def prune(mapping, should_log): + unwanted_ips = set(mapping) - active_ips + for unwanted_ip in unwanted_ips: + if should_log: + logger.info("LoadMetrics: " f"Removed ip: {unwanted_ip}.") + del mapping[unwanted_ip] + if unwanted_ips and should_log: + logger.info( + "LoadMetrics: " + "Removed {} stale ip mappings: {} not in {}".format( + len(unwanted_ips), unwanted_ips, active_ips + ) + ) + assert not (unwanted_ips & set(mapping)) + + prune(self.ray_nodes_last_used_time_by_ip, should_log=True) + prune(self.static_resources_by_ip, should_log=False) + prune(self.node_id_by_ip, should_log=False) + prune(self.dynamic_resources_by_ip, should_log=False) + prune(self.last_heartbeat_time_by_ip, should_log=False) + + def get_node_resources(self): + """Return a list of node resources (static resource sizes). + + Example: + >>> from ray.autoscaler._private.load_metrics import LoadMetrics + >>> metrics = LoadMetrics(...) # doctest: +SKIP + >>> metrics.get_node_resources() # doctest: +SKIP + [{"CPU": 1}, {"CPU": 4, "GPU": 8}] # for two different nodes + """ + return self.static_resources_by_ip.values() + + def get_static_node_resources_by_ip(self) -> Dict[NodeIP, ResourceDict]: + """Return a dict of node resources for every node ip. + + Example: + >>> from ray.autoscaler._private.load_metrics import LoadMetrics + >>> metrics = LoadMetrics(...) # doctest: +SKIP + >>> metrics.get_static_node_resources_by_ip() # doctest: +SKIP + {127.0.0.1: {"CPU": 1}, 127.0.0.2: {"CPU": 4, "GPU": 8}} + """ + return self.static_resources_by_ip + + def get_resource_utilization(self): + return self.dynamic_resources_by_ip + + def _get_resource_usage(self): + resources_used = {} + resources_total = {} + for ip, max_resources in self.static_resources_by_ip.items(): + avail_resources = self.dynamic_resources_by_ip[ip] + for resource_id, amount in max_resources.items(): + used = amount - avail_resources[resource_id] + if resource_id not in resources_used: + resources_used[resource_id] = 0.0 + resources_total[resource_id] = 0.0 + resources_used[resource_id] += used + resources_total[resource_id] += amount + used = max(0, used) + + return resources_used, resources_total + + def get_resource_demand_vector(self, clip=True): + if clip: + # Bound the total number of bundles to + # 2xMAX_RESOURCE_DEMAND_VECTOR_SIZE. This guarantees the resource + # demand scheduler bin packing algorithm takes a reasonable amount + # of time to run. + return ( + self.waiting_bundles[:AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE] + + self.infeasible_bundles[:AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE] + ) + else: + return self.waiting_bundles + self.infeasible_bundles + + def get_resource_requests(self): + return self.resource_requests + + def get_pending_placement_groups(self): + return self.pending_placement_groups + + def resources_avail_summary(self) -> str: + """Return a concise string of cluster size to report to event logs. + + For example, "3 CPUs, 4 GPUs". + """ + total_resources = ( + reduce(add_resources, self.static_resources_by_ip.values()) + if self.static_resources_by_ip + else {} + ) + out = "{} CPUs".format(int(total_resources.get("CPU", 0))) + if "GPU" in total_resources: + out += ", {} GPUs".format(int(total_resources["GPU"])) + if "TPU" in total_resources: + out += ", {} TPUs".format(int(total_resources["TPU"])) + return out + + def summary(self): + available_resources = ( + reduce(add_resources, self.dynamic_resources_by_ip.values()) + if self.dynamic_resources_by_ip + else {} + ) + total_resources = ( + reduce(add_resources, self.static_resources_by_ip.values()) + if self.static_resources_by_ip + else {} + ) + usage_dict = {} + for key in total_resources: + if key in ["memory", "object_store_memory"]: + total = total_resources[key] + available = available_resources[key] + usage_dict[key] = (total - available, total) + else: + total = total_resources[key] + usage_dict[key] = (total - available_resources[key], total) + + summarized_demand_vector = freq_of_dicts( + self.get_resource_demand_vector(clip=False) + ) + summarized_resource_requests = freq_of_dicts(self.get_resource_requests()) + + def placement_group_serializer(pg): + bundles = tuple( + frozenset(bundle.unit_resources.items()) for bundle in pg.bundles + ) + return (bundles, pg.strategy) + + def placement_group_deserializer(pg_tuple): + # We marshal this as a dictionary so that we can easily json.dumps + # it later. + # TODO (Alex): Would there be a benefit to properly + # marshalling this (into a protobuf)? + bundles = list(map(dict, pg_tuple[0])) + return { + "bundles": freq_of_dicts(bundles), + "strategy": PlacementStrategy.Name(pg_tuple[1]), + } + + summarized_placement_groups = freq_of_dicts( + self.get_pending_placement_groups(), + serializer=placement_group_serializer, + deserializer=placement_group_deserializer, + ) + nodes_summary = freq_of_dicts(self.static_resources_by_ip.values()) + + usage_by_node = None + if AUTOSCALER_REPORT_PER_NODE_STATUS: + usage_by_node = {} + for ip, totals in self.static_resources_by_ip.items(): + available = self.dynamic_resources_by_ip.get(ip, {}) + usage_by_node[ip] = {} + for resource, total in totals.items(): + usage_by_node[ip][resource] = ( + total - available.get(resource, 0), + total, + ) + + return LoadMetricsSummary( + usage=usage_dict, + resource_demand=summarized_demand_vector, + pg_demand=summarized_placement_groups, + request_demand=summarized_resource_requests, + node_types=nodes_summary, + usage_by_node=usage_by_node, + ) + + def set_resource_requests(self, requested_resources): + if requested_resources is not None: + assert isinstance(requested_resources, list), requested_resources + self.resource_requests = [ + request for request in requested_resources if len(request) > 0 + ] + + def info_string(self): + return " - " + "\n - ".join( + ["{}: {}".format(k, v) for k, v in sorted(self._info().items())] + ) + + def _info(self): + resources_used, resources_total = self._get_resource_usage() + + now = time.time() + idle_times = [now - t for t in self.ray_nodes_last_used_time_by_ip.values()] + heartbeat_times = [now - t for t in self.last_heartbeat_time_by_ip.values()] + most_delayed_heartbeats = sorted( + self.last_heartbeat_time_by_ip.items(), key=lambda pair: pair[1] + )[:5] + most_delayed_heartbeats = {ip: (now - t) for ip, t in most_delayed_heartbeats} + + def format_resource(key, value): + if key in ["object_store_memory", "memory"]: + return "{} GiB".format(round(value / (1024 * 1024 * 1024), 2)) + else: + return round(value, 2) + + return { + "ResourceUsage": ", ".join( + [ + "{}/{} {}".format( + format_resource(rid, resources_used[rid]), + format_resource(rid, resources_total[rid]), + rid, + ) + for rid in sorted(resources_used) + if not rid.startswith("node:") + ] + ), + "NodeIdleSeconds": "Min={} Mean={} Max={}".format( + int(min(idle_times)) if idle_times else -1, + int(float(sum(idle_times)) / len(idle_times)) if idle_times else -1, + int(max(idle_times)) if idle_times else -1, + ), + "TimeSinceLastHeartbeat": "Min={} Mean={} Max={}".format( + int(min(heartbeat_times)) if heartbeat_times else -1, + int(float(sum(heartbeat_times)) / len(heartbeat_times)) + if heartbeat_times + else -1, + int(max(heartbeat_times)) if heartbeat_times else -1, + ), + "MostDelayedHeartbeats": most_delayed_heartbeats, + } diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/loader.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/loader.py new file mode 100644 index 0000000000000000000000000000000000000000..a46c40dd341f4f1e7ff09d728747db98a2a4ce70 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/loader.py @@ -0,0 +1,15 @@ +import importlib + + +def load_function_or_class(path): + """Load a function or class at runtime given a full path. + + Example of the path: mypkg.mysubpkg.myclass + """ + class_data = path.split(".") + if len(class_data) < 2: + raise ValueError("You need to pass a valid path like mymodule.provider_class") + module_path = ".".join(class_data[:-1]) + fn_or_class_str = class_data[-1] + module = importlib.import_module(module_path) + return getattr(module, fn_or_class_str) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d8f39cafc1465690e902417f41fe404cef242f2c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/config.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..829b172b7589b92d37768c6e6c91efaedba1b98d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/config.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/coordinator_node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/coordinator_node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..67cd9c21fca1e34763afed44351ce5f8dcc9b6a8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/coordinator_node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..573b19b3c3a4ba5882b2f76fc2d4b3dd87fcc594 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/config.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/config.py new file mode 100644 index 0000000000000000000000000000000000000000..1d44bb3e3369c92964c1ac6ba9a14466d15b13d6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/config.py @@ -0,0 +1,121 @@ +import copy +import os +from typing import Any, Dict + +from ray._common.utils import get_ray_temp_dir +from ray.autoscaler._private.cli_logger import cli_logger + +unsupported_field_message = "The field {} is not supported for on-premise clusters." + +LOCAL_CLUSTER_NODE_TYPE = "local.cluster.node" + + +def prepare_local(config: Dict[str, Any]) -> Dict[str, Any]: + """ + Prepare local cluster config for ingestion by cluster launcher and + autoscaler. + """ + config = copy.deepcopy(config) + for field in "head_node", "worker_nodes", "available_node_types": + if config.get(field): + err_msg = unsupported_field_message.format(field) + cli_logger.abort(err_msg) + # We use a config with a single node type for on-prem clusters. + # Resources internally detected by Ray are not overridden by the autoscaler + # (see NodeProvider.do_update) + config["available_node_types"] = { + LOCAL_CLUSTER_NODE_TYPE: {"node_config": {}, "resources": {}} + } + config["head_node_type"] = LOCAL_CLUSTER_NODE_TYPE + if "coordinator_address" in config["provider"]: + config = prepare_coordinator(config) + else: + config = prepare_manual(config) + return config + + +def prepare_coordinator(config: Dict[str, Any]) -> Dict[str, Any]: + config = copy.deepcopy(config) + # User should explicitly set the max number of workers for the coordinator + # to allocate. + if "max_workers" not in config: + cli_logger.abort( + "The field `max_workers` is required when using an " + "automatically managed on-premise cluster." + ) + node_type = config["available_node_types"][LOCAL_CLUSTER_NODE_TYPE] + # The autoscaler no longer uses global `min_workers`. + # Move `min_workers` to the node_type config. + node_type["min_workers"] = config.pop("min_workers", 0) + node_type["max_workers"] = config["max_workers"] + return config + + +def prepare_manual(config: Dict[str, Any]) -> Dict[str, Any]: + """Validates and sets defaults for configs of manually managed on-prem + clusters. + + - Checks for presence of required `worker_ips` and `head_ips` fields. + - Defaults min and max workers to the number of `worker_ips`. + - Caps min and max workers at the number of `worker_ips`. + - Writes min and max worker info into the single worker node type. + """ + config = copy.deepcopy(config) + if ("worker_ips" not in config["provider"]) or ( + "head_ip" not in config["provider"] + ): + cli_logger.abort( + "Please supply a `head_ip` and list of `worker_ips`. " + "Alternatively, supply a `coordinator_address`." + ) + num_ips = len(config["provider"]["worker_ips"]) + node_type = config["available_node_types"][LOCAL_CLUSTER_NODE_TYPE] + # Default to keeping all provided ips in the cluster. + config.setdefault("max_workers", num_ips) + + # The autoscaler no longer uses global `min_workers`. + # We will move `min_workers` to the node_type config. + min_workers = config.pop("min_workers", num_ips) + max_workers = config["max_workers"] + + if min_workers > num_ips: + cli_logger.warning( + f"The value of `min_workers` supplied ({min_workers}) is greater" + f" than the number of available worker ips ({num_ips})." + f" Setting `min_workers={num_ips}`." + ) + node_type["min_workers"] = num_ips + else: + node_type["min_workers"] = min_workers + + if max_workers > num_ips: + cli_logger.warning( + f"The value of `max_workers` supplied ({max_workers}) is greater" + f" than the number of available worker ips ({num_ips})." + f" Setting `max_workers={num_ips}`." + ) + node_type["max_workers"] = num_ips + config["max_workers"] = num_ips + else: + node_type["max_workers"] = max_workers + + if max_workers < num_ips: + cli_logger.warning( + f"The value of `max_workers` supplied ({max_workers}) is less" + f" than the number of available worker ips ({num_ips})." + f" At most {max_workers} Ray worker nodes will connect to the cluster." + ) + + return config + + +def get_lock_path(cluster_name: str) -> str: + return os.path.join(get_ray_temp_dir(), "cluster-{}.lock".format(cluster_name)) + + +def get_state_path(cluster_name: str) -> str: + return os.path.join(get_ray_temp_dir(), "cluster-{}.state".format(cluster_name)) + + +def bootstrap_local(config: Dict[str, Any]) -> Dict[str, Any]: + return config diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/coordinator_node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/coordinator_node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..7d55c394e8629124ea2a7a025813cc00def416ea --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/coordinator_node_provider.py @@ -0,0 +1,110 @@ +import json +import logging +from http.client import RemoteDisconnected + +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import TAG_RAY_CLUSTER_NAME + +logger = logging.getLogger(__name__) + + +class CoordinatorSenderNodeProvider(NodeProvider): + """NodeProvider for automatically managed private/local clusters. + + The cluster management is handled by a remote coordinating server. + The server listens on , therefore, the address + should be provided in the provider section in the cluster config. + The server receieves HTTP requests from this class and uses + LocalNodeProvider to get their responses. + """ + + def __init__(self, provider_config, cluster_name): + NodeProvider.__init__(self, provider_config, cluster_name) + self.coordinator_address = provider_config["coordinator_address"] + + def _get_http_response(self, request): + headers = { + "Content-Type": "application/json", + } + request_message = json.dumps(request).encode() + http_coordinator_address = "http://" + self.coordinator_address + + try: + import requests # `requests` is not part of stdlib. + from requests.exceptions import ConnectionError + + r = requests.get( + http_coordinator_address, + data=request_message, + headers=headers, + timeout=None, + ) + except (RemoteDisconnected, ConnectionError): + logger.exception( + "Could not connect to: " + + http_coordinator_address + + ". Did you run python coordinator_server.py" + + " --ips --host --port ?" + ) + raise + except ImportError: + logger.exception( + "Not all Ray Autoscaler dependencies were found. " + "In Ray 1.4+, the Ray CLI, autoscaler, and dashboard will " + 'only be usable via `pip install "ray[default]"`. Please ' + "update your install command." + ) + raise + + response = r.json() + return response + + def non_terminated_nodes(self, tag_filters): + # Only get the non terminated nodes associated with this cluster name. + tag_filters[TAG_RAY_CLUSTER_NAME] = self.cluster_name + request = {"type": "non_terminated_nodes", "args": (tag_filters,)} + return self._get_http_response(request) + + def is_running(self, node_id): + request = {"type": "is_running", "args": (node_id,)} + return self._get_http_response(request) + + def is_terminated(self, node_id): + request = {"type": "is_terminated", "args": (node_id,)} + return self._get_http_response(request) + + def node_tags(self, node_id): + request = {"type": "node_tags", "args": (node_id,)} + return self._get_http_response(request) + + def external_ip(self, node_id): + request = {"type": "external_ip", "args": (node_id,)} + response = self._get_http_response(request) + return response + + def internal_ip(self, node_id): + request = {"type": "internal_ip", "args": (node_id,)} + response = self._get_http_response(request) + return response + + def create_node(self, node_config, tags, count): + # Tag the newly created node with this cluster name. Helps to get + # the right nodes when calling non_terminated_nodes. + tags[TAG_RAY_CLUSTER_NAME] = self.cluster_name + request = { + "type": "create_node", + "args": (node_config, tags, count), + } + self._get_http_response(request) + + def set_node_tags(self, node_id, tags): + request = {"type": "set_node_tags", "args": (node_id, tags)} + self._get_http_response(request) + + def terminate_node(self, node_id): + request = {"type": "terminate_node", "args": (node_id,)} + self._get_http_response(request) + + def terminate_nodes(self, node_ids): + request = {"type": "terminate_nodes", "args": (node_ids,)} + self._get_http_response(request) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..4ac9fede40766994e89575af1744c968116faec5 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/local/node_provider.py @@ -0,0 +1,307 @@ +import json +import logging +import os +import socket +from threading import RLock + +from filelock import FileLock + +from ray.autoscaler._private.local.config import ( + LOCAL_CLUSTER_NODE_TYPE, + bootstrap_local, + get_lock_path, + get_state_path, +) +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + NODE_KIND_WORKER, + STATUS_UP_TO_DATE, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, + TAG_RAY_USER_NODE_TYPE, +) + +logger = logging.getLogger(__name__) + +filelock_logger = logging.getLogger("filelock") +filelock_logger.setLevel(logging.WARNING) + + +class ClusterState: + def __init__(self, lock_path, save_path, provider_config): + self.lock = RLock() + os.makedirs(os.path.dirname(lock_path), exist_ok=True) + self.file_lock = FileLock(lock_path) + self.save_path = save_path + + with self.lock: + with self.file_lock: + if os.path.exists(self.save_path): + workers = json.loads(open(self.save_path).read()) + head_config = workers.get(provider_config["head_ip"]) + if ( + not head_config + or head_config.get("tags", {}).get(TAG_RAY_NODE_KIND) + != NODE_KIND_HEAD + ): + workers = {} + logger.info("Head IP changed - recreating cluster.") + else: + workers = {} + logger.info( + "ClusterState: Loaded cluster state: {}".format(list(workers)) + ) + for worker_ip in provider_config["worker_ips"]: + if worker_ip not in workers: + workers[worker_ip] = { + "tags": {TAG_RAY_NODE_KIND: NODE_KIND_WORKER}, + "state": "terminated", + } + else: + assert ( + workers[worker_ip]["tags"][TAG_RAY_NODE_KIND] + == NODE_KIND_WORKER + ) + if provider_config["head_ip"] not in workers: + workers[provider_config["head_ip"]] = { + "tags": {TAG_RAY_NODE_KIND: NODE_KIND_HEAD}, + "state": "terminated", + } + else: + assert ( + workers[provider_config["head_ip"]]["tags"][TAG_RAY_NODE_KIND] + == NODE_KIND_HEAD + ) + # Relevant when a user reduces the number of workers + # without changing the headnode. + list_of_node_ips = list(provider_config["worker_ips"]) + list_of_node_ips.append(provider_config["head_ip"]) + for worker_ip in list(workers): + if worker_ip not in list_of_node_ips: + del workers[worker_ip] + + # Set external head ip, if provided by user. + # Necessary if calling `ray up` from outside the network. + # Refer to LocalNodeProvider.external_ip function. + external_head_ip = provider_config.get("external_head_ip") + if external_head_ip: + head = workers[provider_config["head_ip"]] + head["external_ip"] = external_head_ip + + assert len(workers) == len(provider_config["worker_ips"]) + 1 + with open(self.save_path, "w") as f: + logger.debug( + "ClusterState: Writing cluster state: {}".format(workers) + ) + f.write(json.dumps(workers)) + + def get(self): + with self.lock: + with self.file_lock: + workers = json.loads(open(self.save_path).read()) + return workers + + def put(self, worker_id, info): + assert "tags" in info + assert "state" in info + with self.lock: + with self.file_lock: + workers = self.get() + workers[worker_id] = info + with open(self.save_path, "w") as f: + logger.info( + "ClusterState: " + "Writing cluster state: {}".format(list(workers)) + ) + f.write(json.dumps(workers)) + + +class OnPremCoordinatorState(ClusterState): + """Generates & updates the state file of CoordinatorSenderNodeProvider. + + Unlike ClusterState, which generates a cluster specific file with + predefined head and worker ips, OnPremCoordinatorState overwrites + ClusterState's __init__ function to generate and manage a unified + file of the status of all the nodes for multiple clusters. + """ + + def __init__(self, lock_path, save_path, list_of_node_ips): + self.lock = RLock() + self.file_lock = FileLock(lock_path) + self.save_path = save_path + + with self.lock: + with self.file_lock: + if os.path.exists(self.save_path): + nodes = json.loads(open(self.save_path).read()) + else: + nodes = {} + logger.info( + "OnPremCoordinatorState: " + "Loaded on prem coordinator state: {}".format(nodes) + ) + + # Filter removed node ips. + for node_ip in list(nodes): + if node_ip not in list_of_node_ips: + del nodes[node_ip] + + for node_ip in list_of_node_ips: + if node_ip not in nodes: + nodes[node_ip] = { + "tags": {}, + "state": "terminated", + } + assert len(nodes) == len(list_of_node_ips) + with open(self.save_path, "w") as f: + logger.info( + "OnPremCoordinatorState: " + "Writing on prem coordinator state: {}".format(nodes) + ) + f.write(json.dumps(nodes)) + + +class LocalNodeProvider(NodeProvider): + """NodeProvider for private/local clusters. + + `node_id` is overloaded to also be `node_ip` in this class. + + When `cluster_name` is provided, it manages a single cluster in a cluster + specific state file. But when `cluster_name` is None, it manages multiple + clusters in a unified state file that requires each node to be tagged with + TAG_RAY_CLUSTER_NAME in create and non_terminated_nodes function calls to + associate each node with the right cluster. + + The current use case of managing multiple clusters is by + OnPremCoordinatorServer which receives node provider HTTP requests + from CoordinatorSenderNodeProvider and uses LocalNodeProvider to get + the responses. + """ + + def __init__(self, provider_config, cluster_name): + NodeProvider.__init__(self, provider_config, cluster_name) + + if cluster_name: + lock_path = get_lock_path(cluster_name) + state_path = get_state_path(cluster_name) + self.state = ClusterState( + lock_path, + state_path, + provider_config, + ) + self.use_coordinator = False + else: + # LocalNodeProvider with a coordinator server. + self.state = OnPremCoordinatorState( + "/tmp/coordinator.lock", + "/tmp/coordinator.state", + provider_config["list_of_node_ips"], + ) + self.use_coordinator = True + + def non_terminated_nodes(self, tag_filters): + workers = self.state.get() + matching_ips = [] + for worker_ip, info in workers.items(): + if info["state"] == "terminated": + continue + ok = True + for k, v in tag_filters.items(): + if info["tags"].get(k) != v: + ok = False + break + if ok: + matching_ips.append(worker_ip) + return matching_ips + + def is_running(self, node_id): + return self.state.get()[node_id]["state"] == "running" + + def is_terminated(self, node_id): + return not self.is_running(node_id) + + def node_tags(self, node_id): + return self.state.get()[node_id]["tags"] + + def external_ip(self, node_id): + """Returns an external ip if the user has supplied one. + Otherwise, use the same logic as internal_ip below. + + This can be used to call ray up from outside the network, for example + if the Ray cluster exists in an AWS VPC and we're interacting with + the cluster from a laptop (where using an internal_ip will not work). + + Useful for debugging the local node provider with cloud VMs.""" + + node_state = self.state.get()[node_id] + ext_ip = node_state.get("external_ip") + if ext_ip: + return ext_ip + else: + return socket.gethostbyname(node_id) + + def internal_ip(self, node_id): + return socket.gethostbyname(node_id) + + def set_node_tags(self, node_id, tags): + with self.state.lock: + with self.state.file_lock: + info = self.state.get()[node_id] + info["tags"].update(tags) + self.state.put(node_id, info) + + def create_node(self, node_config, tags, count): + """Creates min(count, currently available) nodes.""" + node_type = tags[TAG_RAY_NODE_KIND] + with self.state.lock: + with self.state.file_lock: + workers = self.state.get() + for node_id, info in workers.items(): + if info["state"] == "terminated" and ( + self.use_coordinator + or info["tags"][TAG_RAY_NODE_KIND] == node_type + ): + info["tags"] = tags + info["state"] = "running" + self.state.put(node_id, info) + count = count - 1 + if count == 0: + return + + def terminate_node(self, node_id): + workers = self.state.get() + info = workers[node_id] + info["state"] = "terminated" + self.state.put(node_id, info) + + @staticmethod + def bootstrap_config(cluster_config): + return bootstrap_local(cluster_config) + + +def record_local_head_state_if_needed(local_provider: LocalNodeProvider) -> None: + """This function is called on the Ray head from StandardAutoscaler.reset + to record the head node's own existence in the cluster state file. + + This is necessary because `provider.create_node` in + `commands.get_or_create_head_node` records the head state on the + cluster-launching machine but not on the head. + """ + head_ip = local_provider.provider_config["head_ip"] + cluster_name = local_provider.cluster_name + # If the head node is not marked as created in the cluster state file, + if head_ip not in local_provider.non_terminated_nodes({}): + # These tags are based on the ones in commands.get_or_create_head_node; + # keep in sync. + head_tags = { + TAG_RAY_NODE_KIND: NODE_KIND_HEAD, + TAG_RAY_USER_NODE_TYPE: LOCAL_CLUSTER_NODE_TYPE, + TAG_RAY_NODE_NAME: "ray-{}-head".format(cluster_name), + TAG_RAY_NODE_STATUS: STATUS_UP_TO_DATE, + } + # Mark the head node as created in the cluster state file. + local_provider.create_node(node_config={}, tags=head_tags, count=1) + + assert head_ip in local_provider.non_terminated_nodes({}) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/log_timer.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/log_timer.py new file mode 100644 index 0000000000000000000000000000000000000000..9e43d4692201c257c9971634c64633908a228f6e --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/log_timer.py @@ -0,0 +1,33 @@ +import datetime +import logging + +from ray.autoscaler._private.cli_logger import cli_logger + +logger = logging.getLogger(__name__) + + +class LogTimer: + def __init__(self, message, show_status=False): + self._message = message + self._show_status = show_status + + def __enter__(self): + self._start_time = datetime.datetime.utcnow() + + def __exit__(self, *error_vals): + if cli_logger.log_style != "record": + return + + td = datetime.datetime.utcnow() - self._start_time + status = "" + if self._show_status: + status = "failed" if any(error_vals) else "succeeded" + cli_logger.print( + " ".join( + [ + self._message, + status, + "[LogTimer={:.0f}ms]".format(td.total_seconds() * 1000), + ] + ) + ) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/monitor.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/monitor.py new file mode 100644 index 0000000000000000000000000000000000000000..d62886e3a669f7ed46f61ae4ed019e22c2f61d89 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/monitor.py @@ -0,0 +1,747 @@ +"""Autoscaler monitoring loop daemon.""" + +import argparse +import json +import logging +import os +import signal +import sys +import time +import traceback +from collections import Counter +from dataclasses import asdict +from typing import Any, Callable, Dict, Optional, Union + +import ray +import ray._private.ray_constants as ray_constants +from ray._common.ray_constants import ( + LOGGING_ROTATE_BYTES, + LOGGING_ROTATE_BACKUP_COUNT, +) +from ray._private.event.event_logger import get_event_logger +from ray._private.ray_logging import setup_component_logger +from ray._raylet import GcsClient +from ray._common.network_utils import parse_address, build_address +from ray.autoscaler._private.autoscaler import StandardAutoscaler +from ray.autoscaler._private.commands import teardown_cluster +from ray.autoscaler._private.constants import ( + AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE, + AUTOSCALER_METRIC_PORT, + AUTOSCALER_UPDATE_INTERVAL_S, + DISABLE_LAUNCH_CONFIG_CHECK_KEY, +) +from ray.autoscaler._private.event_summarizer import EventSummarizer +from ray.autoscaler._private.load_metrics import LoadMetrics +from ray.autoscaler._private.prom_metrics import AutoscalerPrometheusMetrics +from ray.autoscaler._private.util import format_readonly_node_type +from ray.autoscaler.v2.sdk import get_cluster_resource_state +from ray.core.generated import gcs_pb2 +from ray.core.generated.event_pb2 import Event as RayEvent +from ray.experimental.internal_kv import ( + _initialize_internal_kv, + _internal_kv_del, + _internal_kv_get, + _internal_kv_initialized, + _internal_kv_put, +) +from ray._private import logging_utils + +try: + import prometheus_client +except ImportError: + prometheus_client = None + + +logger = logging.getLogger(__name__) + + +def parse_resource_demands(resource_load_by_shape): + """Handle the message.resource_load_by_shape protobuf for the demand + based autoscaling. Catch and log all exceptions so this doesn't + interfere with the utilization based autoscaler until we're confident + this is stable. Worker queue backlogs are added to the appropriate + resource demand vector. + + Args: + resource_load_by_shape (pb2.gcs.ResourceLoad): The resource demands + in protobuf form or None. + + Returns: + List[ResourceDict]: Waiting bundles (ready and feasible). + List[ResourceDict]: Infeasible bundles. + """ + waiting_bundles, infeasible_bundles = [], [] + try: + for resource_demand_pb in list(resource_load_by_shape.resource_demands): + request_shape = dict(resource_demand_pb.shape) + for _ in range(resource_demand_pb.num_ready_requests_queued): + waiting_bundles.append(request_shape) + for _ in range(resource_demand_pb.num_infeasible_requests_queued): + infeasible_bundles.append(request_shape) + + # Infeasible and ready states for tasks are (logically) + # mutually exclusive. + if resource_demand_pb.num_infeasible_requests_queued > 0: + backlog_queue = infeasible_bundles + else: + backlog_queue = waiting_bundles + for _ in range(resource_demand_pb.backlog_size): + backlog_queue.append(request_shape) + if ( + len(waiting_bundles + infeasible_bundles) + > AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE + ): + break + except Exception: + logger.exception("Failed to parse resource demands.") + + return waiting_bundles, infeasible_bundles + + +# Readonly provider config (e.g., for laptop mode, manually setup clusters). +BASE_READONLY_CONFIG = { + "cluster_name": "default", + "max_workers": 0, + "upscaling_speed": 1.0, + "docker": {}, + "idle_timeout_minutes": 0, + "provider": { + "type": "readonly", + "use_node_id_as_ip": True, # For emulated multi-node on laptop. + DISABLE_LAUNCH_CONFIG_CHECK_KEY: True, # No launch check. + }, + "auth": {}, + "available_node_types": { + "ray.head.default": {"resources": {}, "node_config": {}, "max_workers": 0} + }, + "head_node_type": "ray.head.default", + "file_mounts": {}, + "cluster_synced_files": [], + "file_mounts_sync_continuously": False, + "rsync_exclude": [], + "rsync_filter": [], + "initialization_commands": [], + "setup_commands": [], + "head_setup_commands": [], + "worker_setup_commands": [], + "head_start_ray_commands": [], + "worker_start_ray_commands": [], +} + + +class Monitor: + """Autoscaling monitor. + + This process periodically collects stats from the GCS and triggers + autoscaler updates. + """ + + def __init__( + self, + address: str, + autoscaling_config: Union[str, Callable[[], Dict[str, Any]]], + log_dir: str = None, + prefix_cluster_info: bool = False, + monitor_ip: Optional[str] = None, + retry_on_failure: bool = True, + ): + self.gcs_address = address + worker = ray._private.worker.global_worker + # TODO: eventually plumb ClusterID through to here + self.gcs_client = GcsClient(address=self.gcs_address) + + _initialize_internal_kv(self.gcs_client) + + if monitor_ip: + monitor_addr = build_address(monitor_ip, AUTOSCALER_METRIC_PORT) + self.gcs_client.internal_kv_put( + b"AutoscalerMetricsAddress", monitor_addr.encode(), True, None + ) + self._session_name = self.get_session_name(self.gcs_client) + logger.info(f"session_name: {self._session_name}") + worker.mode = 0 + head_node_ip = parse_address(self.gcs_address)[0] + + self.load_metrics = LoadMetrics() + self.last_avail_resources = None + self.event_summarizer = EventSummarizer() + self.prefix_cluster_info = prefix_cluster_info + self.retry_on_failure = retry_on_failure + self.autoscaling_config = autoscaling_config + self.autoscaler = None + # If set, we are in a manually created cluster (non-autoscaling) and + # simply mirroring what the GCS tells us the cluster node types are. + self.readonly_config = None + + if log_dir: + try: + self.event_logger = get_event_logger( + RayEvent.SourceType.AUTOSCALER, log_dir + ) + except Exception: + self.event_logger = None + else: + self.event_logger = None + + self.prom_metrics = AutoscalerPrometheusMetrics(session_name=self._session_name) + + if monitor_ip and prometheus_client: + # If monitor_ip wasn't passed in, then don't attempt to start the + # metric server to keep behavior identical to before metrics were + # introduced + try: + logger.info( + "Starting autoscaler metrics server on port {}".format( + AUTOSCALER_METRIC_PORT + ) + ) + kwargs = {"addr": "127.0.0.1"} if head_node_ip == "127.0.0.1" else {} + prometheus_client.start_http_server( + port=AUTOSCALER_METRIC_PORT, + registry=self.prom_metrics.registry, + **kwargs, + ) + + # Reset some gauges, since we don't know which labels have + # leaked if the autoscaler was restarted. + self.prom_metrics.pending_nodes.clear() + self.prom_metrics.active_nodes.clear() + except Exception: + logger.exception( + "An exception occurred while starting the metrics server." + ) + elif not prometheus_client: + logger.warning( + "`prometheus_client` not found, so metrics will not be exported." + ) + + logger.info("Monitor: Started") + + def _initialize_autoscaler(self): + if self.autoscaling_config: + autoscaling_config = self.autoscaling_config + else: + # This config mirrors the current setup of the manually created + # cluster. Each node gets its own unique node type. + self.readonly_config = BASE_READONLY_CONFIG + + # Note that the "available_node_types" of the config can change. + def get_latest_readonly_config(): + return self.readonly_config + + autoscaling_config = get_latest_readonly_config + self.autoscaler = StandardAutoscaler( + autoscaling_config, + self.load_metrics, + self.gcs_client, + self._session_name, + prefix_cluster_info=self.prefix_cluster_info, + event_summarizer=self.event_summarizer, + prom_metrics=self.prom_metrics, + ) + + def update_load_metrics(self): + """Fetches resource usage data from GCS and updates load metrics.""" + + response = self.gcs_client.get_all_resource_usage(timeout=60) + resources_batch_data = response.resource_usage_data + log_resource_batch_data_if_desired(resources_batch_data) + + # This is a workaround to get correct idle_duration_ms + # from "get_cluster_resource_state" + # ref: https://github.com/ray-project/ray/pull/48519#issuecomment-2481659346 + cluster_resource_state = get_cluster_resource_state(self.gcs_client) + ray_node_states = cluster_resource_state.node_states + ray_nodes_idle_duration_ms_by_id = { + node.node_id: node.idle_duration_ms for node in ray_node_states + } + + # Tell the readonly node provider what nodes to report. + if self.readonly_config: + new_nodes = [] + for msg in list(resources_batch_data.batch): + node_id = msg.node_id.hex() + new_nodes.append((node_id, msg.node_manager_address)) + self.autoscaler.provider._set_nodes(new_nodes) + + mirror_node_types = {} + cluster_full = False + if ( + hasattr(response, "cluster_full_of_actors_detected_by_gcs") + and response.cluster_full_of_actors_detected_by_gcs + ): + # GCS has detected the cluster full of actors. + cluster_full = True + for resource_message in resources_batch_data.batch: + node_id = resource_message.node_id + # Generate node type config based on GCS reported node list. + if self.readonly_config: + # Keep prefix in sync with ReadonlyNodeProvider. + node_type = format_readonly_node_type(node_id.hex()) + resources = {} + for k, v in resource_message.resources_total.items(): + resources[k] = v + mirror_node_types[node_type] = { + "resources": resources, + "node_config": {}, + "max_workers": 1, + } + if ( + hasattr(resource_message, "cluster_full_of_actors_detected") + and resource_message.cluster_full_of_actors_detected + ): + # A worker node has detected the cluster full of actors. + cluster_full = True + total_resources = dict(resource_message.resources_total) + available_resources = dict(resource_message.resources_available) + + waiting_bundles, infeasible_bundles = parse_resource_demands( + resources_batch_data.resource_load_by_shape + ) + + pending_placement_groups = list( + resources_batch_data.placement_group_load.placement_group_data + ) + + use_node_id_as_ip = self.autoscaler is not None and self.autoscaler.config[ + "provider" + ].get("use_node_id_as_ip", False) + + # "use_node_id_as_ip" is a hack meant to address situations in + # which there's more than one Ray node residing at a given ip. + # TODO (Dmitri): Stop using ips as node identifiers. + # https://github.com/ray-project/ray/issues/19086 + if use_node_id_as_ip: + peloton_id = total_resources.get("NODE_ID_AS_RESOURCE") + # Legacy support https://github.com/ray-project/ray/pull/17312 + if peloton_id is not None: + ip = str(int(peloton_id)) + else: + ip = node_id.hex() + else: + ip = resource_message.node_manager_address + + idle_duration_s = 0.0 + if node_id in ray_nodes_idle_duration_ms_by_id: + idle_duration_s = ray_nodes_idle_duration_ms_by_id[node_id] / 1000 + else: + logger.warning( + f"node_id {node_id} not found in ray_nodes_idle_duration_ms_by_id" + ) + + self.load_metrics.update( + ip, + node_id, + total_resources, + available_resources, + idle_duration_s, + waiting_bundles, + infeasible_bundles, + pending_placement_groups, + cluster_full, + ) + if self.readonly_config: + self.readonly_config["available_node_types"].update(mirror_node_types) + + def get_session_name(self, gcs_client: GcsClient) -> Optional[str]: + """Obtain the session name from the GCS. + + If the GCS doesn't respond, session name is considered None. + In this case, the metrics reported from the monitor won't have + the correct session name. + """ + if not _internal_kv_initialized(): + return None + + session_name = gcs_client.internal_kv_get( + b"session_name", + ray_constants.KV_NAMESPACE_SESSION, + timeout=10, + ) + + if session_name: + session_name = session_name.decode() + + return session_name + + def update_resource_requests(self): + """Fetches resource requests from the internal KV and updates load.""" + if not _internal_kv_initialized(): + return + data = _internal_kv_get( + ray._private.ray_constants.AUTOSCALER_RESOURCE_REQUEST_CHANNEL + ) + if data: + try: + resource_request = json.loads(data) + self.load_metrics.set_resource_requests(resource_request) + except Exception: + logger.exception("Error parsing resource requests") + + def _run(self): + """Run the monitor loop.""" + + while True: + try: + gcs_request_start_time = time.time() + self.update_load_metrics() + gcs_request_time = time.time() - gcs_request_start_time + self.update_resource_requests() + self.update_event_summary() + load_metrics_summary = self.load_metrics.summary() + status = { + "gcs_request_time": gcs_request_time, + "time": time.time(), + "monitor_pid": os.getpid(), + } + + if self.autoscaler and not self.load_metrics: + # load_metrics is Falsey iff we haven't collected any + # resource messages from the GCS, which can happen at startup if + # the GCS hasn't yet received data from the Raylets. + # In this case, do not do an autoscaler update. + # Wait to get load metrics. + logger.info( + "Autoscaler has not yet received load metrics. Waiting." + ) + elif self.autoscaler: + # Process autoscaling actions + update_start_time = time.time() + self.autoscaler.update() + status["autoscaler_update_time"] = time.time() - update_start_time + autoscaler_summary = self.autoscaler.summary() + try: + self.emit_metrics( + load_metrics_summary, + autoscaler_summary, + self.autoscaler.all_node_types, + ) + except Exception: + logger.exception("Error emitting metrics") + + if autoscaler_summary: + status["autoscaler_report"] = asdict(autoscaler_summary) + status[ + "non_terminated_nodes_time" + ] = ( + self.autoscaler.non_terminated_nodes.non_terminated_nodes_time # noqa: E501 + ) + + for msg in self.event_summarizer.summary(): + # Need to prefix each line of the message for the lines to + # get pushed to the driver logs. + for line in msg.split("\n"): + logger.info( + "{}{}".format( + ray_constants.LOG_PREFIX_EVENT_SUMMARY, line + ) + ) + if self.event_logger: + self.event_logger.info(line) + + self.event_summarizer.clear() + + status["load_metrics_report"] = asdict(load_metrics_summary) + as_json = json.dumps(status) + if _internal_kv_initialized(): + _internal_kv_put( + ray_constants.DEBUG_AUTOSCALING_STATUS, as_json, overwrite=True + ) + except Exception: + # By default, do not exit the monitor on failure. + if self.retry_on_failure: + logger.exception("Monitor: Execution exception. Trying again...") + else: + raise + + # Wait for a autoscaler update interval before processing the next + # round of messages. + time.sleep(AUTOSCALER_UPDATE_INTERVAL_S) + + def emit_metrics(self, load_metrics_summary, autoscaler_summary, node_types): + if autoscaler_summary is None: + return None + + for resource_name in ["CPU", "GPU", "TPU"]: + _, total = load_metrics_summary.usage.get(resource_name, (0, 0)) + pending = autoscaler_summary.pending_resources.get(resource_name, 0) + self.prom_metrics.cluster_resources.labels( + resource=resource_name, + SessionName=self.prom_metrics.session_name, + ).set(total) + self.prom_metrics.pending_resources.labels( + resource=resource_name, + SessionName=self.prom_metrics.session_name, + ).set(pending) + + pending_node_count = Counter() + for _, node_type, _ in autoscaler_summary.pending_nodes: + pending_node_count[node_type] += 1 + + for node_type, count in autoscaler_summary.pending_launches.items(): + pending_node_count[node_type] += count + + for node_type in node_types: + count = pending_node_count[node_type] + self.prom_metrics.pending_nodes.labels( + SessionName=self.prom_metrics.session_name, + NodeType=node_type, + ).set(count) + + for node_type in node_types: + count = autoscaler_summary.active_nodes.get(node_type, 0) + self.prom_metrics.active_nodes.labels( + SessionName=self.prom_metrics.session_name, + NodeType=node_type, + ).set(count) + + failed_node_counts = Counter() + for _, node_type in autoscaler_summary.failed_nodes: + failed_node_counts[node_type] += 1 + + # NOTE: This metric isn't reset with monitor resets. This means it will + # only be updated when the autoscaler' node tracker remembers failed + # nodes. If the node type failure is evicted from the autoscaler, the + # metric may not update for a while. + for node_type, count in failed_node_counts.items(): + self.prom_metrics.recently_failed_nodes.labels( + SessionName=self.prom_metrics.session_name, + NodeType=node_type, + ).set(count) + + def update_event_summary(self): + """Report the current size of the cluster. + + To avoid log spam, only cluster size changes (CPU, GPU or TPU count change) + are reported to the event summarizer. The event summarizer will report + only the latest cluster size per batch. + """ + avail_resources = self.load_metrics.resources_avail_summary() + if not self.readonly_config and avail_resources != self.last_avail_resources: + self.event_summarizer.add( + "Resized to {}.", # e.g., Resized to 100 CPUs, 4 GPUs, 4 TPUs. + quantity=avail_resources, + aggregate=lambda old, new: new, + ) + self.last_avail_resources = avail_resources + + def destroy_autoscaler_workers(self): + """Cleanup the autoscaler, in case of an exception in the run() method. + + We kill the worker nodes, but retain the head node in order to keep + logs around, keeping costs minimal. This monitor process runs on the + head node anyway, so this is more reliable.""" + + if self.autoscaler is None: + return # Nothing to clean up. + + if self.autoscaling_config is None: + # This is a logic error in the program. Can't do anything. + logger.error("Monitor: Cleanup failed due to lack of autoscaler config.") + return + + logger.info("Monitor: Exception caught. Taking down workers...") + clean = False + while not clean: + try: + teardown_cluster( + config_file=self.autoscaling_config, + yes=True, # Non-interactive. + workers_only=True, # Retain head node for logs. + override_cluster_name=None, + keep_min_workers=True, # Retain minimal amount of workers. + ) + clean = True + logger.info("Monitor: Workers taken down.") + except Exception: + logger.error("Monitor: Cleanup exception. Trying again...") + time.sleep(2) + + def _handle_failure(self, error): + if ( + self.autoscaler is not None + and os.environ.get("RAY_AUTOSCALER_FATESHARE_WORKERS", "") == "1" + ): + self.autoscaler.kill_workers() + # Take down autoscaler workers if necessary. + self.destroy_autoscaler_workers() + + # Something went wrong, so push an error to all current and future + # drivers. + message = f"The autoscaler failed with the following error:\n{error}" + if _internal_kv_initialized(): + _internal_kv_put( + ray_constants.DEBUG_AUTOSCALING_ERROR, message, overwrite=True + ) + from ray._private.utils import publish_error_to_driver + + publish_error_to_driver( + ray_constants.MONITOR_DIED_ERROR, + message, + gcs_client=self.gcs_client, + ) + + def _signal_handler(self, sig, frame): + try: + self._handle_failure( + f"Terminated with signal {sig}\n" + + "".join(traceback.format_stack(frame)) + ) + except Exception: + logger.exception("Monitor: Failure in signal handler.") + sys.exit(sig + 128) + + def run(self): + # Register signal handlers for autoscaler termination. + # Signals will not be received on windows + signal.signal(signal.SIGINT, self._signal_handler) + signal.signal(signal.SIGTERM, self._signal_handler) + try: + if _internal_kv_initialized(): + # Delete any previous autoscaling errors. + _internal_kv_del(ray_constants.DEBUG_AUTOSCALING_ERROR) + self._initialize_autoscaler() + self._run() + except Exception: + logger.exception("Error in monitor loop") + self._handle_failure(traceback.format_exc()) + raise + + +def log_resource_batch_data_if_desired( + resources_batch_data: gcs_pb2.ResourceUsageBatchData, +) -> None: + if os.getenv("AUTOSCALER_LOG_RESOURCE_BATCH_DATA") == "1": + logger.info("Logging raw resource message pulled from GCS.") + logger.info(resources_batch_data) + logger.info("Done logging raw resource message.") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description=("Parse GCS server for the monitor to connect to.") + ) + parser.add_argument( + "--gcs-address", required=False, type=str, help="The address (ip:port) of GCS." + ) + parser.add_argument( + "--autoscaling-config", + required=False, + type=str, + help="the path to the autoscaling config file", + ) + parser.add_argument( + "--logging-level", + required=False, + type=str, + default=ray_constants.LOGGER_LEVEL, + choices=ray_constants.LOGGER_LEVEL_CHOICES, + help=ray_constants.LOGGER_LEVEL_HELP, + ) + parser.add_argument( + "--logging-format", + required=False, + type=str, + default=ray_constants.LOGGER_FORMAT, + help=ray_constants.LOGGER_FORMAT_HELP, + ) + parser.add_argument( + "--logging-filename", + required=False, + type=str, + default=ray_constants.MONITOR_LOG_FILE_NAME, + help="Specify the name of log file, " + "log to stdout if set empty, default is " + f'"{ray_constants.MONITOR_LOG_FILE_NAME}"', + ) + parser.add_argument( + "--logs-dir", + required=True, + type=str, + help="Specify the path of the temporary directory used by Ray processes.", + ) + parser.add_argument( + "--logging-rotate-bytes", + required=False, + type=int, + default=LOGGING_ROTATE_BYTES, + help="Specify the max bytes for rotating " + "log file, default is " + f"{LOGGING_ROTATE_BYTES} bytes.", + ) + parser.add_argument( + "--logging-rotate-backup-count", + required=False, + type=int, + default=LOGGING_ROTATE_BACKUP_COUNT, + help="Specify the backup count of rotated log file, default is " + f"{LOGGING_ROTATE_BACKUP_COUNT}.", + ) + parser.add_argument( + "--monitor-ip", + required=False, + type=str, + default=None, + help="The IP address of the machine hosting the monitor process.", + ) + parser.add_argument( + "--stdout-filepath", + required=False, + type=str, + default="", + help="The filepath to dump monitor stdout.", + ) + parser.add_argument( + "--stderr-filepath", + required=False, + type=str, + default="", + help="The filepath to dump monitor stderr.", + ) + + args = parser.parse_args() + + # Disable log rotation for windows, because NTFS doesn't allow file deletion when there're multiple owners or borrowers, which happens to be how ray accesses log files. + logging_rotation_bytes = args.logging_rotate_bytes if sys.platform != "win32" else 0 + logging_rotation_backup_count = ( + args.logging_rotate_backup_count if sys.platform != "win32" else 1 + ) + setup_component_logger( + logging_level=args.logging_level, + logging_format=args.logging_format, + log_dir=args.logs_dir, + filename=args.logging_filename, + max_bytes=logging_rotation_bytes, + backup_count=logging_rotation_backup_count, + ) + + # Setup stdout/stderr redirect files if redirection enabled. + logging_utils.redirect_stdout_stderr_if_needed( + args.stdout_filepath, + args.stderr_filepath, + logging_rotation_bytes, + logging_rotation_backup_count, + ) + + logger.info(f"Starting monitor using ray installation: {ray.__file__}") + logger.info(f"Ray version: {ray.__version__}") + logger.info(f"Ray commit: {ray.__commit__}") + logger.info(f"Monitor started with command: {sys.argv}") + + if args.autoscaling_config: + autoscaling_config = os.path.expanduser(args.autoscaling_config) + else: + autoscaling_config = None + + bootstrap_address = args.gcs_address + if bootstrap_address is None: + raise ValueError("--gcs-address must be set!") + + monitor = Monitor( + bootstrap_address, + autoscaling_config, + log_dir=args.logs_dir, + monitor_ip=args.monitor_ip, + ) + + monitor.run() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/node_launcher.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/node_launcher.py new file mode 100644 index 0000000000000000000000000000000000000000..a457a7703c1c43ff65feba155044bf83b7b71ae0 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/node_launcher.py @@ -0,0 +1,221 @@ +import copy +import logging +import operator +import threading +import time +import traceback +from typing import Any, Dict, Optional + +from ray.autoscaler._private.node_provider_availability_tracker import ( + NodeProviderAvailabilityTracker, +) +from ray.autoscaler._private.prom_metrics import AutoscalerPrometheusMetrics +from ray.autoscaler._private.util import hash_launch_conf +from ray.autoscaler.node_launch_exception import NodeLaunchException +from ray.autoscaler.tags import ( + NODE_KIND_WORKER, + STATUS_UNINITIALIZED, + TAG_RAY_LAUNCH_CONFIG, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, + TAG_RAY_USER_NODE_TYPE, +) + +logger = logging.getLogger(__name__) + + +class BaseNodeLauncher: + """Launches Ray nodes in the main thread using + `BaseNodeLauncher.launch_node()`. + + This is a superclass of NodeLauncher, which launches nodes asynchronously + in the background. + + By default, the subclass NodeLauncher is used to launch nodes in subthreads. + That behavior can be flagged off in the provider config by setting + `foreground_node_launch: True`; the autoscaler will then makes blocking calls to + BaseNodeLauncher.launch_node() in the main thread. + """ + + def __init__( + self, + provider, + pending, + event_summarizer, + node_provider_availability_tracker: NodeProviderAvailabilityTracker, + session_name: Optional[str] = None, + prom_metrics=None, + node_types=None, + index=None, + *args, + **kwargs, + ): + self.pending = pending + self.event_summarizer = event_summarizer + self.node_provider_availability_tracker = node_provider_availability_tracker + self.prom_metrics = prom_metrics or AutoscalerPrometheusMetrics( + session_name=session_name + ) + self.provider = provider + self.node_types = node_types + self.index = str(index) if index is not None else "" + + def launch_node( + self, config: Dict[str, Any], count: int, node_type: str + ) -> Optional[Dict]: + self.log("Got {} nodes to launch.".format(count)) + created_nodes = self._launch_node(config, count, node_type) + self.pending.dec(node_type, count) + return created_nodes + + def _launch_node( + self, config: Dict[str, Any], count: int, node_type: str + ) -> Optional[Dict]: + if self.node_types: + assert node_type, node_type + + # The `worker_nodes` field is deprecated in favor of per-node-type + # node_configs. We allow it for backwards-compatibility. + launch_config = copy.deepcopy(config.get("worker_nodes", {})) + if node_type: + launch_config.update( + config["available_node_types"][node_type]["node_config"] + ) + resources = copy.deepcopy( + config["available_node_types"][node_type]["resources"] + ) + labels = copy.deepcopy( + config["available_node_types"][node_type].get("labels", {}) + ) + launch_hash = hash_launch_conf(launch_config, config["auth"]) + node_config = copy.deepcopy(config.get("worker_nodes", {})) + node_tags = { + TAG_RAY_NODE_NAME: "ray-{}-worker".format(config["cluster_name"]), + TAG_RAY_NODE_KIND: NODE_KIND_WORKER, + TAG_RAY_NODE_STATUS: STATUS_UNINITIALIZED, + TAG_RAY_LAUNCH_CONFIG: launch_hash, + } + # A custom node type is specified; set the tag in this case, and also + # merge the configs. We merge the configs instead of overriding, so + # that the bootstrapped per-cloud properties are preserved. + # TODO(ekl) this logic is duplicated in commands.py (keep in sync) + if node_type: + node_tags[TAG_RAY_USER_NODE_TYPE] = node_type + node_config.update(launch_config) + + node_launch_start_time = time.time() + + error_msg = None + full_exception = None + created_nodes = {} + try: + created_nodes = self.provider.create_node_with_resources_and_labels( + node_config, node_tags, count, resources, labels + ) + except NodeLaunchException as node_launch_exception: + self.node_provider_availability_tracker.update_node_availability( + node_type, int(node_launch_start_time), node_launch_exception + ) + + if node_launch_exception.src_exc_info is not None: + full_exception = "\n".join( + traceback.format_exception(*node_launch_exception.src_exc_info) + ) + + error_msg = ( + f"Failed to launch {{}} node(s) of type {node_type}. " + f"({node_launch_exception.category}): " + f"{node_launch_exception.description}" + ) + except Exception: + error_msg = f"Failed to launch {{}} node(s) of type {node_type}." + full_exception = traceback.format_exc() + else: + # Record some metrics/observability information when a node is launched. + launch_time = time.time() - node_launch_start_time + for _ in range(count): + # Note: when launching multiple nodes we observe the time it + # took all nodes to launch for each node. For example, if 4 + # nodes were created in 25 seconds, we would observe the 25 + # second create time 4 times. + self.prom_metrics.worker_create_node_time.observe(launch_time) + self.prom_metrics.started_nodes.inc(count) + self.node_provider_availability_tracker.update_node_availability( + node_type=node_type, + timestamp=int(node_launch_start_time), + node_launch_exception=None, + ) + + if error_msg is not None: + self.event_summarizer.add( + error_msg, + quantity=count, + aggregate=operator.add, + ) + self.log(error_msg) + self.prom_metrics.node_launch_exceptions.inc() + self.prom_metrics.failed_create_nodes.inc(count) + else: + self.log("Launching {} nodes, type {}.".format(count, node_type)) + self.event_summarizer.add( + "Adding {} node(s) of type " + str(node_type) + ".", + quantity=count, + aggregate=operator.add, + ) + + if full_exception is not None: + self.log(full_exception) + + return created_nodes + + def log(self, statement): + # launcher_class is "BaseNodeLauncher", or "NodeLauncher" if called + # from that subclass. + launcher_class: str = type(self).__name__ + prefix = "{}{}:".format(launcher_class, self.index) + logger.info(prefix + " {}".format(statement)) + + +class NodeLauncher(BaseNodeLauncher, threading.Thread): + """Launches nodes asynchronously in the background.""" + + def __init__( + self, + provider, + queue, + pending, + event_summarizer, + node_provider_availability_tracker, + session_name: Optional[str] = None, + prom_metrics=None, + node_types=None, + index=None, + *thread_args, + **thread_kwargs, + ): + self.queue = queue + BaseNodeLauncher.__init__( + self, + provider=provider, + pending=pending, + event_summarizer=event_summarizer, + session_name=session_name, + node_provider_availability_tracker=node_provider_availability_tracker, + prom_metrics=prom_metrics, + node_types=node_types, + index=index, + ) + threading.Thread.__init__(self, *thread_args, **thread_kwargs) + + def run(self): + """Collects launch data from queue populated by StandardAutoscaler. + Launches nodes in a background thread. + + Overrides threading.Thread.run(). + NodeLauncher.start() executes this loop in a background thread. + """ + while True: + config, count, node_type = self.queue.get() + # launch_node is implemented in BaseNodeLauncher + self.launch_node(config, count, node_type) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/node_provider_availability_tracker.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/node_provider_availability_tracker.py new file mode 100644 index 0000000000000000000000000000000000000000..9126ab4b0fea9d0e90a041915ab7d21991dbde50 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/node_provider_availability_tracker.py @@ -0,0 +1,165 @@ +import threading +import time +from dataclasses import dataclass +from typing import Callable, Dict, Optional, Tuple + +from ray.autoscaler._private.constants import ( + AUTOSCALER_NODE_AVAILABILITY_MAX_STALENESS_S, +) +from ray.autoscaler.node_launch_exception import NodeLaunchException + + +@dataclass +class UnavailableNodeInformation: + category: str + description: str + + +@dataclass +class NodeAvailabilityRecord: + node_type: str + is_available: bool + last_checked_timestamp: float + unavailable_node_information: Optional[UnavailableNodeInformation] + + +@dataclass +class NodeAvailabilitySummary: + node_availabilities: Dict[ + str, NodeAvailabilityRecord + ] # Mapping from node type to node availability record. + + @classmethod + def from_fields(cls, **fields) -> Optional["NodeAvailabilitySummary"]: + """Implement marshalling from nested fields. pydantic isn't a core dependency + so we're implementing this by hand instead.""" + parsed = {} + + node_availabilites_dict = fields.get("node_availabilities", {}) + + for node_type, node_availability_record_dict in node_availabilites_dict.items(): + unavailable_information_dict = node_availability_record_dict.pop( + "unavailable_node_information", None + ) + unavaiable_information = None + if unavailable_information_dict is not None: + unavaiable_information = UnavailableNodeInformation( + **unavailable_information_dict + ) + + parsed[node_type] = NodeAvailabilityRecord( + unavailable_node_information=unavaiable_information, + **node_availability_record_dict, + ) + + return NodeAvailabilitySummary(node_availabilities=parsed) + + def __eq__(self, other: "NodeAvailabilitySummary"): + return self.node_availabilities == other.node_availabilities + + def __bool__(self) -> bool: + return bool(self.node_availabilities) + + +class NodeProviderAvailabilityTracker: + """A thread safe, TTL cache of node provider availability. We don't use + cachetools.TTLCache because it always sets the expiration time relative to + insertion time, but in our case, we want entries to expire relative to when + the node creation was attempted (and entries aren't necessarily added in + order). We want the entries to expire because the information grows stale + over time. + """ + + def __init__( + self, + timer: Callable[[], float] = time.time, + ttl: float = AUTOSCALER_NODE_AVAILABILITY_MAX_STALENESS_S, + ): + """A cache that tracks the availability of nodes and throw away + entries which have grown too stale. + + Args: + timer: A function that returns the current time in seconds. + ttl: The ttl from the insertion timestamp of an entry. + """ + self.timer = timer + self.ttl = ttl + # Mapping from node type to (eviction_time, record) + self.store: Dict[str, Tuple[float, NodeAvailabilityRecord]] = {} + # A global lock to simplify thread safety handling. + self.lock = threading.RLock() + + def _update_node_availability_requires_lock( + self, + node_type: str, + timestamp: int, + node_launch_exception: Optional[NodeLaunchException], + ) -> None: + if node_launch_exception is None: + record = NodeAvailabilityRecord( + node_type=node_type, + is_available=True, + last_checked_timestamp=timestamp, + unavailable_node_information=None, + ) + else: + info = UnavailableNodeInformation( + category=node_launch_exception.category, + description=node_launch_exception.description, + ) + record = NodeAvailabilityRecord( + node_type=node_type, + is_available=False, + last_checked_timestamp=timestamp, + unavailable_node_information=info, + ) + + expiration_time = timestamp + self.ttl + + # TODO (Alex): In theory it would be nice to make this dictionary + # ordered by expiration time, unfortunately that's a bit difficult + # since `update_node_availability` can be called with out of order + # timestamps. + self.store[node_type] = (expiration_time, record) + + self._remove_old_entries() + + def update_node_availability( + self, + node_type: str, + timestamp: int, + node_launch_exception: Optional[NodeLaunchException], + ) -> None: + """ + Update the availability and details of a single ndoe type. + + Args: + node_type: The node type. + timestamp: The timestamp that this information is accurate as of. + node_launch_exception: Details about why the node launch failed. If + empty, the node type will be considered available.""" + with self.lock: + self._update_node_availability_requires_lock( + node_type, timestamp, node_launch_exception + ) + + def summary(self) -> NodeAvailabilitySummary: + """ + Returns a summary of node availabilities and their staleness. + + Returns + A summary of node availabilities and their staleness. + """ + with self.lock: + self._remove_old_entries() + return NodeAvailabilitySummary( + {node_type: record for node_type, (_, record) in self.store.items()} + ) + + def _remove_old_entries(self): + """Remove any expired entries from the cache.""" + cur_time = self.timer() + with self.lock: + for key, (expiration_time, _) in list(self.store.items()): + if expiration_time < cur_time: + del self.store[key] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/node_tracker.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/node_tracker.py new file mode 100644 index 0000000000000000000000000000000000000000..1b25117fc3bea6c81110fc9677ebd172e7eff789 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/node_tracker.py @@ -0,0 +1,77 @@ +from typing import List, Set, Tuple + +from ray.autoscaler._private import constants + + +class NodeTracker: + """Map nodes to their corresponding logs. + + We need to be a little careful here. At an given point in time, node_id <-> + ip can be interchangeably used, but the node_id -> ip relation is not + bijective _across time_ since IP addresses can be reused. Therefore, we + should treat node_id as the only unique identifier. + """ + + def __init__(self): + # Mapping from node_id -> (ip, node type, stdout_path, process runner) + self.node_mapping = {} + + # A quick, inefficient FIFO cache implementation. + self.lru_order = [] + + def _add_node_mapping(self, node_id: str, value: str): + if node_id in self.node_mapping: + return + + assert len(self.lru_order) == len(self.node_mapping) + if len(self.lru_order) >= constants.AUTOSCALER_MAX_NODES_TRACKED: + # The LRU eviction case + node_id = self.lru_order.pop(0) + del self.node_mapping[node_id] + + self.node_mapping[node_id] = value + self.lru_order.append(node_id) + + def track(self, node_id: str, ip: str, node_type: str): + """ + Begin to track a new node. + + Args: + node_id: The node id. + ip: The node ip address. + node_type: The node type. + """ + if node_id not in self.node_mapping: + self._add_node_mapping(node_id, (ip, node_type)) + + def untrack(self, node_id: str): + """Gracefully stop tracking a node. If a node is intentionally removed from + the cluster, we should stop tracking it so we don't mistakenly mark it + as failed. + + Args: + node_id: The node id which failed. + """ + if node_id in self.node_mapping: + self.lru_order.remove(node_id) + del self.node_mapping[node_id] + + def get_all_failed_node_info( + self, non_failed_ids: Set[str] + ) -> List[Tuple[str, str]]: + """Get the information about all failed nodes. A failed node is any node which + we began to track that is not pending or alive (i.e. not failed). + + Args: + non_failed_ids: Nodes are failed unless they are in this set. + + Returns: + List[Tuple[str, str]]: A list of tuples. Each tuple is the ip + address and type of a failed node. + """ + failed_nodes = self.node_mapping.keys() - non_failed_ids + failed_info = [] + # Returning the list in order is important for display purposes. + for node_id in filter(lambda node_id: node_id in failed_nodes, self.lru_order): + failed_info.append(self.node_mapping[node_id]) + return failed_info diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/prom_metrics.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/prom_metrics.py new file mode 100644 index 0000000000000000000000000000000000000000..a86407f3e030a54381961f33cd281b4479eff78f --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/prom_metrics.py @@ -0,0 +1,292 @@ +from typing import Optional + + +class NullMetric: + """Mock metric class to be used in case of prometheus_client import error.""" + + def set(self, *args, **kwargs): + pass + + def observe(self, *args, **kwargs): + pass + + def inc(self, *args, **kwargs): + pass + + def labels(self, *args, **kwargs): + return self + + def clear(self): + pass + + +try: + + from prometheus_client import CollectorRegistry, Counter, Gauge, Histogram + + # The metrics in this class should be kept in sync with + # python/ray/tests/test_metrics_agent.py + class AutoscalerPrometheusMetrics: + def __init__( + self, session_name: str = None, registry: Optional[CollectorRegistry] = None + ): + self.registry: CollectorRegistry = registry or CollectorRegistry( + auto_describe=True + ) + self._session_name = session_name + # Buckets: 5 seconds, 10 seconds, 20 seconds, 30 seconds, + # 45 seconds, 1 minute, 1.5 minutes, 2 minutes, + # 3 minutes, 4 minutes, 5 minutes, 6 minutes, + # 8 minutes, 10 minutes, 12 minutes, 15 minutes + # 20 minutes, 25 minutes, 30 minutes + # used for both worker launch time and worker update time + histogram_buckets = [ + 5, + 10, + 20, + 30, + 45, + 60, + 90, + 120, + 180, + 240, + 300, + 360, + 480, + 600, + 720, + 900, + 1200, + 1500, + 1800, + ] + # Buckets: .01 seconds to 1000 seconds. + # Used for autoscaler update time. + update_time_buckets = [0.01, 0.1, 1, 10, 100, 1000] + self.worker_create_node_time: Histogram = Histogram( + "worker_create_node_time_seconds", + "Worker launch time. This is the time it takes for a call to " + "a node provider's create_node method to return. Note that " + "when nodes are launched in batches, the launch time for that " + "batch will be observed once for *each* node in that batch. " + "For example, if 8 nodes are launched in 3 minutes, a launch " + "time of 3 minutes will be observed 8 times.", + labelnames=("SessionName",), + unit="seconds", + namespace="autoscaler", + registry=self.registry, + buckets=histogram_buckets, + ).labels(SessionName=session_name) + self.worker_update_time: Histogram = Histogram( + "worker_update_time_seconds", + "Worker update time. This is the time between when an updater " + "thread begins executing and when it exits successfully. This " + "metric only observes times for successful updates.", + labelnames=("SessionName",), + unit="seconds", + namespace="autoscaler", + registry=self.registry, + buckets=histogram_buckets, + ).labels(SessionName=session_name) + self.update_time: Histogram = Histogram( + "update_time", + "Autoscaler update time. This is the time for an autoscaler " + "update iteration to complete.", + labelnames=("SessionName",), + unit="seconds", + namespace="autoscaler", + registry=self.registry, + buckets=update_time_buckets, + ).labels(SessionName=session_name) + self.pending_nodes: Gauge = Gauge( + "pending_nodes", + "Number of nodes pending to be started.", + labelnames=( + "NodeType", + "SessionName", + ), + unit="nodes", + namespace="autoscaler", + registry=self.registry, + ) + self.active_nodes: Gauge = Gauge( + "active_nodes", + "Number of nodes in the cluster.", + labelnames=( + "NodeType", + "SessionName", + ), + unit="nodes", + namespace="autoscaler", + registry=self.registry, + ) + self.recently_failed_nodes = Gauge( + "recently_failed_nodes", + "The number of recently failed nodes. This count could reset " + "at undefined times.", + labelnames=( + "NodeType", + "SessionName", + ), + unit="nodes", + namespace="autoscaler", + registry=self.registry, + ) + self.started_nodes: Counter = Counter( + "started_nodes", + "Number of nodes started.", + labelnames=("SessionName",), + unit="nodes", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.stopped_nodes: Counter = Counter( + "stopped_nodes", + "Number of nodes stopped.", + labelnames=("SessionName",), + unit="nodes", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.updating_nodes: Gauge = Gauge( + "updating_nodes", + "Number of nodes in the process of updating.", + labelnames=("SessionName",), + unit="nodes", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.recovering_nodes: Gauge = Gauge( + "recovering_nodes", + "Number of nodes in the process of recovering.", + labelnames=("SessionName",), + unit="nodes", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.running_workers: Gauge = Gauge( + "running_workers", + "Number of worker nodes running.", + labelnames=("SessionName",), + unit="nodes", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.failed_create_nodes: Counter = Counter( + "failed_create_nodes", + "Number of nodes that failed to be created due to an " + "exception in the node provider's create_node method.", + labelnames=("SessionName",), + unit="nodes", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.failed_updates: Counter = Counter( + "failed_updates", + "Number of failed worker node updates.", + labelnames=("SessionName",), + unit="updates", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.successful_updates: Counter = Counter( + "successful_updates", + "Number of succesfful worker node updates.", + labelnames=("SessionName",), + unit="updates", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.failed_recoveries: Counter = Counter( + "failed_recoveries", + "Number of failed node recoveries.", + labelnames=("SessionName",), + unit="recoveries", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.successful_recoveries: Counter = Counter( + "successful_recoveries", + "Number of successful node recoveries.", + labelnames=("SessionName",), + unit="recoveries", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.update_loop_exceptions: Counter = Counter( + "update_loop_exceptions", + "Number of exceptions raised in the update loop of the autoscaler.", + labelnames=("SessionName",), + unit="exceptions", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.node_launch_exceptions: Counter = Counter( + "node_launch_exceptions", + "Number of exceptions raised while launching nodes.", + labelnames=("SessionName",), + unit="exceptions", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.reset_exceptions: Counter = Counter( + "reset_exceptions", + "Number of exceptions raised while resetting the autoscaler.", + labelnames=("SessionName",), + unit="exceptions", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.config_validation_exceptions: Counter = Counter( + "config_validation_exceptions", + "Number of exceptions raised while validating the config " + "during a reset.", + labelnames=("SessionName",), + unit="exceptions", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + self.drain_node_exceptions: Counter = Counter( + "drain_node_exceptions", + "Number of exceptions raised when making a DrainNode rpc" + "prior to node termination.", + labelnames=("SessionName",), + unit="exceptions", + namespace="autoscaler", + registry=self.registry, + ).labels(SessionName=session_name) + # This represents the autoscaler's view of essentially + # `ray.cluster_resources()`, it may be slightly different from the + # core metric from an eventual consistency perspective. + self.cluster_resources: Gauge = Gauge( + "cluster_resources", + "Total logical resources in the cluster.", + labelnames=("resource", "SessionName"), + unit="resources", + namespace="autoscaler", + registry=self.registry, + ) + # This represents the pending launches + nodes being set up for the + # autoscaler. + self.pending_resources: Gauge = Gauge( + "pending_resources", + "Pending logical resources in the cluster.", + labelnames=("resource", "SessionName"), + unit="resources", + namespace="autoscaler", + registry=self.registry, + ) + + @property + def session_name(self): + return self._session_name + +except ImportError: + + class AutoscalerPrometheusMetrics(object): + def __init__(self, session_name: str = None): + pass + + def __getattr__(self, attr): + return NullMetric() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/providers.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/providers.py new file mode 100644 index 0000000000000000000000000000000000000000..cdcd7cd54cea72dcdf18b5ff46aab9a128a0262a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/providers.py @@ -0,0 +1,299 @@ +import copy +import json +import logging +import os +from typing import Any, Dict + +import yaml + +from ray.autoscaler._private.loader import load_function_or_class + +logger = logging.getLogger(__name__) + +# For caching provider instantiations across API calls of one python session +_provider_instances = {} + +# Minimal config for compatibility with legacy-style external configs. +MINIMAL_EXTERNAL_CONFIG = { + "available_node_types": { + "ray.head.default": {}, + "ray.worker.default": {}, + }, + "head_node_type": "ray.head.default", + "head_node": {}, + "worker_nodes": {}, +} + + +def _import_aws(provider_config): + try: + # boto3 and botocore are imported in multiple places in the codebase, + # so we just import them here to ensure that they are installed. + import boto3 # noqa: F401 + except ImportError as e: + raise ImportError( + "The Ray AWS VM launcher requires the AWS SDK for Python (Boto3) " + "to be installed. You can install it with `pip install boto3`." + ) from e + + from ray.autoscaler._private.aws.node_provider import AWSNodeProvider + + return AWSNodeProvider + + +def _import_gcp(provider_config): + try: + import googleapiclient # noqa: F401 + except ImportError as e: + raise ImportError( + "The Ray GCP VM launcher requires the Google API Client to be installed. " + "You can install it with `pip install google-api-python-client`." + ) from e + + from ray.autoscaler._private.gcp.node_provider import GCPNodeProvider + + return GCPNodeProvider + + +def _import_azure(provider_config): + from ray.autoscaler._private._azure.node_provider import AzureNodeProvider + + return AzureNodeProvider + + +def _import_vsphere(provider_config): + from ray.autoscaler._private.vsphere.node_provider import VsphereWcpNodeProvider + + return VsphereWcpNodeProvider + + +def _import_local(provider_config): + if "coordinator_address" in provider_config: + from ray.autoscaler._private.local.coordinator_node_provider import ( + CoordinatorSenderNodeProvider, + ) + + return CoordinatorSenderNodeProvider + else: + from ray.autoscaler._private.local.node_provider import LocalNodeProvider + + return LocalNodeProvider + + +def _import_readonly(provider_config): + from ray.autoscaler._private.readonly.node_provider import ReadOnlyNodeProvider + + return ReadOnlyNodeProvider + + +def _import_fake_multinode(provider_config): + from ray.autoscaler._private.fake_multi_node.node_provider import ( + FakeMultiNodeProvider, + ) + + return FakeMultiNodeProvider + + +def _import_fake_multinode_docker(provider_config): + from ray.autoscaler._private.fake_multi_node.node_provider import ( + FakeMultiNodeDockerProvider, + ) + + return FakeMultiNodeDockerProvider + + +def _import_kuberay(provider_config): + from ray.autoscaler._private.kuberay.node_provider import KubeRayNodeProvider + + return KubeRayNodeProvider + + +def _import_aliyun(provider_config): + from ray.autoscaler._private.aliyun.node_provider import AliyunNodeProvider + + return AliyunNodeProvider + + +def _import_spark(provider_config): + from ray.autoscaler._private.spark.node_provider import SparkNodeProvider + + return SparkNodeProvider + + +def _load_fake_multinode_defaults_config(): + import ray.autoscaler._private.fake_multi_node as ray_fake_multinode + + return os.path.join(os.path.dirname(ray_fake_multinode.__file__), "example.yaml") + + +def _load_read_only_defaults_config(): + import ray.autoscaler._private.readonly as ray_readonly + + return os.path.join(os.path.dirname(ray_readonly.__file__), "defaults.yaml") + + +def _load_fake_multinode_docker_defaults_config(): + import ray.autoscaler._private.fake_multi_node as ray_fake_multinode + + return os.path.join( + os.path.dirname(ray_fake_multinode.__file__), "example_docker.yaml" + ) + + +def _load_local_defaults_config(): + import ray.autoscaler.local as ray_local + + return os.path.join(os.path.dirname(ray_local.__file__), "defaults.yaml") + + +def _load_aws_defaults_config(): + import ray.autoscaler.aws as ray_aws + + return os.path.join(os.path.dirname(ray_aws.__file__), "defaults.yaml") + + +def _load_vsphere_defaults_config(): + import ray.autoscaler.vsphere as ray_vsphere + + return os.path.join(os.path.dirname(ray_vsphere.__file__), "defaults.yaml") + + +def _load_gcp_defaults_config(): + import ray.autoscaler.gcp as ray_gcp + + return os.path.join(os.path.dirname(ray_gcp.__file__), "defaults.yaml") + + +def _load_azure_defaults_config(): + import ray.autoscaler.azure as ray_azure + + return os.path.join(os.path.dirname(ray_azure.__file__), "defaults.yaml") + + +def _load_aliyun_defaults_config(): + import ray.autoscaler.aliyun as ray_aliyun + + return os.path.join(os.path.dirname(ray_aliyun.__file__), "defaults.yaml") + + +def _import_external(provider_config): + provider_cls = load_function_or_class(path=provider_config["module"]) + return provider_cls + + +_NODE_PROVIDERS = { + "local": _import_local, + "fake_multinode": _import_fake_multinode, + "fake_multinode_docker": _import_fake_multinode_docker, + "readonly": _import_readonly, + "aws": _import_aws, + "gcp": _import_gcp, + "vsphere": _import_vsphere, + "azure": _import_azure, + "kuberay": _import_kuberay, + "aliyun": _import_aliyun, + "external": _import_external, # Import an external module + "spark": _import_spark, +} + +_PROVIDER_PRETTY_NAMES = { + "readonly": "Readonly (Manual Cluster Setup)", + "fake_multinode": "Fake Multinode", + "fake_multinode_docker": "Fake Multinode Docker", + "local": "Local", + "aws": "AWS", + "gcp": "GCP", + "azure": "Azure", + "kuberay": "KubeRay", + "aliyun": "Aliyun", + "external": "External", + "vsphere": "vSphere", + "spark": "Spark", +} + +_DEFAULT_CONFIGS = { + "fake_multinode": _load_fake_multinode_defaults_config, + "fake_multinode_docker": _load_fake_multinode_docker_defaults_config, + "local": _load_local_defaults_config, + "aws": _load_aws_defaults_config, + "gcp": _load_gcp_defaults_config, + "azure": _load_azure_defaults_config, + "aliyun": _load_aliyun_defaults_config, + "vsphere": _load_vsphere_defaults_config, + "readonly": _load_read_only_defaults_config, +} + + +def _get_node_provider_cls(provider_config: Dict[str, Any]): + """Get the node provider class for a given provider config. + + Note that this may be used by private node providers that proxy methods to + built-in node providers, so we should maintain backwards compatibility. + + Args: + provider_config: provider section of the autoscaler config. + + Returns: + NodeProvider class + """ + importer = _NODE_PROVIDERS.get(provider_config["type"]) + if importer is None: + raise NotImplementedError( + "Unsupported node provider: {}".format(provider_config["type"]) + ) + return importer(provider_config) + + +def _get_node_provider( + provider_config: Dict[str, Any], cluster_name: str, use_cache: bool = True +) -> Any: + """Get the instantiated node provider for a given provider config. + + Note that this may be used by private node providers that proxy methods to + built-in node providers, so we should maintain backwards compatibility. + + Args: + provider_config: provider section of the autoscaler config. + cluster_name: cluster name from the autoscaler config. + use_cache: whether or not to use a cached definition if available. If + False, the returned object will also not be stored in the cache. + + Returns: + NodeProvider + """ + provider_key = (json.dumps(provider_config, sort_keys=True), cluster_name) + if use_cache and provider_key in _provider_instances: + return _provider_instances[provider_key] + + provider_cls = _get_node_provider_cls(provider_config) + new_provider = provider_cls(provider_config, cluster_name) + + if use_cache: + _provider_instances[provider_key] = new_provider + + return new_provider + + +def _clear_provider_cache(): + global _provider_instances + _provider_instances = {} + + +def _get_default_config(provider_config): + """Retrieve a node provider. + + This is an INTERNAL API. It is not allowed to call this from any Ray + package outside the autoscaler. + """ + if provider_config["type"] == "external": + return copy.deepcopy(MINIMAL_EXTERNAL_CONFIG) + load_config = _DEFAULT_CONFIGS.get(provider_config["type"]) + if load_config is None: + raise NotImplementedError( + "Unsupported node provider: {}".format(provider_config["type"]) + ) + path_to_default = load_config() + with open(path_to_default) as f: + defaults = yaml.safe_load(f) + + return defaults diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82dbdb268f1a20830711440de9e56a81aad58290 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..92188e891ac388ae6166897d211419599645b1bc Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/defaults.yaml b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..14747c1a86060339eb596a7eca7581038cc689e6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/defaults.yaml @@ -0,0 +1,32 @@ +cluster_name: default +max_workers: 0 +provider: + type: readonly + # This must be true since the nodes share the same ip! + use_node_id_as_ip: True + disable_node_updaters: True + disable_launch_config_check: True +available_node_types: + ray.head.default: + resources: {} + node_config: {} + max_workers: 0 +head_node_type: ray.head.default +upscaling_speed: 1.0 +idle_timeout_minutes: 0 +# +# !!! Configurations below are not supported in fake cluster mode !!! +# +auth: {} +docker: {} +initialization_commands: [] +setup_commands: [] +head_setup_commands: [] +worker_setup_commands: [] +head_start_ray_commands: [] +worker_start_ray_commands: [] +file_mounts: {} +cluster_synced_files: [] +file_mounts_sync_continuously: false +rsync_exclude: [] +rsync_filter: [] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..692501bb760f28857d59d44d18202a483f356b7a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/readonly/node_provider.py @@ -0,0 +1,80 @@ +from typing import List, Tuple + +from ray.autoscaler._private.util import format_readonly_node_type +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + STATUS_UP_TO_DATE, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, + TAG_RAY_USER_NODE_TYPE, +) + + +class ReadOnlyNodeProvider(NodeProvider): + """A node provider that merely reports the current cluster state. + + This is used for laptop mode / manual cluster setup modes, in order to + provide status reporting in the same way for users.""" + + def __init__(self, provider_config, cluster_name): + NodeProvider.__init__(self, provider_config, cluster_name) + self.nodes = {} + + def is_readonly(self): + return True + + def _set_nodes(self, nodes: List[Tuple[str, str]]): + """Update the set of nodes in the cluster. + + Args: + nodes: List of (node_id, node_manager_address) tuples. + """ + new_nodes = {} + for node_id, node_manager_address in nodes: + # We make up a fake node type for each node (since each node + # could have its own unique configuration). + new_nodes[node_id] = { + # Keep prefix in sync with node config gen in monitor.py + "node_type": format_readonly_node_type(node_id), + "ip": node_manager_address, + } + self.nodes = new_nodes + + def non_terminated_nodes(self, tag_filters): + return list(self.nodes.keys()) + + def is_running(self, node_id): + return node_id in self.nodes + + def is_terminated(self, node_id): + return node_id not in self.nodes + + def node_tags(self, node_id): + tags = { + TAG_RAY_NODE_KIND: NODE_KIND_HEAD, + TAG_RAY_USER_NODE_TYPE: self.nodes[node_id]["node_type"], + TAG_RAY_NODE_NAME: node_id, + TAG_RAY_NODE_STATUS: STATUS_UP_TO_DATE, + } + return tags + + def external_ip(self, node_id): + return node_id + + def internal_ip(self, node_id): + return node_id + + def set_node_tags(self, node_id, tags): + raise AssertionError("Readonly node provider cannot be updated") + + def create_node(self, node_config, tags, count): + raise AssertionError("Readonly node provider cannot be updated") + + def terminate_node(self, node_id): + raise AssertionError("Readonly node provider cannot be updated") + + @staticmethod + def bootstrap_config(cluster_config): + return cluster_config diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/resource_demand_scheduler.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/resource_demand_scheduler.py new file mode 100644 index 0000000000000000000000000000000000000000..61ae239e673b748e2ae6acc5db7e2e128dbaf1c1 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/resource_demand_scheduler.py @@ -0,0 +1,1022 @@ +"""Implements multi-node-type autoscaling. + +This file implements an autoscaling algorithm that is aware of multiple node +types (e.g., example-multi-node-type.yaml). The Ray autoscaler will pass in +a vector of resource shape demands, and the resource demand scheduler will +return a list of node types that can satisfy the demands given constraints +(i.e., reverse bin packing). +""" + +import collections +import copy +import logging +import os +from abc import abstractmethod +from functools import partial +from typing import Callable, Dict, List, Optional, Tuple + +import ray +from ray._private.gcs_utils import PlacementGroupTableData +from ray.autoscaler._private.constants import ( + AUTOSCALER_CONSERVE_GPU_NODES, + AUTOSCALER_UPSCALING_INITIAL_NUM_NODES, + AUTOSCALER_UTILIZATION_SCORER_KEY, +) +from ray.autoscaler._private.loader import load_function_or_class +from ray.autoscaler._private.node_provider_availability_tracker import ( + NodeAvailabilitySummary, +) +from ray.autoscaler._private.util import ( + NodeID, + NodeIP, + NodeType, + NodeTypeConfigDict, + ResourceDict, + is_placement_group_resource, +) +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + NODE_KIND_UNMANAGED, + NODE_KIND_WORKER, + TAG_RAY_NODE_KIND, + TAG_RAY_USER_NODE_TYPE, +) +from ray.core.generated.common_pb2 import PlacementStrategy + +logger = logging.getLogger(__name__) + +NodeResources = ResourceDict +ResourceDemands = List[ResourceDict] + + +class UtilizationScore: + """This fancy class just defines the `UtilizationScore` protocol to be + some type that is a "totally ordered set" (i.e. things that can be sorted). + + What we're really trying to express is + + ``` + UtilizationScore = TypeVar("UtilizationScore", bound=Comparable["UtilizationScore"]) + ``` + + but Comparable isn't a real type and, and a bound with a type argument + can't be enforced (f-bounded polymorphism with contravariance). See Guido's + comment for more details: https://github.com/python/typing/issues/59. + + This isn't just a `float`. In the case of the default scorer, it's a + `Tuple[float, float]` which is quite difficult to map to a single number. + + """ + + @abstractmethod + def __eq__(self, other: "UtilizationScore") -> bool: + pass + + @abstractmethod + def __lt__(self: "UtilizationScore", other: "UtilizationScore") -> bool: + pass + + def __gt__(self: "UtilizationScore", other: "UtilizationScore") -> bool: + return (not self < other) and self != other + + def __le__(self: "UtilizationScore", other: "UtilizationScore") -> bool: + return self < other or self == other + + def __ge__(self: "UtilizationScore", other: "UtilizationScore") -> bool: + return not self < other + + +class UtilizationScorer: + def __call__( + node_resources: NodeResources, + resource_demands: ResourceDemands, + *, + node_availability_summary: NodeAvailabilitySummary, + ) -> Optional[UtilizationScore]: + pass + + +class ResourceDemandScheduler: + def __init__( + self, + provider: NodeProvider, + node_types: Dict[NodeType, NodeTypeConfigDict], + max_workers: int, + head_node_type: NodeType, + upscaling_speed: float, + ) -> None: + self.provider = provider + self.node_types = copy.deepcopy(node_types) + self.node_resource_updated = set() + self.max_workers = max_workers + self.head_node_type = head_node_type + self.upscaling_speed = upscaling_speed + + utilization_scorer_str = os.environ.get( + AUTOSCALER_UTILIZATION_SCORER_KEY, + "ray.autoscaler._private.resource_demand_scheduler" + "._default_utilization_scorer", + ) + self.utilization_scorer: UtilizationScorer = load_function_or_class( + utilization_scorer_str + ) + + def _get_head_and_workers(self, nodes: List[NodeID]) -> Tuple[NodeID, List[NodeID]]: + """Returns the head node's id and the list of all worker node ids, + given a list `nodes` of all node ids in the cluster. + """ + head_id, worker_ids = None, [] + for node in nodes: + tags = self.provider.node_tags(node) + if tags[TAG_RAY_NODE_KIND] == NODE_KIND_HEAD: + head_id = node + elif tags[TAG_RAY_NODE_KIND] == NODE_KIND_WORKER: + worker_ids.append(node) + return head_id, worker_ids + + def reset_config( + self, + provider: NodeProvider, + node_types: Dict[NodeType, NodeTypeConfigDict], + max_workers: int, + head_node_type: NodeType, + upscaling_speed: float = 1, + ) -> None: + """Updates the class state variables. + + For legacy yamls, it merges previous state and new state to make sure + inferered resources are not lost. + """ + self.provider = provider + self.node_types = copy.deepcopy(node_types) + self.node_resource_updated = set() + self.max_workers = max_workers + self.head_node_type = head_node_type + self.upscaling_speed = upscaling_speed + + def is_feasible(self, bundle: ResourceDict) -> bool: + for node_type, config in self.node_types.items(): + max_of_type = config.get("max_workers", 0) + node_resources = config["resources"] + if (node_type == self.head_node_type or max_of_type > 0) and _fits( + node_resources, bundle + ): + return True + return False + + def get_nodes_to_launch( + self, + nodes: List[NodeID], + launching_nodes: Dict[NodeType, int], + resource_demands: List[ResourceDict], + unused_resources_by_ip: Dict[NodeIP, ResourceDict], + pending_placement_groups: List[PlacementGroupTableData], + max_resources_by_ip: Dict[NodeIP, ResourceDict], + ensure_min_cluster_size: List[ResourceDict], + node_availability_summary: NodeAvailabilitySummary, + ) -> (Dict[NodeType, int], List[ResourceDict]): + """Given resource demands, return node types to add to the cluster. + + This method: + (1) calculates the resources present in the cluster by: + - computing available resources for each existing node + - counting the number of nodes per node type + - including both running and launching nodes + (2) calculates the remaining nodes to add to respect min_workers + constraint per node type. + (3) for each strict spread placement group, reserve space on + available nodes and launch new nodes if necessary. + (4) calculates the unfulfilled resource bundles. + (5) calculates which nodes need to be launched to fulfill all + the bundle requests, subject to max_worker constraints. + + Args: + nodes: List of existing nodes in the cluster. + launching_nodes: Summary of node types currently being launched. + resource_demands: Vector of resource demands from the scheduler. + unused_resources_by_ip: Mapping from ip to available resources. + pending_placement_groups: Placement group demands. + max_resources_by_ip: Mapping from ip to static node resources. + ensure_min_cluster_size: Try to ensure the cluster can fit at least + this set of resources. This differs from resources_demands in + that we don't take into account existing usage. + + node_availability_summary: A snapshot of the current + NodeAvailabilitySummary. + + Returns: + Dict of count to add for each node type, and residual of resources + that still cannot be fulfilled. + """ + utilization_scorer = partial( + self.utilization_scorer, node_availability_summary=node_availability_summary + ) + self._update_node_resources_from_runtime(nodes, max_resources_by_ip) + + # Step 1: Calculate current cluster resources and node type counts + node_resources: List[ResourceDict] + node_type_counts: Dict[NodeType, int] + node_resources, node_type_counts = self.calculate_node_resources( + nodes, launching_nodes, unused_resources_by_ip + ) + + logger.debug("Cluster resources: {}".format(node_resources)) + logger.debug("Node counts: {}".format(node_type_counts)) + # Step 2: add nodes to add to satisfy min_workers for each type + ( + node_resources, + node_type_counts, + adjusted_min_workers, + ) = _add_min_workers_nodes( + node_resources, + node_type_counts, + self.node_types, + self.max_workers, + self.head_node_type, + ensure_min_cluster_size, + utilization_scorer=utilization_scorer, + ) + + # Step 3: get resource demands of placement groups and return the + # groups that should be strictly spread. + logger.debug(f"Placement group demands: {pending_placement_groups}") + # TODO(Clark): Refactor placement group bundle demands such that their placement + # group provenance is mantained, since we need to keep an accounting of the + # cumulative CPU cores allocated as fulfilled during bin packing in order to + # ensure that a placement group's cumulative allocation is under the placement + # group's max CPU fraction per node. Without this, and placement group with many + # bundles might not be schedulable, but will fail to trigger scale-up since the + # max CPU fraction is properly applied to the cumulative bundle requests for a + # single node. + # + # placement_group_demand_vector: List[Tuple[List[ResourceDict], double]] + # + # bin_pack_residual() can keep it's packing priority; we just need to account + # for (1) the running CPU allocation for the bundle's placement group for that + # particular node, and (2) the max CPU cores allocatable for a single placement + # group for that particular node. + ( + placement_group_demand_vector, + strict_spreads, + ) = placement_groups_to_resource_demands(pending_placement_groups) + # Place placement groups demand vector at the beginning of the resource + # demands vector to make it consistent (results in the same types of + # nodes to add) with pg_demands_nodes_max_launch_limit calculated later + resource_demands = placement_group_demand_vector + resource_demands + + ( + spread_pg_nodes_to_add, + node_resources, + node_type_counts, + ) = self.reserve_and_allocate_spread( + strict_spreads, + node_resources, + node_type_counts, + utilization_scorer, + ) + + # Calculate the nodes to add for bypassing max launch limit for + # placement groups and spreads. + unfulfilled_placement_groups_demands, _ = get_bin_pack_residual( + node_resources, + placement_group_demand_vector, + ) + # Add 1 to account for the head node. + max_to_add = self.max_workers + 1 - sum(node_type_counts.values()) + pg_demands_nodes_max_launch_limit, _ = get_nodes_for( + self.node_types, + node_type_counts, + self.head_node_type, + max_to_add, + unfulfilled_placement_groups_demands, + utilization_scorer=utilization_scorer, + ) + placement_groups_nodes_max_limit = { + node_type: spread_pg_nodes_to_add.get(node_type, 0) + + pg_demands_nodes_max_launch_limit.get(node_type, 0) + for node_type in self.node_types + } + + # Step 4/5: add nodes for pending tasks, actors, and non-strict spread + # groups + unfulfilled, _ = get_bin_pack_residual(node_resources, resource_demands) + logger.debug("Resource demands: {}".format(resource_demands)) + logger.debug("Unfulfilled demands: {}".format(unfulfilled)) + nodes_to_add_based_on_demand, final_unfulfilled = get_nodes_for( + self.node_types, + node_type_counts, + self.head_node_type, + max_to_add, + unfulfilled, + utilization_scorer=utilization_scorer, + ) + logger.debug("Final unfulfilled: {}".format(final_unfulfilled)) + # Merge nodes to add based on demand and nodes to add based on + # min_workers constraint. We add them because nodes to add based on + # demand was calculated after the min_workers constraint was respected. + total_nodes_to_add = {} + + for node_type in self.node_types: + nodes_to_add = ( + adjusted_min_workers.get(node_type, 0) + + spread_pg_nodes_to_add.get(node_type, 0) + + nodes_to_add_based_on_demand.get(node_type, 0) + ) + if nodes_to_add > 0: + total_nodes_to_add[node_type] = nodes_to_add + + # Limit the number of concurrent launches + total_nodes_to_add = self._get_concurrent_resource_demand_to_launch( + total_nodes_to_add, + unused_resources_by_ip.keys(), + nodes, + launching_nodes, + adjusted_min_workers, + placement_groups_nodes_max_limit, + ) + + logger.debug("Node requests: {}".format(total_nodes_to_add)) + return total_nodes_to_add, final_unfulfilled + + def _update_node_resources_from_runtime( + self, nodes: List[NodeID], max_resources_by_ip: Dict[NodeIP, ResourceDict] + ): + """Update static node type resources with runtime resources + + This will update the cached static node type resources with the runtime + resources. Because we can not know the exact autofilled memory or + object_store_memory from config file. + """ + need_update = len(self.node_types) != len(self.node_resource_updated) + + if not need_update: + return + for node_id in nodes: + tags = self.provider.node_tags(node_id) + + if TAG_RAY_USER_NODE_TYPE not in tags: + continue + + node_type = tags[TAG_RAY_USER_NODE_TYPE] + if ( + node_type in self.node_resource_updated + or node_type not in self.node_types + ): + # continue if the node type has been updated or is not an known + # node type + continue + ip = self.provider.internal_ip(node_id) + runtime_resources = max_resources_by_ip.get(ip) + if runtime_resources: + runtime_resources = copy.deepcopy(runtime_resources) + resources = self.node_types[node_type].get("resources", {}) + for key in ["CPU", "GPU", "memory"]: + if key in runtime_resources: + resources[key] = runtime_resources[key] + self.node_types[node_type]["resources"] = resources + + node_kind = tags[TAG_RAY_NODE_KIND] + if node_kind == NODE_KIND_WORKER: + # Here, we do not record the resources have been updated + # if it is the head node kind. Because it need be updated + # by worker kind runtime resource. The most difference + # between head and worker is the memory resources. The head + # node needs to configure redis memory which is not needed + # for worker nodes. + self.node_resource_updated.add(node_type) + + def _get_concurrent_resource_demand_to_launch( + self, + to_launch: Dict[NodeType, int], + connected_nodes: List[NodeIP], + non_terminated_nodes: List[NodeID], + pending_launches_nodes: Dict[NodeType, int], + adjusted_min_workers: Dict[NodeType, int], + placement_group_nodes: Dict[NodeType, int], + ) -> Dict[NodeType, int]: + """Updates the max concurrent resources to launch for each node type. + + Given the current nodes that should be launched, the non terminated + nodes (running and pending) and the pending to be launched nodes. This + method calculates the maximum number of nodes to launch concurrently + for each node type as follows: + 1) Calculates the running nodes. + 2) Calculates the pending nodes and gets the launching nodes. + 3) Limits the total number of pending + currently-launching + + to-be-launched nodes to: + max( + 5, + self.upscaling_speed * max(running_nodes[node_type], 1) + ). + + Args: + to_launch: List of number of nodes to launch based on resource + demand for every node type. + connected_nodes: Running nodes (from LoadMetrics). + non_terminated_nodes: Non terminated nodes (pending/running). + pending_launches_nodes: Nodes that are in the launch queue. + adjusted_min_workers: Nodes to launch to satisfy + min_workers and request_resources(). This overrides the launch + limits since the user is hinting to immediately scale up to + this size. + placement_group_nodes: Nodes to launch for placement groups. + This overrides the launch concurrency limits. + Returns: + Dict[NodeType, int]: Maximum number of nodes to launch for each + node type. + """ + updated_nodes_to_launch = {} + running_nodes, pending_nodes = self._separate_running_and_pending_nodes( + non_terminated_nodes, + connected_nodes, + ) + for node_type in to_launch: + # Enforce here max allowed pending nodes to be frac of total + # running nodes. + max_allowed_pending_nodes = max( + AUTOSCALER_UPSCALING_INITIAL_NUM_NODES, + int(self.upscaling_speed * max(running_nodes[node_type], 1)), + ) + total_pending_nodes = ( + pending_launches_nodes.get(node_type, 0) + pending_nodes[node_type] + ) + + upper_bound = max( + max_allowed_pending_nodes - total_pending_nodes, + # Allow more nodes if this is to respect min_workers or + # request_resources() or placement groups. + adjusted_min_workers.get(node_type, 0) + + placement_group_nodes.get(node_type, 0), + ) + + if upper_bound > 0: + updated_nodes_to_launch[node_type] = min( + upper_bound, to_launch[node_type] + ) + + return updated_nodes_to_launch + + def _separate_running_and_pending_nodes( + self, + non_terminated_nodes: List[NodeID], + connected_nodes: List[NodeIP], + ) -> (Dict[NodeType, int], Dict[NodeType, int]): + """Splits connected and non terminated nodes to pending & running.""" + + running_nodes = collections.defaultdict(int) + pending_nodes = collections.defaultdict(int) + for node_id in non_terminated_nodes: + tags = self.provider.node_tags(node_id) + if TAG_RAY_USER_NODE_TYPE in tags: + node_type = tags[TAG_RAY_USER_NODE_TYPE] + node_ip = self.provider.internal_ip(node_id) + if node_ip in connected_nodes: + running_nodes[node_type] += 1 + else: + pending_nodes[node_type] += 1 + return running_nodes, pending_nodes + + def calculate_node_resources( + self, + nodes: List[NodeID], + pending_nodes: Dict[NodeID, int], + unused_resources_by_ip: Dict[str, ResourceDict], + ) -> (List[ResourceDict], Dict[NodeType, int]): + """Returns node resource list and node type counts. + + Counts the running nodes, pending nodes. + Args: + nodes: Existing nodes. + pending_nodes: Pending nodes. + Returns: + node_resources: a list of running + pending resources. + E.g., [{"CPU": 4}, {"GPU": 2}]. + node_type_counts: running + pending workers per node type. + """ + + node_resources = [] + node_type_counts = collections.defaultdict(int) + + def add_node(node_type, available_resources=None): + if node_type not in self.node_types: + # We should not get here, but if for some reason we do, log an + # error and skip the errant node_type. + logger.error( + f"Missing entry for node_type {node_type} in " + f"cluster config: {self.node_types} under entry " + "available_node_types. This node's resources will be " + "ignored. If you are using an unmanaged node, manually " + f"set the {TAG_RAY_NODE_KIND} tag to " + f'"{NODE_KIND_UNMANAGED}" in your cloud provider\'s ' + "management console." + ) + return None + # Careful not to include the same dict object multiple times. + available = copy.deepcopy(self.node_types[node_type]["resources"]) + # If available_resources is None this might be because the node is + # no longer pending, but the raylet hasn't sent a heartbeat to gcs + # yet. + if available_resources is not None: + available = copy.deepcopy(available_resources) + + node_resources.append(available) + node_type_counts[node_type] += 1 + + for node_id in nodes: + tags = self.provider.node_tags(node_id) + if TAG_RAY_USER_NODE_TYPE in tags: + node_type = tags[TAG_RAY_USER_NODE_TYPE] + ip = self.provider.internal_ip(node_id) + available_resources = unused_resources_by_ip.get(ip) + add_node(node_type, available_resources) + + for node_type, count in pending_nodes.items(): + for _ in range(count): + add_node(node_type) + + return node_resources, node_type_counts + + def reserve_and_allocate_spread( + self, + strict_spreads: List[List[ResourceDict]], + node_resources: List[ResourceDict], + node_type_counts: Dict[NodeType, int], + utilization_scorer: Callable[ + [NodeResources, ResourceDemands], Optional[UtilizationScore] + ], + ): + """For each strict spread, attempt to reserve as much space as possible + on the node, then allocate new nodes for the unfulfilled portion. + + Args: + strict_spreads (List[List[ResourceDict]]): A list of placement + groups which must be spread out. + node_resources (List[ResourceDict]): Available node resources in + the cluster. + node_type_counts (Dict[NodeType, int]): The amount of each type of + node pending or in the cluster. + utilization_scorer: A function that, given a node + type, its resources, and resource demands, returns what its + utilization would be. + + Returns: + Dict[NodeType, int]: Nodes to add. + List[ResourceDict]: The updated node_resources after the method. + Dict[NodeType, int]: The updated node_type_counts. + + """ + to_add = collections.defaultdict(int) + for bundles in strict_spreads: + # Try to pack as many bundles of this group as possible on existing + # nodes. The remaining will be allocated on new nodes. + unfulfilled, updated_node_resources = get_bin_pack_residual( + node_resources, bundles, strict_spread=True + ) + max_to_add = self.max_workers + 1 - sum(node_type_counts.values()) + # Allocate new nodes for the remaining bundles that don't fit. + to_launch, _ = get_nodes_for( + self.node_types, + node_type_counts, + self.head_node_type, + max_to_add, + unfulfilled, + utilization_scorer=utilization_scorer, + strict_spread=True, + ) + new_node_resources = _node_type_counts_to_node_resources( + self.node_types, to_launch + ) + # Update node resources to include newly launched nodes and their + # bundles. + unfulfilled, including_reserved = get_bin_pack_residual( + new_node_resources, unfulfilled, strict_spread=True + ) + if unfulfilled: + logger.debug( + "Unfulfilled strict spread placement group: {}".format(bundles) + ) + continue + _inplace_add(node_type_counts, to_launch) + _inplace_add(to_add, to_launch) + node_resources = updated_node_resources + including_reserved + return to_add, node_resources, node_type_counts + + def debug_string( + self, + nodes: List[NodeID], + pending_nodes: Dict[NodeID, int], + unused_resources_by_ip: Dict[str, ResourceDict], + ) -> str: + node_resources, node_type_counts = self.calculate_node_resources( + nodes, pending_nodes, unused_resources_by_ip + ) + + out = "Worker node types:" + for node_type, count in node_type_counts.items(): + out += "\n - {}: {}".format(node_type, count) + if pending_nodes.get(node_type): + out += " ({} pending)".format(pending_nodes[node_type]) + + return out + + +def _node_type_counts_to_node_resources( + node_types: Dict[NodeType, NodeTypeConfigDict], + node_type_counts: Dict[NodeType, int], +) -> List[ResourceDict]: + """Converts a node_type_counts dict into a list of node_resources.""" + resources = [] + for node_type, count in node_type_counts.items(): + # Be careful, each entry in the list must be deep copied! + resources += [node_types[node_type]["resources"].copy() for _ in range(count)] + return resources + + +def _add_min_workers_nodes( + node_resources: List[ResourceDict], + node_type_counts: Dict[NodeType, int], + node_types: Dict[NodeType, NodeTypeConfigDict], + max_workers: int, + head_node_type: NodeType, + ensure_min_cluster_size: List[ResourceDict], + utilization_scorer: Callable[ + [NodeResources, ResourceDemands, str], Optional[UtilizationScore] + ], +) -> (List[ResourceDict], Dict[NodeType, int], Dict[NodeType, int]): + """Updates resource demands to respect the min_workers and + request_resources() constraints. + + Args: + node_resources: Resources of exisiting nodes already launched/pending. + node_type_counts: Counts of existing nodes already launched/pending. + node_types: Node types config. + max_workers: global max_workers constaint. + ensure_min_cluster_size: resource demands from request_resources(). + utilization_scorer: A function that, given a node + type, its resources, and resource demands, returns what its + utilization would be. + + Returns: + node_resources: The updated node resources after adding min_workers + and request_resources() constraints per node type. + node_type_counts: The updated node counts after adding min_workers + and request_resources() constraints per node type. + total_nodes_to_add_dict: The nodes to add to respect min_workers and + request_resources() constraints. + """ + total_nodes_to_add_dict = {} + for node_type, config in node_types.items(): + existing = node_type_counts.get(node_type, 0) + target = min(config.get("min_workers", 0), config.get("max_workers", 0)) + if node_type == head_node_type: + # Add 1 to account for head node. + target = target + 1 + if existing < target: + total_nodes_to_add_dict[node_type] = target - existing + node_type_counts[node_type] = target + node_resources.extend( + [ + copy.deepcopy(node_types[node_type]["resources"]) + for _ in range(total_nodes_to_add_dict[node_type]) + ] + ) + + if ensure_min_cluster_size: + max_to_add = max_workers + 1 - sum(node_type_counts.values()) + max_node_resources = [] + # Fit request_resources() on all the resources as if they are idle. + for node_type in node_type_counts: + max_node_resources.extend( + [ + copy.deepcopy(node_types[node_type]["resources"]) + for _ in range(node_type_counts[node_type]) + ] + ) + # Get the unfulfilled to ensure min cluster size. + resource_requests_unfulfilled, _ = get_bin_pack_residual( + max_node_resources, ensure_min_cluster_size + ) + # Get the nodes to meet the unfulfilled. + nodes_to_add_request_resources, _ = get_nodes_for( + node_types, + node_type_counts, + head_node_type, + max_to_add, + resource_requests_unfulfilled, + utilization_scorer=utilization_scorer, + ) + # Update the resources, counts and total nodes to add. + for node_type in nodes_to_add_request_resources: + nodes_to_add = nodes_to_add_request_resources.get(node_type, 0) + if nodes_to_add > 0: + node_type_counts[node_type] = nodes_to_add + node_type_counts.get( + node_type, 0 + ) + node_resources.extend( + [ + copy.deepcopy(node_types[node_type]["resources"]) + for _ in range(nodes_to_add) + ] + ) + total_nodes_to_add_dict[ + node_type + ] = nodes_to_add + total_nodes_to_add_dict.get(node_type, 0) + return node_resources, node_type_counts, total_nodes_to_add_dict + + +def get_nodes_for( + node_types: Dict[NodeType, NodeTypeConfigDict], + existing_nodes: Dict[NodeType, int], + head_node_type: NodeType, + max_to_add: int, + resources: List[ResourceDict], + utilization_scorer: Callable[ + [NodeResources, ResourceDemands, str], Optional[UtilizationScore] + ], + strict_spread: bool = False, +) -> (Dict[NodeType, int], List[ResourceDict]): + """Determine nodes to add given resource demands and constraints. + + Args: + node_types: node types config. + existing_nodes: counts of existing nodes already launched. + This sets constraints on the number of new nodes to add. + max_to_add: global constraint on nodes to add. + resources: resource demands to fulfill. + strict_spread: If true, each element in `resources` must be placed on a + different node. + utilization_scorer: A function that, given a node + type, its resources, and resource demands, returns what its + utilization would be. + + Returns: + Dict of count to add for each node type, and residual of resources + that still cannot be fulfilled. + """ + nodes_to_add: Dict[NodeType, int] = collections.defaultdict(int) + + while resources and sum(nodes_to_add.values()) < max_to_add: + utilization_scores = [] + for node_type in node_types: + max_workers_of_node_type = node_types[node_type].get("max_workers", 0) + if head_node_type == node_type: + # Add 1 to account for head node. + max_workers_of_node_type = max_workers_of_node_type + 1 + if ( + existing_nodes.get(node_type, 0) + nodes_to_add.get(node_type, 0) + >= max_workers_of_node_type + ): + continue + node_resources = node_types[node_type]["resources"] + if strict_spread: + # If handling strict spread, only one bundle can be placed on + # the node. + score = utilization_scorer(node_resources, [resources[0]], node_type) + else: + score = utilization_scorer(node_resources, resources, node_type) + if score is not None: + utilization_scores.append((score, node_type)) + + # Give up, no feasible node. + if not utilization_scores: + if not any( + is_placement_group_resource(resource) + for resources_dict in resources + for resource in resources_dict + ): + logger.warning( + f"The autoscaler could not find a node type to satisfy the " + f"request: {resources}. Please specify a node type with the " + f"necessary resources." + ) + break + + utilization_scores = sorted(utilization_scores, reverse=True) + best_node_type = utilization_scores[0][1] + nodes_to_add[best_node_type] += 1 + if strict_spread: + resources = resources[1:] + else: + allocated_resource = node_types[best_node_type]["resources"] + residual, _ = get_bin_pack_residual([allocated_resource], resources) + assert len(residual) < len(resources), (resources, residual) + resources = residual + + return nodes_to_add, resources + + +def _resource_based_utilization_scorer( + node_resources: ResourceDict, + resources: List[ResourceDict], + *, + node_availability_summary: NodeAvailabilitySummary, +) -> Optional[Tuple[bool, int, float, float]]: + remaining = copy.deepcopy(node_resources) + fittable = [] + resource_types = set() + for r in resources: + for k, v in r.items(): + if v > 0: + resource_types.add(k) + if _fits(remaining, r): + fittable.append(r) + _inplace_subtract(remaining, r) + if not fittable: + return None + + util_by_resources = [] + num_matching_resource_types = 0 + for k, v in node_resources.items(): + # Don't divide by zero. + if v < 1: + # Could test v == 0 on the nose, but v < 1 feels safer. + # (Note that node resources are integers.) + continue + if k in resource_types: + num_matching_resource_types += 1 + util = (v - remaining[k]) / v + util_by_resources.append(v * (util**3)) + + # Could happen if node_resources has only zero values. + if not util_by_resources: + return None + + # Prefer not to launch a GPU node if there aren't any GPU requirements in the + # resource bundle. + gpu_ok = True + if AUTOSCALER_CONSERVE_GPU_NODES: + is_gpu_node = "GPU" in node_resources and node_resources["GPU"] > 0 + any_gpu_task = any("GPU" in r for r in resources) + if is_gpu_node and not any_gpu_task: + gpu_ok = False + + # Prioritize avoiding gpu nodes for non-gpu workloads first, + # then prioritize matching multiple resource types, + # then prioritize using all resources, + # then prioritize overall balance of multiple resources. + return ( + gpu_ok, + num_matching_resource_types, + min(util_by_resources), + # util_by_resources should be non empty + float(sum(util_by_resources)) / len(util_by_resources), + ) + + +def _default_utilization_scorer( + node_resources: ResourceDict, + resources: List[ResourceDict], + node_type: str, + *, + node_availability_summary: NodeAvailabilitySummary, +): + return _resource_based_utilization_scorer( + node_resources, resources, node_availability_summary=node_availability_summary + ) + + +def get_bin_pack_residual( + node_resources: List[ResourceDict], + resource_demands: List[ResourceDict], + strict_spread: bool = False, +) -> (List[ResourceDict], List[ResourceDict]): + """Return a subset of resource_demands that cannot fit in the cluster. + + TODO(ekl): this currently does not guarantee the resources will be packed + correctly by the Ray scheduler. This is only possible once the Ray backend + supports a placement groups API. + + Args: + node_resources (List[ResourceDict]): List of resources per node. + resource_demands (List[ResourceDict]): List of resource bundles that + need to be bin packed onto the nodes. + strict_spread: If true, each element in resource_demands must be + placed on a different entry in `node_resources`. + + Returns: + List[ResourceDict]: the residual list resources that do not fit. + List[ResourceDict]: The updated node_resources after the method. The order of the list elements remains unchanged. + """ + + unfulfilled = [] + + # A most naive bin packing algorithm. + nodes = copy.deepcopy(node_resources) + # List of nodes that cannot be used again due to strict spread. + used = set() + # We order the resource demands in the following way: + # More complex demands first. + # Break ties: heavier demands first. + # Break ties: lexicographically (to ensure stable ordering). + for demand in sorted( + resource_demands, + key=lambda demand: ( + len(demand.values()), + sum(demand.values()), + sorted(demand.items()), + ), + reverse=True, + ): + found = False + node = None + for i in range(len(nodes)): + if i in used: + continue + node = nodes[i] + if _fits(node, demand): + found = True + # In the strict_spread case, we can't reuse nodes. + if strict_spread: + used.add(i) + break + if found and node: + _inplace_subtract(node, demand) + else: + unfulfilled.append(demand) + + return unfulfilled, nodes + + +def _fits(node: ResourceDict, resources: ResourceDict) -> bool: + for k, v in resources.items(): + # TODO(jjyao): Change ResourceDict to a class so we can + # hide the implicit resource handling. + if v > node.get( + k, 1.0 if k.startswith(ray._raylet.IMPLICIT_RESOURCE_PREFIX) else 0.0 + ): + return False + return True + + +def _inplace_subtract(node: ResourceDict, resources: ResourceDict) -> None: + for k, v in resources.items(): + if v == 0: + # This is an edge case since some reasonable programs/computers can + # do `ray.autoscaler.sdk.request_resources({"GPU": 0}"})`. + continue + if k not in node: + assert k.startswith(ray._raylet.IMPLICIT_RESOURCE_PREFIX), (k, node) + node[k] = 1 + assert k in node, (k, node) + node[k] -= v + assert node[k] >= 0.0, (node, k, v) + + +def _inplace_add(a: collections.defaultdict, b: Dict) -> None: + """Generically adds values in `b` to `a`. + a[k] should be defined for all k in b.keys()""" + for k, v in b.items(): + a[k] += v + + +def placement_groups_to_resource_demands( + pending_placement_groups: List[PlacementGroupTableData], +) -> Tuple[List[ResourceDict], List[List[ResourceDict]]]: + """Preprocess placement group requests into regular resource demand vectors + when possible. The policy is: + * STRICT_PACK - Convert to a single bundle. + * PACK - Flatten into a resource demand vector. + * STRICT_SPREAD - Cannot be converted. + * SPREAD - Flatten into a resource demand vector. + + Args: + pending_placement_groups (List[PlacementGroupData]): List of + PlacementGroupLoad's. + + Returns: + List[ResourceDict]: The placement groups which were converted to a + resource demand vector. + List[List[ResourceDict]]: The placement groups which should be strictly + spread. + """ + resource_demand_vector = [] + unconverted = [] + for placement_group in pending_placement_groups: + # Skip **placed** bundle (which has node id associated with it). + shapes = [] + for bundle in placement_group.bundles: + if bundle.node_id != b"": + continue + shapes.append(dict(bundle.unit_resources)) + + if ( + placement_group.strategy == PlacementStrategy.PACK + or placement_group.strategy == PlacementStrategy.SPREAD + ): + resource_demand_vector.extend(shapes) + elif placement_group.strategy == PlacementStrategy.STRICT_PACK: + combined = collections.defaultdict(float) + for shape in shapes: + for label, quantity in shape.items(): + combined[label] += quantity + resource_demand_vector.append(combined) + elif placement_group.strategy == PlacementStrategy.STRICT_SPREAD: + unconverted.append(shapes) + else: + logger.error( + f"Unknown placement group request type: {placement_group}. " + f"Please file a bug report " + f"https://github.com/ray-project/ray/issues/new." + ) + return resource_demand_vector, unconverted diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6c5ee6d57984cd85184cabd342fe1d503cc92b9c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d0d52440ba003d290ef53840f76cc2d9907cab7b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__pycache__/spark_job_server.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__pycache__/spark_job_server.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..604cbe9fc2ef8e3f4b9860f9f63d778fb99dbc74 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/__pycache__/spark_job_server.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..9fbea1f525aba622ac8c4b77de3c0be31cbc8208 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/node_provider.py @@ -0,0 +1,250 @@ +import json +import logging +import sys +from threading import RLock +from typing import Any, Dict, Optional + +import requests + +from ray.autoscaler.node_launch_exception import NodeLaunchException +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + NODE_KIND_WORKER, + STATUS_SETTING_UP, + STATUS_UP_TO_DATE, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, + TAG_RAY_USER_NODE_TYPE, +) +from ray._common.network_utils import build_address + +logger = logging.getLogger(__name__) + +HEAD_NODE_ID = 0 +HEAD_NODE_TYPE = "ray.head.default" + + +class SparkNodeProvider(NodeProvider): + """A node provider that implements provider for nodes of Ray on spark.""" + + def __init__(self, provider_config, cluster_name): + NodeProvider.__init__(self, provider_config, cluster_name) + self.lock = RLock() + + self._nodes = { + str(HEAD_NODE_ID): { + "tags": { + TAG_RAY_NODE_KIND: NODE_KIND_HEAD, + TAG_RAY_USER_NODE_TYPE: HEAD_NODE_TYPE, + TAG_RAY_NODE_NAME: HEAD_NODE_ID, + TAG_RAY_NODE_STATUS: STATUS_UP_TO_DATE, + } + }, + } + self._next_node_id = 0 + + self.ray_head_ip = self.provider_config["ray_head_ip"] + # The port of spark job server. We send http request to spark job server + # to launch spark jobs, ray worker nodes are launched by spark task in + # spark jobs. + spark_job_server_port = self.provider_config["spark_job_server_port"] + self.spark_job_server_url = ( + f"http://{build_address(self.ray_head_ip, spark_job_server_port)}" + ) + self.ray_head_port = self.provider_config["ray_head_port"] + # The unique id for the Ray on spark cluster. + self.cluster_id = self.provider_config["cluster_unique_id"] + + def get_next_node_id(self): + with self.lock: + self._next_node_id += 1 + return self._next_node_id + + def non_terminated_nodes(self, tag_filters): + with self.lock: + nodes = [] + + died_nodes = [] + for node_id in self._nodes: + if node_id == str(HEAD_NODE_ID): + status = "running" + else: + status = self._query_node_status(node_id) + + if status == "running": + if ( + self._nodes[node_id]["tags"][TAG_RAY_NODE_STATUS] + == STATUS_SETTING_UP + ): + self._nodes[node_id]["tags"][ + TAG_RAY_NODE_STATUS + ] = STATUS_UP_TO_DATE + logger.info( + f"Spark node provider node {node_id} starts running." + ) + + if status == "terminated": + died_nodes.append(node_id) + else: + tags = self.node_tags(node_id) + ok = True + for k, v in tag_filters.items(): + if tags.get(k) != v: + ok = False + if ok: + nodes.append(node_id) + + for died_node_id in died_nodes: + self._nodes.pop(died_node_id) + + return nodes + + def _query_node_status(self, node_id): + spark_job_group_id = self._gen_spark_job_group_id(node_id) + + response = requests.post( + url=self.spark_job_server_url + "/query_task_status", + json={"spark_job_group_id": spark_job_group_id}, + ) + response.raise_for_status() + + decoded_resp = response.content.decode("utf-8") + json_res = json.loads(decoded_resp) + return json_res["status"] + + def is_running(self, node_id): + with self.lock: + return ( + node_id in self._nodes + and self._nodes[node_id]["tags"][TAG_RAY_NODE_STATUS] + == STATUS_UP_TO_DATE + ) + + def is_terminated(self, node_id): + with self.lock: + return node_id not in self._nodes + + def node_tags(self, node_id): + with self.lock: + return self._nodes[node_id]["tags"] + + def _get_ip(self, node_id: str) -> Optional[str]: + return node_id + + def external_ip(self, node_id): + return self._get_ip(node_id) + + def internal_ip(self, node_id): + return self._get_ip(node_id) + + def set_node_tags(self, node_id, tags): + assert node_id in self._nodes + self._nodes[node_id]["tags"].update(tags) + + def create_node( + self, node_config: Dict[str, Any], tags: Dict[str, str], count: int + ) -> Optional[Dict[str, Any]]: + raise AssertionError("This method should not be called.") + + def _gen_spark_job_group_id(self, node_id): + return ( + f"ray-cluster-{self.ray_head_port}-{self.cluster_id}" + f"-worker-node-{node_id}" + ) + + def create_node_with_resources_and_labels( + self, node_config, tags, count, resources, labels + ): + for _ in range(count): + self._create_node_with_resources_and_labels( + node_config, tags, resources, labels + ) + + def _create_node_with_resources_and_labels( + self, node_config, tags, resources, labels + ): + from ray.util.spark.cluster_init import _append_resources_config + + with self.lock: + resources = resources.copy() + node_type = tags[TAG_RAY_USER_NODE_TYPE] + # NOTE: + # "NODE_ID_AS_RESOURCE" value must be an integer, + # but `node_id` used by autoscaler must be a string. + node_id = str(self.get_next_node_id()) + resources["NODE_ID_AS_RESOURCE"] = int(node_id) + + conf = self.provider_config.copy() + + num_cpus_per_node = resources.pop("CPU") + num_gpus_per_node = resources.pop("GPU") + heap_memory_per_node = resources.pop("memory") + object_store_memory_per_node = resources.pop("object_store_memory") + + conf["worker_node_options"] = _append_resources_config( + conf["worker_node_options"], resources + ) + response = requests.post( + url=self.spark_job_server_url + "/create_node", + json={ + "spark_job_group_id": self._gen_spark_job_group_id(node_id), + "spark_job_group_desc": ( + "This job group is for spark job which runs the Ray " + f"cluster worker node {node_id} connecting to ray " + f"head node {build_address(self.ray_head_ip, self.ray_head_port)}" + ), + "using_stage_scheduling": conf["using_stage_scheduling"], + "ray_head_ip": self.ray_head_ip, + "ray_head_port": self.ray_head_port, + "ray_temp_dir": conf["ray_temp_dir"], + "num_cpus_per_node": num_cpus_per_node, + "num_gpus_per_node": num_gpus_per_node, + "heap_memory_per_node": heap_memory_per_node, + "object_store_memory_per_node": object_store_memory_per_node, + "worker_node_options": conf["worker_node_options"], + "collect_log_to_path": conf["collect_log_to_path"], + "node_id": resources["NODE_ID_AS_RESOURCE"], + }, + ) + + try: + # Spark job server is locally launched, if spark job server request + # failed, it is unlikely network error but probably unrecoverable + # error, so we make it fast-fail. + response.raise_for_status() + except Exception: + raise NodeLaunchException( + "Node creation failure", + f"Starting ray worker node {node_id} failed", + sys.exc_info(), + ) + + self._nodes[node_id] = { + "tags": { + TAG_RAY_NODE_KIND: NODE_KIND_WORKER, + TAG_RAY_USER_NODE_TYPE: node_type, + TAG_RAY_NODE_NAME: node_id, + TAG_RAY_NODE_STATUS: STATUS_SETTING_UP, + }, + } + logger.info(f"Spark node provider creates node {node_id}.") + + def terminate_node(self, node_id): + if node_id in self._nodes: + response = requests.post( + url=self.spark_job_server_url + "/terminate_node", + json={"spark_job_group_id": self._gen_spark_job_group_id(node_id)}, + ) + response.raise_for_status() + + with self.lock: + if node_id in self._nodes: + self._nodes.pop(node_id) + + logger.info(f"Spark node provider terminates node {node_id}") + + @staticmethod + def bootstrap_config(cluster_config): + return cluster_config diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/spark_job_server.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/spark_job_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6e550dfb2f2dcc4687c6bef1fd8d34e7439ef617 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/spark/spark_job_server.py @@ -0,0 +1,245 @@ +import json +import logging +import os +import threading +import time +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from pathlib import Path + +from pyspark.util import inheritable_thread_target + +from ray.util.spark.cluster_init import _start_ray_worker_nodes + + +class SparkJobServerRequestHandler(BaseHTTPRequestHandler): + def setup(self) -> None: + super().setup() + self._handler_lock = threading.RLock() + self._created_node_id_set = set() + self._logger = logging.getLogger(__name__) + if "RAY_ON_SPARK_JOB_SERVER_VERBOSE" in os.environ: + self._logger.setLevel(logging.DEBUG) + else: + self._logger.setLevel(logging.WARN) + + def _set_headers(self): + self.send_response(200) + self.send_header("Content-type", "application/json") + self.end_headers() + + def handle_POST(self, path, data): + path_parts = Path(path).parts[1:] + + spark_job_group_id = data["spark_job_group_id"] + + if path_parts[0] == "create_node": + assert len(path_parts) == 1, f"Illegal request path: {path}" + spark_job_group_desc = data["spark_job_group_desc"] + using_stage_scheduling = data["using_stage_scheduling"] + ray_head_ip = data["ray_head_ip"] + ray_head_port = data["ray_head_port"] + ray_temp_dir = data["ray_temp_dir"] + num_cpus_per_node = data["num_cpus_per_node"] + num_gpus_per_node = data["num_gpus_per_node"] + heap_memory_per_node = data["heap_memory_per_node"] + object_store_memory_per_node = data["object_store_memory_per_node"] + worker_node_options = data["worker_node_options"] + collect_log_to_path = data["collect_log_to_path"] + node_id = data["node_id"] + self._created_node_id_set.add(node_id) + + def start_ray_worker_thread_fn(): + try: + err_msg = _start_ray_worker_nodes( + spark_job_server=self.server, + spark_job_group_id=spark_job_group_id, + spark_job_group_desc=spark_job_group_desc, + num_worker_nodes=1, + using_stage_scheduling=using_stage_scheduling, + ray_head_ip=ray_head_ip, + ray_head_port=ray_head_port, + ray_temp_dir=ray_temp_dir, + num_cpus_per_node=num_cpus_per_node, + num_gpus_per_node=num_gpus_per_node, + heap_memory_per_node=heap_memory_per_node, + object_store_memory_per_node=object_store_memory_per_node, + worker_node_options=worker_node_options, + collect_log_to_path=collect_log_to_path, + node_id=node_id, + ) + if err_msg: + self._logger.warning( + f"Spark job {spark_job_group_id} hosting Ray worker node " + f"launching failed, error:\n{err_msg}" + ) + except Exception: + if spark_job_group_id in self.server.task_status_dict: + self.server.task_status_dict.pop(spark_job_group_id) + + msg = ( + f"Spark job {spark_job_group_id} hosting Ray worker node exit." + ) + if self._logger.level > logging.DEBUG: + self._logger.warning( + f"{msg} To see details, you can set " + "'RAY_ON_SPARK_JOB_SERVER_VERBOSE' environmental variable " + "to '1' before calling 'ray.util.spark.setup_ray_cluster'." + ) + else: + # This branch is only for debugging Ray-on-Spark purpose. + # User can configure 'RAY_ON_SPARK_JOB_SERVER_VERBOSE' + # environment variable to make the spark job server logging + # showing full exception stack here. + self._logger.debug(msg, exc_info=True) + + threading.Thread( + target=inheritable_thread_target(start_ray_worker_thread_fn), + args=(), + daemon=True, + ).start() + + self.server.task_status_dict[spark_job_group_id] = "pending" + return {} + + elif path_parts[0] == "check_node_id_availability": + node_id = data["node_id"] + with self._handler_lock: + if node_id in self._created_node_id_set: + # If the node with the node id has been created, + # it shouldn't be created twice so fail fast here. + # The case happens when a Ray node is down unexpected + # caused by spark worker node down and spark tries to + # reschedule the spark task, so it triggers node + # creation with duplicated node id. + return {"available": False} + else: + self._created_node_id_set.add(node_id) + return {"available": True} + + elif path_parts[0] == "terminate_node": + assert len(path_parts) == 1, f"Illegal request path: {path}" + self.server.spark.sparkContext.cancelJobGroup(spark_job_group_id) + if spark_job_group_id in self.server.task_status_dict: + self.server.task_status_dict.pop(spark_job_group_id) + return {} + + elif path_parts[0] == "notify_task_launched": + if spark_job_group_id in self.server.task_status_dict: + # Note that if `spark_job_group_id` not in task_status_dict, + # the task has been terminated + self.server.task_status_dict[spark_job_group_id] = "running" + self._logger.info(f"Spark task in {spark_job_group_id} has started.") + return {} + + elif path_parts[0] == "query_task_status": + if spark_job_group_id in self.server.task_status_dict: + return {"status": self.server.task_status_dict[spark_job_group_id]} + else: + return {"status": "terminated"} + + elif path_parts[0] == "query_last_worker_err": + return {"last_worker_err": self.server.last_worker_error} + + else: + raise ValueError(f"Illegal request path: {path}") + + def do_POST(self): + """Reads post request body""" + self._set_headers() + content_len = int(self.headers["content-length"]) + content_type = self.headers["content-type"] + assert content_type == "application/json" + path = self.path + post_body = self.rfile.read(content_len).decode("utf-8") + post_body_json = json.loads(post_body) + with self._handler_lock: + response_body_json = self.handle_POST(path, post_body_json) + response_body = json.dumps(response_body_json) + self.wfile.write(response_body.encode("utf-8")) + + def log_request(self, code="-", size="-"): + # Make logs less verbose. + pass + + +class SparkJobServer(ThreadingHTTPServer): + """ + High level design: + + 1. In Ray on spark autoscaling mode, How to start and terminate Ray worker node ? + + It uses spark job to launch Ray worker node, + and each spark job contains only one spark task, the corresponding spark task + creates Ray worker node as subprocess. + When autoscaler request terminating specific Ray worker node, it cancels + corresponding spark job to trigger Ray worker node termination. + Because we can only cancel spark job not spark task when we need to scale + down a Ray worker node. So we have to have one spark job for each Ray worker node. + + 2. How to create / cancel spark job from spark node provider? + + Spark node provider runs in autoscaler process that is different process + than the one that executes "setup_ray_cluster" API. User calls "setup_ray_cluster" + API in spark application driver node, and the semantic is "setup_ray_cluster" + requests spark resources from this spark application. + Internally, "setup_ray_cluster" should use "spark session" instance to request + spark application resources. But spark node provider runs in another python + process, in order to share spark session to the separate NodeProvider process, + it sets up a spark job server that runs inside spark application driver process + (the process that calls "setup_ray_cluster" API), and in NodeProvider process, + it sends RPC request to the spark job server for creating spark jobs in the + spark application. + Note that we cannot create another spark session in NodeProvider process, + because if doing so, it means we create another spark application, and then + it causes NodeProvider requests resources belonging to the new spark application, + but we need to ensure all requested spark resources belong to + the original spark application that calls "setup_ray_cluster" API. + + Note: + The server must inherit ThreadingHTTPServer because request handler uses + the active spark session in current process to create spark jobs, so all request + handler must be running in current process. + """ + + def __init__(self, server_address, spark, ray_node_custom_env): + super().__init__(server_address, SparkJobServerRequestHandler) + self.spark = spark + + # For ray on spark autoscaling mode, + # for each ray worker node, we create an individual spark job + # to launch it, the corresponding spark job has only one + # spark task that starts ray worker node, and the spark job + # is assigned with a unique spark job group ID that is used + # to cancel this spark job (i.e., kill corresponding ray worker node). + # Each spark task has status of pending, running, or terminated. + # the task_status_dict key is spark job group id, + # and value is the corresponding spark task status. + # each spark task holds a ray worker node. + self.task_status_dict = {} + self.last_worker_error = None + self.ray_node_custom_env = ray_node_custom_env + + def shutdown(self) -> None: + super().shutdown() + for spark_job_group_id in self.task_status_dict: + self.spark.sparkContext.cancelJobGroup(spark_job_group_id) + # Sleep 1 second to wait for all spark job cancellation + # The spark job cancellation will do things asyncly in a background thread, + # On Databricks platform, when detaching a notebook, it triggers SIGTERM + # and then sigterm handler triggers Ray cluster shutdown, without sleep, + # after the SIGTERM handler execution the process is killed and then + # these cancelling spark job background threads are killed. + time.sleep(1) + + +def _start_spark_job_server(host, port, spark, ray_node_custom_env): + server = SparkJobServer((host, port), spark, ray_node_custom_env) + + def run_server(): + server.serve_forever() + + server_thread = threading.Thread(target=run_server) + server_thread.setDaemon(True) + server_thread.start() + + return server diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/subprocess_output_util.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/subprocess_output_util.py new file mode 100644 index 0000000000000000000000000000000000000000..2aaa2007d3c1721cb11a6c7e6eadfd45dcbc54db --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/subprocess_output_util.py @@ -0,0 +1,420 @@ +import os +import re +import subprocess +import sys +import tempfile +import time + +from ray.autoscaler._private.cli_logger import cf, cli_logger + +CONN_REFUSED_PATIENCE = 30 # how long to wait for sshd to run + +_redirect_output = False # Whether to log command output to a temporary file +_allow_interactive = True # whether to pass on stdin to running commands. + + +def is_output_redirected(): + return _redirect_output + + +def set_output_redirected(val: bool): + """Choose between logging to a temporary file and to `sys.stdout`. + + The default is to log to a file. + + Args: + val: If true, subprocess output will be redirected to + a temporary file. + """ + global _redirect_output + _redirect_output = val + + +def does_allow_interactive(): + return _allow_interactive + + +def set_allow_interactive(val: bool): + """Choose whether to pass on stdin to running commands. + + The default is to pipe stdin and close it immediately. + + Args: + val: If true, stdin will be passed to commands. + """ + global _allow_interactive + _allow_interactive = val + + +class ProcessRunnerError(Exception): + def __init__(self, msg, msg_type, code=None, command=None, special_case=None): + super(ProcessRunnerError, self).__init__( + "{} (discovered={}): type={}, code={}, command={}".format( + msg, special_case, msg_type, code, command + ) + ) + + self.msg_type = msg_type + self.code = code + self.command = command + + self.special_case = special_case + + +_ssh_output_regexes = { + "known_host_update": re.compile( + r"\s*Warning: Permanently added '.+' \(.+\) " r"to the list of known hosts.\s*" + ), + "connection_closed": re.compile(r"\s*Shared connection to .+ closed.\s*"), + "timeout": re.compile( + r"\s*ssh: connect to host .+ port .+: " r"Operation timed out\s*" + ), + "conn_refused": re.compile( + r"\s*ssh: connect to host .+ port .+: Connection refused\s*" + ) + # todo: check for other connection failures for better error messages? +} + + +def _read_subprocess_stream(f, output_file, is_stdout=False): + """Read and process a subprocess output stream. + + The goal is to find error messages and respond to them in a clever way. + Currently just used for SSH messages (CONN_REFUSED, TIMEOUT, etc.), so + the user does not get confused by these. + + Ran in a thread each for both `stdout` and `stderr` to + allow for cross-platform asynchronous IO. + + Note: `select`-based IO is another option, but Windows has + no support for `select`ing pipes, and Linux support varies somewhat. + Spefically, Older *nix systems might also have quirks in how they + handle `select` on pipes. + + Args: + f: File object for the stream. + output_file: File object to which filtered output is written. + is_stdout (bool): + When `is_stdout` is `False`, the stream is assumed to + be `stderr`. Different error message detectors are used, + and the output is displayed to the user unless it matches + a special case (e.g. SSH timeout), in which case this is + left up to the caller. + """ + + detected_special_case = None + while True: + # ! Readline here is crucial. + # ! Normal `read()` will block until EOF instead of until + # something is available. + line = f.readline() + + if line is None or line == "": + # EOF + break + + if line[-1] == "\n": + line = line[:-1] + + if not is_stdout: + if _ssh_output_regexes["connection_closed"].fullmatch(line) is not None: + # Do not log "connection closed" messages which SSH + # puts in stderr for no reason. + # + # They are never errors since the connection will + # close no matter whether the command succeeds or not. + continue + + if _ssh_output_regexes["timeout"].fullmatch(line) is not None: + # Timeout is not really an error but rather a special + # condition. It should be handled by the caller, since + # network conditions/nodes in the early stages of boot + # are expected to sometimes cause connection timeouts. + if detected_special_case is not None: + raise ValueError( + "Bug: ssh_timeout conflicts with another " + "special codition: " + detected_special_case + ) + + detected_special_case = "ssh_timeout" + continue + + if _ssh_output_regexes["conn_refused"].fullmatch(line) is not None: + # Connection refused is not really an error but + # rather a special condition. It should be handled by + # the caller, since network conditions/nodes in the + # early stages of boot are expected to sometimes cause + # CONN_REFUSED. + if detected_special_case is not None: + raise ValueError( + "Bug: ssh_conn_refused conflicts with another " + "special codition: " + detected_special_case + ) + + detected_special_case = "ssh_conn_refused" + continue + + if _ssh_output_regexes["known_host_update"].fullmatch(line) is not None: + # Since we ignore SSH host control anyway + # (-o UserKnownHostsFile=/dev/null), + # we should silence the host control warnings. + continue + + cli_logger.error(line) + + if output_file is not None and output_file != subprocess.DEVNULL: + output_file.write(line + "\n") + + return detected_special_case + + +def _run_and_process_output( + cmd, + stdout_file, + process_runner=subprocess, + stderr_file=None, + use_login_shells=False, +): + """Run a command and process its output for special cases. + + Calls a standard 'check_call' if process_runner is not subprocess. + + Specifically, run all command output through regex to detect + error conditions and filter out non-error messages that went to stderr + anyway (SSH writes ALL of its "system" messages to stderr even if they + are not actually errors). + + Args: + cmd (List[str]): Command to run. + process_runner: Used for command execution. Assumed to have + 'check_call' and 'check_output' inplemented. + stdout_file: File to redirect stdout to. + stderr_file: File to redirect stderr to. + + Implementation notes: + 1. `use_login_shells` disables special processing + If we run interactive apps, output processing will likely get + overwhelmed with the interactive output elements. + Thus, we disable output processing for login shells. This makes + the logging experience considerably worse, but it only degrades + to old-style logging. + + For example, `pip install` outputs HUNDREDS of progress-bar lines + when downloading a package, and we have to + read + regex + write all of them. + + After all, even just printing output to console can often slow + down a fast-printing app, and we do more than just print, and + all that from Python, which is much slower than C regarding + stream processing. + + 2. `stdin=PIPE` for subprocesses + Do not inherit stdin as it messes with bash signals + (ctrl-C for SIGINT) and these commands aren't supposed to + take input anyway. + + 3. `ThreadPoolExecutor` without the `Pool` + We use `ThreadPoolExecutor` to create futures from threads. + Threads are never reused. + + This approach allows us to have no custom synchronization by + off-loading the return value and exception passing to the + standard library (`ThreadPoolExecutor` internals). + + This instance will be `shutdown()` ASAP so it's fine to + create one in such a weird place. + + The code is thus 100% thread-safe as long as the stream readers + are read-only except for return values and possible exceptions. + """ + stdin_overwrite = subprocess.PIPE + # This already should be validated in a higher place of the stack. + assert not ( + does_allow_interactive() and is_output_redirected() + ), "Cannot redirect output while in interactive mode." + if process_runner != subprocess or ( + does_allow_interactive() and not is_output_redirected() + ): + stdin_overwrite = None + + # See implementation note #1 + + if use_login_shells or process_runner != subprocess: + return process_runner.check_call( + cmd, + # See implementation note #2 + stdin=stdin_overwrite, + stdout=stdout_file, + stderr=stderr_file, + ) + + with subprocess.Popen( + cmd, + # See implementation note #2 + stdin=stdin_overwrite, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + bufsize=1, # line buffering + universal_newlines=True, # text mode outputs + ) as p: + from concurrent.futures import ThreadPoolExecutor + + # Closing stdin might be necessary to signal EOF to some + # apps (they might get stuck waiting for input forever otherwise). + p.stdin.close() + + # See implementation note #3 + with ThreadPoolExecutor(max_workers=2) as executor: + stdout_future = executor.submit( + _read_subprocess_stream, p.stdout, stdout_file, is_stdout=True + ) + stderr_future = executor.submit( + _read_subprocess_stream, p.stderr, stderr_file, is_stdout=False + ) + # Wait for completion. + executor.shutdown() + + # Update `p.returncode` + p.poll() + + detected_special_case = stdout_future.result() + if stderr_future.result() is not None: + if detected_special_case is not None: + # This might some day need to be changed. + # We should probably make sure the two special cases + # are compatible then and that we can handle both by + # e.g. reporting both to the caller. + raise ValueError( + "Bug: found a special case in both stdout and " + "stderr. This is not valid behavior at the time " + "of writing this code." + ) + detected_special_case = stderr_future.result() + + if p.returncode > 0: + # Process failed, but not due to a signal, since signals + # set the exit code to a negative value. + raise ProcessRunnerError( + "Command failed", + "ssh_command_failed", + code=p.returncode, + command=cmd, + special_case=detected_special_case, + ) + elif p.returncode < 0: + # Process failed due to a signal, since signals + # set the exit code to a negative value. + raise ProcessRunnerError( + "Command failed", + "ssh_command_failed", + code=p.returncode, + command=cmd, + special_case="died_to_signal", + ) + + return p.returncode + + +def run_cmd_redirected( + cmd, process_runner=subprocess, silent=False, use_login_shells=False +): + """Run a command and optionally redirect output to a file. + + Args: + cmd (List[str]): Command to run. + process_runner: Process runner used for executing commands. + silent: If true, the command output will be silenced completely + (redirected to /dev/null), unless verbose logging + is enabled. Use this for running utility commands like + rsync. + """ + if silent and cli_logger.verbosity < 1: + return _run_and_process_output( + cmd, + process_runner=process_runner, + stdout_file=process_runner.DEVNULL, + stderr_file=process_runner.DEVNULL, + use_login_shells=use_login_shells, + ) + + if not is_output_redirected(): + return _run_and_process_output( + cmd, + process_runner=process_runner, + stdout_file=sys.stdout, + stderr_file=sys.stderr, + use_login_shells=use_login_shells, + ) + else: + tmpfile_path = os.path.join( + tempfile.gettempdir(), "ray-up-{}-{}.txt".format(cmd[0], time.time()) + ) + with open( + tmpfile_path, + mode="w", + # line buffering + buffering=1, + ) as tmp: + cli_logger.verbose("Command stdout is redirected to {}", cf.bold(tmp.name)) + + return _run_and_process_output( + cmd, + process_runner=process_runner, + stdout_file=tmp, + stderr_file=tmp, + use_login_shells=use_login_shells, + ) + + +def handle_ssh_fails(e, first_conn_refused_time, retry_interval): + """Handle SSH system failures coming from a subprocess. + + Args: + e: The `ProcessRunnerException` to handle. + first_conn_refused_time: + The time (as reported by this function) or None, + indicating the last time a CONN_REFUSED error was caught. + + After exceeding a patience value, the program will be aborted + since SSH will likely never recover. + retry_interval: The interval after which the command will be retried, + used here just to inform the user. + """ + if e.msg_type != "ssh_command_failed": + return + + if e.special_case == "ssh_conn_refused": + if ( + first_conn_refused_time is not None + and time.time() - first_conn_refused_time > CONN_REFUSED_PATIENCE + ): + cli_logger.error( + "SSH connection was being refused " + "for {} seconds. Head node assumed " + "unreachable.", + cf.bold(str(CONN_REFUSED_PATIENCE)), + ) + cli_logger.abort( + "Check the node's firewall settings " + "and the cloud network configuration." + ) + + cli_logger.warning("SSH connection was refused.") + cli_logger.warning( + "This might mean that the SSH daemon is " + "still setting up, or that " + "the host is inaccessable (e.g. due to " + "a firewall)." + ) + + return time.time() + + if e.special_case in ["ssh_timeout", "ssh_conn_refused"]: + cli_logger.print( + "SSH still not available, retrying in {} seconds.", + cf.bold(str(retry_interval)), + ) + else: + raise e + + return first_conn_refused_time diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/updater.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/updater.py new file mode 100644 index 0000000000000000000000000000000000000000..68aec7d68475d81e63b5083b70213bc76580052a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/updater.py @@ -0,0 +1,570 @@ +import logging +import os +import subprocess +import time +import traceback +from threading import Thread + +import click + +from ray._common.usage import usage_constants, usage_lib +from ray.autoscaler._private import subprocess_output_util as cmd_output_util +from ray.autoscaler._private.cli_logger import cf, cli_logger +from ray.autoscaler._private.command_runner import ( + AUTOSCALER_NODE_START_WAIT_S, + ProcessRunnerError, +) +from ray.autoscaler._private.constants import ( + LABELS_ENVIRONMENT_VARIABLE, + RESOURCES_ENVIRONMENT_VARIABLE, +) +from ray.autoscaler._private.event_system import CreateClusterEvent, global_event_system +from ray.autoscaler._private.log_timer import LogTimer +from ray.autoscaler.tags import ( + STATUS_SETTING_UP, + STATUS_SYNCING_FILES, + STATUS_UP_TO_DATE, + STATUS_UPDATE_FAILED, + STATUS_WAITING_FOR_SSH, + TAG_RAY_FILE_MOUNTS_CONTENTS, + TAG_RAY_NODE_STATUS, + TAG_RAY_RUNTIME_CONFIG, +) + +logger = logging.getLogger(__name__) + +NUM_SETUP_STEPS = 7 +READY_CHECK_INTERVAL = 5 + + +class NodeUpdater: + """A process for syncing files and running init commands on a node. + + Arguments: + node_id: the Node ID + provider_config: Provider section of autoscaler yaml + provider: NodeProvider Class + auth_config: Auth section of autoscaler yaml + cluster_name: the name of the cluster. + file_mounts: Map of remote to local paths + initialization_commands: Commands run before container launch + setup_commands: Commands run before ray starts + ray_start_commands: Commands to start ray + runtime_hash: Used to check for config changes + file_mounts_contents_hash: Used to check for changes to file mounts + is_head_node: Whether to use head start/setup commands + rsync_options: Extra options related to the rsync command. + process_runner: the module to use to run the commands + in the CommandRunner. E.g., subprocess. + use_internal_ip: Wwhether the node_id belongs to an internal ip + or external ip. + docker_config: Docker section of autoscaler yaml + restart_only: Whether to skip setup commands & just restart ray + for_recovery: True if updater is for a recovering node. Only used for + metric tracking. + """ + + def __init__( + self, + node_id, + provider_config, + provider, + auth_config, + cluster_name, + file_mounts, + initialization_commands, + setup_commands, + ray_start_commands, + runtime_hash, + file_mounts_contents_hash, + is_head_node, + node_resources=None, + node_labels=None, + cluster_synced_files=None, + rsync_options=None, + process_runner=subprocess, + use_internal_ip=False, + docker_config=None, + restart_only=False, + for_recovery=False, + ): + self.log_prefix = "NodeUpdater: {}: ".format(node_id) + # Three cases: + # 1) use_internal_ip arg is True -> use_internal_ip is True + # 2) worker node -> use value of provider_config["use_internal_ips"] + # 3) head node -> use value of provider_config["use_internal_ips"] unless + # overriden by provider_config["use_external_head_ip"] + use_internal_ip = use_internal_ip or ( + provider_config.get("use_internal_ips", False) + and not ( + is_head_node and provider_config.get("use_external_head_ip", False) + ) + ) + self.cmd_runner = provider.get_command_runner( + self.log_prefix, + node_id, + auth_config, + cluster_name, + process_runner, + use_internal_ip, + docker_config, + ) + + self.daemon = True + self.node_id = node_id + self.provider_type = provider_config.get("type") + self.provider = provider + # Some node providers don't specify empty structures as + # defaults. Better to be defensive. + file_mounts = file_mounts or {} + self.file_mounts = { + remote: os.path.expanduser(local) for remote, local in file_mounts.items() + } + + self.initialization_commands = initialization_commands + self.setup_commands = setup_commands + self.ray_start_commands = ray_start_commands + self.node_resources = node_resources + self.node_labels = node_labels + self.runtime_hash = runtime_hash + self.file_mounts_contents_hash = file_mounts_contents_hash + # TODO (Alex): This makes the assumption that $HOME on the head and + # worker nodes is the same. Also note that `cluster_synced_files` is + # set on the head -> worker updaters only (so `expanduser` is only run + # on the head node). + cluster_synced_files = cluster_synced_files or [] + self.cluster_synced_files = [ + os.path.expanduser(path) for path in cluster_synced_files + ] + self.rsync_options = rsync_options or {} + self.auth_config = auth_config + self.is_head_node = is_head_node + self.docker_config = docker_config + self.restart_only = restart_only + self.update_time = None + self.for_recovery = for_recovery + + def run(self): + update_start_time = time.time() + if ( + cmd_output_util.does_allow_interactive() + and cmd_output_util.is_output_redirected() + ): + # this is most probably a bug since the user has no control + # over these settings + msg = ( + "Output was redirected for an interactive command. " + "Either do not pass `--redirect-command-output` " + "or also pass in `--use-normal-shells`." + ) + cli_logger.abort(msg) + + try: + with LogTimer( + self.log_prefix + "Applied config {}".format(self.runtime_hash) + ): + self.do_update() + except Exception as e: + self.provider.set_node_tags( + self.node_id, {TAG_RAY_NODE_STATUS: STATUS_UPDATE_FAILED} + ) + cli_logger.error("New status: {}", cf.bold(STATUS_UPDATE_FAILED)) + + cli_logger.error("!!!") + if hasattr(e, "cmd"): + stderr_output = getattr(e, "stderr", "No stderr available") + cli_logger.error( + "Setup command `{}` failed with exit code {}. stderr: {}", + cf.bold(e.cmd), + e.returncode, + stderr_output, + ) + else: + cli_logger.verbose_error("Exception details: {}", str(vars(e))) + full_traceback = traceback.format_exc() + cli_logger.error("Full traceback: {}", full_traceback) + # todo: handle this better somehow? + cli_logger.error("Error message: {}", str(e)) + cli_logger.error("!!!") + cli_logger.newline() + + if isinstance(e, click.ClickException): + # todo: why do we ignore this here + return + raise + + tags_to_set = { + TAG_RAY_NODE_STATUS: STATUS_UP_TO_DATE, + TAG_RAY_RUNTIME_CONFIG: self.runtime_hash, + } + if self.file_mounts_contents_hash is not None: + tags_to_set[TAG_RAY_FILE_MOUNTS_CONTENTS] = self.file_mounts_contents_hash + + self.provider.set_node_tags(self.node_id, tags_to_set) + cli_logger.labeled_value("New status", STATUS_UP_TO_DATE) + + self.update_time = time.time() - update_start_time + self.exitcode = 0 + + def sync_file_mounts(self, sync_cmd, step_numbers=(0, 2)): + # step_numbers is (# of previous steps, total steps) + previous_steps, total_steps = step_numbers + + nolog_paths = [] + if cli_logger.verbosity == 0: + nolog_paths = ["~/ray_bootstrap_key.pem", "~/ray_bootstrap_config.yaml"] + + def do_sync(remote_path, local_path, allow_non_existing_paths=False): + if allow_non_existing_paths and not os.path.exists(local_path): + cli_logger.print("sync: {} does not exist. Skipping.", local_path) + # Ignore missing source files. In the future we should support + # the --delete-missing-args command to delete files that have + # been removed + return + + assert os.path.exists(local_path), local_path + + if os.path.isdir(local_path): + if not local_path.endswith("/"): + local_path += "/" + if not remote_path.endswith("/"): + remote_path += "/" + + with LogTimer( + self.log_prefix + "Synced {} to {}".format(local_path, remote_path) + ): + is_docker = ( + self.docker_config and self.docker_config["container_name"] != "" + ) + if not is_docker: + # The DockerCommandRunner handles this internally. + self.cmd_runner.run( + "mkdir -p {}".format(os.path.dirname(remote_path)), + run_env="host", + ) + sync_cmd(local_path, remote_path, docker_mount_if_possible=True) + + if remote_path not in nolog_paths: + # todo: timed here? + cli_logger.print( + "{} from {}", cf.bold(remote_path), cf.bold(local_path) + ) + + # Rsync file mounts + with cli_logger.group( + "Processing file mounts", _numbered=("[]", previous_steps + 1, total_steps) + ): + for remote_path, local_path in self.file_mounts.items(): + do_sync(remote_path, local_path) + previous_steps += 1 + + if self.cluster_synced_files: + with cli_logger.group( + "Processing worker file mounts", + _numbered=("[]", previous_steps + 1, total_steps), + ): + cli_logger.print("synced files: {}", str(self.cluster_synced_files)) + for path in self.cluster_synced_files: + do_sync(path, path, allow_non_existing_paths=True) + previous_steps += 1 + else: + cli_logger.print( + "No worker file mounts to sync", + _numbered=("[]", previous_steps + 1, total_steps), + ) + + def wait_ready(self, deadline): + with cli_logger.group( + "Waiting for SSH to become available", _numbered=("[]", 1, NUM_SETUP_STEPS) + ): + with LogTimer(self.log_prefix + "Got remote shell"): + cli_logger.print("Running `{}` as a test.", cf.bold("uptime")) + first_conn_refused_time = None + while True: + if time.time() > deadline: + raise Exception("wait_ready timeout exceeded.") + if self.provider.is_terminated(self.node_id): + raise Exception( + "wait_ready aborting because node " + "detected as terminated." + ) + + try: + # Run outside of the container + self.cmd_runner.run("uptime", timeout=10, run_env="host") + cli_logger.success("Success.") + return True + except ProcessRunnerError as e: + first_conn_refused_time = cmd_output_util.handle_ssh_fails( + e, + first_conn_refused_time, + retry_interval=READY_CHECK_INTERVAL, + ) + time.sleep(READY_CHECK_INTERVAL) + except Exception as e: + # TODO(maximsmol): we should not be ignoring + # exceptions if they get filtered properly + # (new style log + non-interactive shells) + # + # however threading this configuration state + # is a pain and I'm leaving it for later + + retry_str = "(" + str(e) + ")" + if hasattr(e, "cmd"): + if isinstance(e.cmd, str): + cmd_ = e.cmd + elif isinstance(e.cmd, list): + cmd_ = " ".join(e.cmd) + else: + logger.debug( + f"e.cmd type ({type(e.cmd)}) not list or str." + ) + cmd_ = str(e.cmd) + retry_str = "(Exit Status {}): {}".format( + e.returncode, cmd_ + ) + + cli_logger.print( + "SSH still not available {}, retrying in {} seconds.", + cf.dimmed(retry_str), + cf.bold(str(READY_CHECK_INTERVAL)), + ) + + time.sleep(READY_CHECK_INTERVAL) + + def do_update(self): + self.provider.set_node_tags( + self.node_id, {TAG_RAY_NODE_STATUS: STATUS_WAITING_FOR_SSH} + ) + cli_logger.labeled_value("New status", STATUS_WAITING_FOR_SSH) + + deadline = time.time() + AUTOSCALER_NODE_START_WAIT_S + self.wait_ready(deadline) + global_event_system.execute_callback(CreateClusterEvent.ssh_control_acquired) + + node_tags = self.provider.node_tags(self.node_id) + logger.debug("Node tags: {}".format(str(node_tags))) + + if self.provider_type == "aws" and self.provider.provider_config: + from ray.autoscaler._private.aws.cloudwatch.cloudwatch_helper import ( + CloudwatchHelper, + ) + + CloudwatchHelper( + self.provider.provider_config, self.node_id, self.provider.cluster_name + ).update_from_config(self.is_head_node) + + if node_tags.get(TAG_RAY_RUNTIME_CONFIG) == self.runtime_hash: + # When resuming from a stopped instance the runtime_hash may be the + # same, but the container will not be started. + init_required = self.cmd_runner.run_init( + as_head=self.is_head_node, + file_mounts=self.file_mounts, + sync_run_yet=False, + ) + if init_required: + node_tags[TAG_RAY_RUNTIME_CONFIG] += "-invalidate" + # This ensures that `setup_commands` are not removed + self.restart_only = False + + if self.restart_only: + self.setup_commands = [] + + # runtime_hash will only change whenever the user restarts + # or updates their cluster with `get_or_create_head_node` + if node_tags.get(TAG_RAY_RUNTIME_CONFIG) == self.runtime_hash and ( + not self.file_mounts_contents_hash + or node_tags.get(TAG_RAY_FILE_MOUNTS_CONTENTS) + == self.file_mounts_contents_hash + ): + # todo: we lie in the confirmation message since + # full setup might be cancelled here + cli_logger.print( + "Configuration already up to date, " + "skipping file mounts, initalization and setup commands.", + _numbered=("[]", "2-6", NUM_SETUP_STEPS), + ) + + else: + cli_logger.print( + "Updating cluster configuration.", _tags=dict(hash=self.runtime_hash) + ) + + self.provider.set_node_tags( + self.node_id, {TAG_RAY_NODE_STATUS: STATUS_SYNCING_FILES} + ) + cli_logger.labeled_value("New status", STATUS_SYNCING_FILES) + self.sync_file_mounts(self.rsync_up, step_numbers=(1, NUM_SETUP_STEPS)) + + # Only run setup commands if runtime_hash has changed because + # we don't want to run setup_commands every time the head node + # file_mounts folders have changed. + if node_tags.get(TAG_RAY_RUNTIME_CONFIG) != self.runtime_hash: + # Run init commands + self.provider.set_node_tags( + self.node_id, {TAG_RAY_NODE_STATUS: STATUS_SETTING_UP} + ) + cli_logger.labeled_value("New status", STATUS_SETTING_UP) + + if self.initialization_commands: + with cli_logger.group( + "Running initialization commands", + _numbered=("[]", 4, NUM_SETUP_STEPS), + ): + global_event_system.execute_callback( + CreateClusterEvent.run_initialization_cmd + ) + with LogTimer( + self.log_prefix + "Initialization commands", + show_status=True, + ): + for cmd in self.initialization_commands: + global_event_system.execute_callback( + CreateClusterEvent.run_initialization_cmd, + {"command": cmd}, + ) + try: + # Overriding the existing SSHOptions class + # with a new SSHOptions class that uses + # this ssh_private_key as its only __init__ + # argument. + # Run outside docker. + self.cmd_runner.run( + cmd, + ssh_options_override_ssh_key=self.auth_config.get( # noqa: E501 + "ssh_private_key" + ), + run_env="host", + ) + except ProcessRunnerError as e: + if e.msg_type == "ssh_command_failed": + cli_logger.error("Failed.") + cli_logger.error("See above for stderr.") + + raise click.ClickException( + "Initialization command failed." + ) from None + else: + cli_logger.print( + "No initialization commands to run.", + _numbered=("[]", 4, NUM_SETUP_STEPS), + ) + with cli_logger.group( + "Initializing command runner", + # todo: fix command numbering + _numbered=("[]", 5, NUM_SETUP_STEPS), + ): + self.cmd_runner.run_init( + as_head=self.is_head_node, + file_mounts=self.file_mounts, + sync_run_yet=True, + ) + if self.setup_commands: + with cli_logger.group( + "Running setup commands", + # todo: fix command numbering + _numbered=("[]", 6, NUM_SETUP_STEPS), + ): + global_event_system.execute_callback( + CreateClusterEvent.run_setup_cmd + ) + with LogTimer( + self.log_prefix + "Setup commands", show_status=True + ): + total = len(self.setup_commands) + for i, cmd in enumerate(self.setup_commands): + global_event_system.execute_callback( + CreateClusterEvent.run_setup_cmd, {"command": cmd} + ) + if cli_logger.verbosity == 0 and len(cmd) > 30: + cmd_to_print = cf.bold(cmd[:30]) + "..." + else: + cmd_to_print = cf.bold(cmd) + + cli_logger.print( + "{}", cmd_to_print, _numbered=("()", i, total) + ) + + try: + # Runs in the container if docker is in use + self.cmd_runner.run(cmd, run_env="auto") + except ProcessRunnerError as e: + if e.msg_type == "ssh_command_failed": + cli_logger.error("Failed.") + cli_logger.error("See above for stderr.") + + raise click.ClickException("Setup command failed.") + else: + cli_logger.print( + "No setup commands to run.", + _numbered=("[]", 6, NUM_SETUP_STEPS), + ) + + with cli_logger.group( + "Starting the Ray runtime", _numbered=("[]", 7, NUM_SETUP_STEPS) + ): + global_event_system.execute_callback(CreateClusterEvent.start_ray_runtime) + with LogTimer(self.log_prefix + "Ray start commands", show_status=True): + for cmd in self.ray_start_commands: + env_vars = {} + if self.is_head_node: + if usage_lib.usage_stats_enabled(): + env_vars[usage_constants.USAGE_STATS_ENABLED_ENV_VAR] = 1 + else: + # Disable usage stats collection in the cluster. + env_vars[usage_constants.USAGE_STATS_ENABLED_ENV_VAR] = 0 + + # Add a resource override env variable if needed. + # Local NodeProvider doesn't need resource and label override. + if self.provider_type != "local": + if self.node_resources: + env_vars[ + RESOURCES_ENVIRONMENT_VARIABLE + ] = self.node_resources + if self.node_labels: + env_vars[LABELS_ENVIRONMENT_VARIABLE] = self.node_labels + + try: + old_redirected = cmd_output_util.is_output_redirected() + cmd_output_util.set_output_redirected(False) + # Runs in the container if docker is in use + self.cmd_runner.run( + cmd, environment_variables=env_vars, run_env="auto" + ) + cmd_output_util.set_output_redirected(old_redirected) + except ProcessRunnerError as e: + if e.msg_type == "ssh_command_failed": + cli_logger.error("Failed.") + cli_logger.error("See above for stderr.") + + raise click.ClickException("Start command failed.") + global_event_system.execute_callback( + CreateClusterEvent.start_ray_runtime_completed + ) + + def rsync_up(self, source, target, docker_mount_if_possible=False): + options = {} + options["docker_mount_if_possible"] = docker_mount_if_possible + options["rsync_exclude"] = self.rsync_options.get("rsync_exclude") + options["rsync_filter"] = self.rsync_options.get("rsync_filter") + self.cmd_runner.run_rsync_up(source, target, options=options) + cli_logger.verbose( + "`rsync`ed {} (local) to {} (remote)", cf.bold(source), cf.bold(target) + ) + + def rsync_down(self, source, target, docker_mount_if_possible=False): + options = {} + options["docker_mount_if_possible"] = docker_mount_if_possible + options["rsync_exclude"] = self.rsync_options.get("rsync_exclude") + options["rsync_filter"] = self.rsync_options.get("rsync_filter") + self.cmd_runner.run_rsync_down(source, target, options=options) + cli_logger.verbose( + "`rsync`ed {} (remote) to {} (local)", cf.bold(source), cf.bold(target) + ) + + +class NodeUpdaterThread(NodeUpdater, Thread): + def __init__(self, *args, **kwargs): + Thread.__init__(self) + NodeUpdater.__init__(self, *args, **kwargs) + self.exitcode = -1 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/util.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/util.py new file mode 100644 index 0000000000000000000000000000000000000000..7da96de2b14bb90aa5063f629df71d5b00cf2e9f --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/util.py @@ -0,0 +1,992 @@ +import collections +import copy +import hashlib +import json +import logging +import os +import threading +from dataclasses import dataclass +from datetime import datetime +from io import StringIO +from numbers import Number, Real +from typing import Any, Dict, List, Optional, Tuple, Union + +import ray +from ray._common.utils import PLACEMENT_GROUP_BUNDLE_RESOURCE_NAME +import ray._private.services as services +from ray._private.utils import ( + PLACEMENT_GROUP_INDEXED_BUNDLED_RESOURCE_PATTERN, + PLACEMENT_GROUP_WILDCARD_RESOURCE_PATTERN, +) +from ray.autoscaler._private import constants +from ray.autoscaler._private.cli_logger import cli_logger +from ray.autoscaler._private.docker import validate_docker_config +from ray.autoscaler._private.local.config import prepare_local +from ray.autoscaler._private.providers import _get_default_config +from ray.autoscaler.tags import NODE_TYPE_LEGACY_HEAD, NODE_TYPE_LEGACY_WORKER + +REQUIRED, OPTIONAL = True, False + + +HEAD_TYPE_MAX_WORKERS_WARN_TEMPLATE = ( + "Setting `max_workers` for node type" + " `{node_type}` to the global `max_workers` value of {max_workers}. To" + " avoid spawning worker nodes of type `{node_type}`, explicitly set" + " `max_workers: 0` for `{node_type}`.\n" + "Note that `max_workers: 0` was the default value prior to Ray 1.3.0." + " Your current version is Ray {version}.\n" + "See the docs for more information:\n" + "https://docs.ray.io/en/master/cluster/config.html" + "#cluster-configuration-node-max-workers\n" + "https://docs.ray.io/en/master/cluster/config.html#full-configuration" +) + +ResourceBundle = Dict[str, Union[int, float]] + +# A Dict and the count of how many times it occurred. +# Refer to freq_of_dicts() below. +DictCount = Tuple[Dict, Number] + +# e.g., cpu_4_ondemand. +NodeType = str + +# e.g., head, worker, unmanaged +NodeKind = str + +# e.g., {"resources": ..., "max_workers": ...}. +NodeTypeConfigDict = Dict[str, Any] + +# e.g., {"GPU": 1}. +ResourceDict = Dict[str, Real] + +# e.g., "node-1". +NodeID = str + +# e.g., "127.0.0.1". +NodeIP = str + +# Number of nodes to launch +NodeCount = int + +# e.g. "up-to-date", "update-failed" +# See autoscaler/tags.py for other status +# values used by the autoscaler. +NodeStatus = str + +Usage = Dict[str, Tuple[Number, Number]] + +logger = logging.getLogger(__name__) + + +def is_placement_group_resource(resource_name: str) -> bool: + """ + Check if a resource name is structured like a placement group. + """ + return bool( + PLACEMENT_GROUP_WILDCARD_RESOURCE_PATTERN.match(resource_name) + or PLACEMENT_GROUP_INDEXED_BUNDLED_RESOURCE_PATTERN.match(resource_name) + ) + + +@dataclass +class LoadMetricsSummary: + # Map of resource name (e.g. "memory") to pair of (Used, Available) numbers + usage: Usage + # Counts of demand bundles from task/actor demand. + # e.g. [({"CPU": 1}, 5), ({"GPU":1}, 2)] + resource_demand: List[DictCount] + # Counts of pending placement groups + pg_demand: List[DictCount] + # Counts of demand bundles requested by autoscaler.sdk.request_resources + request_demand: List[DictCount] + node_types: List[DictCount] + # Optionally included for backwards compatibility: IP of the head node. See + # https://github.com/ray-project/ray/pull/20623 for details. + head_ip: Optional[NodeIP] = None + # Optionally included for backwards compatibility: Resource breakdown by + # node. Mapping from node id to resource usage. + usage_by_node: Optional[Dict[str, Usage]] = None + # A mapping from node name (the same key as `usage_by_node`) to node type. + # Optional for deployment modes which have the concept of node types and + # backwards compatibility. + node_type_mapping: Optional[Dict[str, str]] = None + idle_time_map: Optional[Dict[str, int]] = None + + +class ConcurrentCounter: + def __init__(self): + self._lock = threading.RLock() + self._counter = collections.defaultdict(int) + + def inc(self, key, count): + with self._lock: + self._counter[key] += count + return self.value + + def dec(self, key, count): + with self._lock: + self._counter[key] -= count + assert self._counter[key] >= 0, "counter cannot go negative" + return self.value + + def breakdown(self): + with self._lock: + return dict(self._counter) + + @property + def value(self): + with self._lock: + return sum(self._counter.values()) + + +def validate_config(config: Dict[str, Any]) -> None: + """Required Dicts indicate that no extra fields can be introduced.""" + if not isinstance(config, dict): + raise ValueError("Config {} is not a dictionary".format(config)) + + schema_path = os.path.join( + os.path.dirname(ray.autoscaler.__file__), "ray-schema.json" + ) + with open(schema_path) as f: + schema = json.load(f) + + try: + import jsonschema + except (ModuleNotFoundError, ImportError) as e: + # Don't log a warning message here. Logging be handled by upstream. + raise e from None + + try: + jsonschema.validate(config, schema) + except jsonschema.ValidationError as e: + raise e from None + + # Detect out of date defaults. This happens when the autoscaler that filled + # out the default values is older than the version of the autoscaler that + # is running on the cluster. + if "cluster_synced_files" not in config: + raise RuntimeError( + "Missing 'cluster_synced_files' field in the cluster " + "configuration. This is likely due to the Ray version running " + "in the cluster {ray_version} is greater than the Ray version " + "running on your laptop. Please try updating Ray on your local " + "machine and make sure the versions match.".format( + ray_version=ray.__version__ + ) + ) + + if "available_node_types" in config: + if "head_node_type" not in config: + raise ValueError( + "You must specify `head_node_type` if `available_node_types is set." + ) + if config["head_node_type"] not in config["available_node_types"]: + raise ValueError("`head_node_type` must be one of `available_node_types`.") + + sum_min_workers = sum( + config["available_node_types"][node_type].get("min_workers", 0) + for node_type in config["available_node_types"] + ) + if sum_min_workers > config["max_workers"]: + raise ValueError( + "The specified global `max_workers` is smaller than the " + "sum of `min_workers` of all the available node types." + ) + + +def check_legacy_fields(config: Dict[str, Any]) -> None: + """For use in providers that have completed the migration to + available_node_types. + + Warns user that head_node and worker_nodes fields are being ignored. + Throws an error if available_node_types and head_node_type aren't + specified. + """ + # log warning if non-empty head_node field + if "head_node" in config and config["head_node"]: + cli_logger.warning( + "The `head_node` field is deprecated and will be ignored. " + "Use `head_node_type` and `available_node_types` instead." + ) + # log warning if non-empty worker_nodes field + if "worker_nodes" in config and config["worker_nodes"]: + cli_logger.warning( + "The `worker_nodes` field is deprecated and will be ignored. " + "Use `available_node_types` instead." + ) + if "available_node_types" not in config: + cli_logger.error("`available_node_types` not specified in config") + raise ValueError("`available_node_types` not specified in config") + if "head_node_type" not in config: + cli_logger.error("`head_node_type` not specified in config") + raise ValueError("`head_node_type` not specified in config") + + +def prepare_config(config: Dict[str, Any]) -> Dict[str, Any]: + """ + The returned config has the following properties: + - Uses the multi-node-type autoscaler configuration. + - Merged with the appropriate defaults.yaml + - Has a valid Docker configuration if provided. + - Has max_worker set for each node type. + """ + is_local = config.get("provider", {}).get("type") == "local" + is_kuberay = config.get("provider", {}).get("type") == "kuberay" + if is_local: + config = prepare_local(config) + elif is_kuberay: + # With KubeRay, we don't need to do anything here since KubeRay + # generate the autoscaler config from the RayCluster CR instead + # of loading from the files. + return config + + with_defaults = fillout_defaults(config) + merge_setup_commands(with_defaults) + validate_docker_config(with_defaults) + fill_node_type_min_max_workers(with_defaults) + return with_defaults + + +def translate_trivial_legacy_config(config: Dict[str, Any]): + """ + Drop empty deprecated fields ("head_node" and "worker_node"). + """ + + REMOVABLE_FIELDS = ["head_node", "worker_nodes"] + + for field in REMOVABLE_FIELDS: + if field in config and not config[field]: + logger.warning( + f"Dropping the empty legacy field {field}. {field}" + "is not supported for ray>=2.0.0. It is recommended to remove" + f"{field} from the cluster config." + ) + del config[field] + + +def fillout_defaults(config: Dict[str, Any]) -> Dict[str, Any]: + defaults = _get_default_config(config["provider"]) + defaults.update(config) + + # Just for clarity: + merged_config = copy.deepcopy(defaults) + + # Fill auth field to avoid key errors. + # This field is accessed when calling NodeUpdater but is not relevant to + # certain node providers and is thus left out of some cluster launching + # configs. + merged_config["auth"] = merged_config.get("auth", {}) + + # A legacy config is one which doesn't have available_node_types, + # but has at least one of head_node or worker_nodes. + is_legacy_config = ("available_node_types" not in config) and ( + "head_node" in config or "worker_nodes" in config + ) + # Do merging logic for legacy configs. + if is_legacy_config: + merged_config = merge_legacy_yaml_with_defaults(merged_config) + # Take care of this here, in case a config does not specify any of head, + # workers, node types, but does specify min workers: + merged_config.pop("min_workers", None) + + translate_trivial_legacy_config(merged_config) + + return merged_config + + +def merge_legacy_yaml_with_defaults(merged_config: Dict[str, Any]) -> Dict[str, Any]: + """Rewrite legacy config's available node types after it has been merged + with defaults yaml. + """ + cli_logger.warning( + "Converting legacy cluster config to a multi node type cluster " + "config. Multi-node-type cluster configs are the recommended " + "format for configuring Ray clusters. " + "See the docs for more information:\n" + "https://docs.ray.io/en/master/cluster/config.html#full-configuration" + ) + + # Get default head and worker types. + default_head_type = merged_config["head_node_type"] + # Default configs are assumed to have two node types -- one for the head + # and one for the workers. + assert len(merged_config["available_node_types"].keys()) == 2 + default_worker_type = ( + merged_config["available_node_types"].keys() - {default_head_type} + ).pop() + + if merged_config["head_node"]: + # User specified a head node in legacy config. + # Convert it into data for the head's node type. + head_node_info = { + "node_config": merged_config["head_node"], + "resources": merged_config["head_node"].get("resources") or {}, + "min_workers": 0, + "max_workers": 0, + } + else: + # Use default data for the head's node type. + head_node_info = merged_config["available_node_types"][default_head_type] + if merged_config["worker_nodes"]: + # User specified a worker node in legacy config. + # Convert it into data for the workers' node type. + worker_node_info = { + "node_config": merged_config["worker_nodes"], + "resources": merged_config["worker_nodes"].get("resources") or {}, + "min_workers": merged_config.get("min_workers", 0), + "max_workers": merged_config["max_workers"], + } + else: + # Use default data for the workers' node type. + worker_node_info = merged_config["available_node_types"][default_worker_type] + + # Rewrite available_node_types. + merged_config["available_node_types"] = { + NODE_TYPE_LEGACY_HEAD: head_node_info, + NODE_TYPE_LEGACY_WORKER: worker_node_info, + } + merged_config["head_node_type"] = NODE_TYPE_LEGACY_HEAD + + # Resources field in head/worker fields cause node launch to fail. + merged_config["head_node"].pop("resources", None) + merged_config["worker_nodes"].pop("resources", None) + + return merged_config + + +def merge_setup_commands(config): + config["head_setup_commands"] = ( + config["setup_commands"] + config["head_setup_commands"] + ) + config["worker_setup_commands"] = ( + config["setup_commands"] + config["worker_setup_commands"] + ) + return config + + +def fill_node_type_min_max_workers(config): + """Sets default per-node max workers to global max_workers. + This equivalent to setting the default per-node max workers to infinity, + with the only upper constraint coming from the global max_workers. + Sets default per-node min workers to zero. + Also sets default max_workers for the head node to zero. + """ + assert "max_workers" in config, "Global max workers should be set." + node_types = config["available_node_types"] + for node_type_name in node_types: + node_type_data = node_types[node_type_name] + + node_type_data.setdefault("min_workers", 0) + if "max_workers" not in node_type_data: + if node_type_name == config["head_node_type"]: + logger.info("setting max workers for head node type to 0") + node_type_data.setdefault("max_workers", 0) + else: + global_max_workers = config["max_workers"] + logger.info( + f"setting max workers for {node_type_name} to " + f"{global_max_workers}" + ) + node_type_data.setdefault("max_workers", global_max_workers) + + +def with_envs(cmds: List[str], kv: Dict[str, str]) -> str: + """ + Returns a list of commands with the given environment variables set. + + Args: + cmds (List[str]): List of commands to set environment variables for. + kv (Dict[str, str]): Dictionary of environment variables to set. + + Returns: + List[str]: List of commands with the given environment variables set. + + Example: + with_envs(["echo $FOO"], {"FOO": "BAR"}) + -> ["export FOO=BAR; echo $FOO"] + """ + out_cmds = [] + for cmd in cmds: + kv_str = "" + for k, v in kv.items(): + # We will need to do export here so that it works correctly with + # shell if the cmd args uses the argument. + kv_str += f"export {k}={v}; " + + out_cmds.append(f"{kv_str}{cmd}") + return out_cmds + + +def with_head_node_ip(cmds, head_ip=None): + if head_ip is None: + head_ip = services.get_node_ip_address() + return with_envs(cmds, {"RAY_HEAD_IP": head_ip}) + + +def hash_launch_conf(node_conf, auth): + hasher = hashlib.sha1() + # For hashing, we replace the path to the key with the + # key itself. This is to make sure the hashes are the + # same even if keys live at different locations on different + # machines. + full_auth = auth.copy() + for key_type in ["ssh_private_key", "ssh_public_key"]: + if key_type in auth: + with open(os.path.expanduser(auth[key_type])) as key: + full_auth[key_type] = key.read() + hasher.update(json.dumps([node_conf, full_auth], sort_keys=True).encode("utf-8")) + return hasher.hexdigest() + + +# Cache the file hashes to avoid rescanning it each time. Also, this avoids +# inadvertently restarting workers if the file mount content is mutated on the +# head node. +_hash_cache = {} + + +def hash_runtime_conf( + file_mounts, + cluster_synced_files, + extra_objs, + generate_file_mounts_contents_hash=False, +): + """Returns two hashes, a runtime hash and file_mounts_content hash. + + The runtime hash is used to determine if the configuration or file_mounts + contents have changed. It is used at launch time (ray up) to determine if + a restart is needed. + + The file_mounts_content hash is used to determine if the file_mounts or + cluster_synced_files contents have changed. It is used at monitor time to + determine if additional file syncing is needed. + """ + runtime_hasher = hashlib.sha1() + contents_hasher = hashlib.sha1() + + def add_content_hashes(path, allow_non_existing_paths: bool = False): + def add_hash_of_file(fpath): + with open(fpath, "rb") as f: + for chunk in iter(lambda: f.read(2**20), b""): + contents_hasher.update(chunk) + + path = os.path.expanduser(path) + if allow_non_existing_paths and not os.path.exists(path): + return + if os.path.isdir(path): + dirs = [] + for dirpath, _, filenames in os.walk(path): + dirs.append((dirpath, sorted(filenames))) + for dirpath, filenames in sorted(dirs): + contents_hasher.update(dirpath.encode("utf-8")) + for name in filenames: + contents_hasher.update(name.encode("utf-8")) + fpath = os.path.join(dirpath, name) + add_hash_of_file(fpath) + else: + add_hash_of_file(path) + + conf_str = json.dumps(file_mounts, sort_keys=True).encode("utf-8") + json.dumps( + extra_objs, sort_keys=True + ).encode("utf-8") + + # Only generate a contents hash if generate_contents_hash is true or + # if we need to generate the runtime_hash + if conf_str not in _hash_cache or generate_file_mounts_contents_hash: + for local_path in sorted(file_mounts.values()): + add_content_hashes(local_path) + head_node_contents_hash = contents_hasher.hexdigest() + + # Generate a new runtime_hash if its not cached + # The runtime hash does not depend on the cluster_synced_files hash + # because we do not want to restart nodes only if cluster_synced_files + # contents have changed. + if conf_str not in _hash_cache: + runtime_hasher.update(conf_str) + runtime_hasher.update(head_node_contents_hash.encode("utf-8")) + _hash_cache[conf_str] = runtime_hasher.hexdigest() + + # Add cluster_synced_files to the file_mounts_content hash + if cluster_synced_files is not None: + for local_path in sorted(cluster_synced_files): + # For cluster_synced_files, we let the path be non-existant + # because its possible that the source directory gets set up + # anytime over the life of the head node. + add_content_hashes(local_path, allow_non_existing_paths=True) + + file_mounts_contents_hash = contents_hasher.hexdigest() + + else: + file_mounts_contents_hash = None + + return (_hash_cache[conf_str], file_mounts_contents_hash) + + +def add_prefix(info_string, prefix): + """Prefixes each line of info_string, except the first, by prefix.""" + lines = info_string.split("\n") + prefixed_lines = [lines[0]] + for line in lines[1:]: + prefixed_line = ":".join([prefix, line]) + prefixed_lines.append(prefixed_line) + prefixed_info_string = "\n".join(prefixed_lines) + return prefixed_info_string + + +def format_pg(pg): + strategy = pg["strategy"] + bundles = pg["bundles"] + shape_strs = [] + for bundle, count in bundles: + shape_strs.append(f"{bundle} * {count}") + bundles_str = ", ".join(shape_strs) + return f"{bundles_str} ({strategy})" + + +def parse_placement_group_resource_str( + placement_group_resource_str: str, +) -> Tuple[str, Optional[str], bool]: + """Parse placement group resource in the form of following 3 cases: + {resource_name}_group_{bundle_id}_{group_name}; + -> This case is ignored as it is duplicated to the case below. + {resource_name}_group_{group_name}; + {resource_name} + + Returns: + Tuple of (resource_name, placement_group_name, is_countable_resource). + placement_group_name could be None if its not a placement group + resource. is_countable_resource is True if the resource + doesn't contain bundle index. We shouldn't count resources + with bundle index because it will + have duplicated resource information as + wildcard resources (resource name without bundle index). + """ + result = PLACEMENT_GROUP_INDEXED_BUNDLED_RESOURCE_PATTERN.match( + placement_group_resource_str + ) + if result: + return (result.group(1), result.group(3), False) + result = PLACEMENT_GROUP_WILDCARD_RESOURCE_PATTERN.match( + placement_group_resource_str + ) + if result: + return (result.group(1), result.group(2), True) + return (placement_group_resource_str, None, True) + + +MEMORY_SUFFIXES = [ + ("TiB", 2**40), + ("GiB", 2**30), + ("MiB", 2**20), + ("KiB", 2**10), +] + + +def format_memory(mem_bytes: Number) -> str: + """Formats memory in bytes in friendly unit. E.g. (2**30 + 1) bytes should + be displayed as 1GiB but 1 byte should be displayed as 1B, (as opposed to + rounding it to 0GiB). + """ + for suffix, bytes_per_unit in MEMORY_SUFFIXES: + if mem_bytes >= bytes_per_unit: + mem_in_unit = mem_bytes / bytes_per_unit + return f"{mem_in_unit:.2f}{suffix}" + + return f"{int(mem_bytes)}B" + + +def parse_usage(usage: Usage, verbose: bool) -> List[str]: + # first collect resources used in placement groups + placement_group_resource_usage = {} + placement_group_resource_total = collections.defaultdict(float) + for resource, (used, total) in usage.items(): + (pg_resource_name, pg_name, is_countable) = parse_placement_group_resource_str( + resource + ) + if pg_name: + if pg_resource_name not in placement_group_resource_usage: + placement_group_resource_usage[pg_resource_name] = 0 + if is_countable: + placement_group_resource_usage[pg_resource_name] += used + placement_group_resource_total[pg_resource_name] += total + continue + usage_lines = [] + for resource, (used, total) in sorted(usage.items()): + if "node:" in resource: + continue # Skip the auto-added per-node "node:" resource. + + (_, pg_name, _) = parse_placement_group_resource_str(resource) + if pg_name: + continue # Skip resource used by placement groups + + pg_used = 0 + pg_total = 0 + used_in_pg = resource in placement_group_resource_usage + if used_in_pg: + pg_used = placement_group_resource_usage[resource] + pg_total = placement_group_resource_total[resource] + # Used includes pg_total because when pgs are created + # it allocates resources. + # To get the real resource usage, we should subtract the pg + # reserved resources from the usage and add pg used instead. + used = used - pg_total + pg_used + + if resource in ["memory", "object_store_memory"]: + formatted_used = format_memory(used) + formatted_total = format_memory(total) + line = f"{formatted_used}/{formatted_total} {resource}" + if used_in_pg: + formatted_pg_used = format_memory(pg_used) + formatted_pg_total = format_memory(pg_total) + line = line + ( + f" ({formatted_pg_used} used of " + f"{formatted_pg_total} " + "reserved in placement groups)" + ) + usage_lines.append(line) + elif resource.startswith("accelerator_type:") and not verbose: + # We made a judgement call not to show this. + # https://github.com/ray-project/ray/issues/33272 + pass + else: + line = f"{used}/{total} {resource}" + if used_in_pg: + line += ( + f" ({pg_used} used of " f"{pg_total} reserved in placement groups)" + ) + usage_lines.append(line) + return usage_lines + + +def get_usage_report(lm_summary: LoadMetricsSummary, verbose: bool) -> str: + usage_lines = parse_usage(lm_summary.usage, verbose) + + sio = StringIO() + for line in usage_lines: + print(f" {line}", file=sio) + return sio.getvalue() + + +def format_resource_demand_summary( + resource_demand: List[Tuple[ResourceBundle, int]] +) -> List[str]: + def filter_placement_group_from_bundle(bundle: ResourceBundle): + """filter placement group from bundle resource name. returns + filtered bundle and a bool indicate if the bundle is using + placement group. + + Example: {"CPU_group_groupid": 1} returns {"CPU": 1}, True + {"memory": 1} return {"memory": 1}, False + """ + using_placement_group = False + result_bundle = dict() + for pg_resource_str, resource_count in bundle.items(): + (resource_name, pg_name, _) = parse_placement_group_resource_str( + pg_resource_str + ) + result_bundle[resource_name] = resource_count + if pg_name: + using_placement_group = True + return (result_bundle, using_placement_group) + + bundle_demand = collections.defaultdict(int) + pg_bundle_demand = collections.defaultdict(int) + + for bundle, count in resource_demand: + ( + pg_filtered_bundle, + using_placement_group, + ) = filter_placement_group_from_bundle(bundle) + + # bundle is a special keyword for placement group scheduling + # but it doesn't need to be exposed to users. Remove it from + # the demand report. + if ( + using_placement_group + and PLACEMENT_GROUP_BUNDLE_RESOURCE_NAME in pg_filtered_bundle.keys() + ): + del pg_filtered_bundle[PLACEMENT_GROUP_BUNDLE_RESOURCE_NAME] + + # No need to report empty request to demand (e.g., + # placement group ready task). + if len(pg_filtered_bundle.keys()) == 0: + continue + + bundle_demand[tuple(sorted(pg_filtered_bundle.items()))] += count + if using_placement_group: + pg_bundle_demand[tuple(sorted(pg_filtered_bundle.items()))] += count + + demand_lines = [] + for bundle, count in bundle_demand.items(): + line = f" {dict(bundle)}: {count}+ pending tasks/actors" + if bundle in pg_bundle_demand: + line += f" ({pg_bundle_demand[bundle]}+ using placement groups)" + demand_lines.append(line) + return demand_lines + + +def get_constraint_report(request_demand: List[DictCount]): + """Returns a formatted string describing the resource constraints from request_resources(). + + Args: + request_demand: List of tuples containing resource bundle dictionaries and counts + from request_resources() calls. + + Returns: + String containing the formatted constraints report, either listing each constraint + and count or indicating no constraints exist. + + Example: + >>> request_demand = [ + ... ({"CPU": 4}, 2), + ... ({"GPU": 1}, 1) + ... ] + >>> get_constraint_report(request_demand) + " {'CPU': 4}: 2 from request_resources()\\n {'GPU': 1}: 1 from request_resources()" + """ + constraint_lines = [] + for bundle, count in request_demand: + line = f" {bundle}: {count} from request_resources()" + constraint_lines.append(line) + if len(constraint_lines) > 0: + constraints_report = "\n".join(constraint_lines) + else: + constraints_report = " (no request_resources() constraints)" + return constraints_report + + +def get_demand_report(lm_summary: LoadMetricsSummary): + demand_lines = [] + if lm_summary.resource_demand: + demand_lines.extend(format_resource_demand_summary(lm_summary.resource_demand)) + for entry in lm_summary.pg_demand: + pg, count = entry + pg_str = format_pg(pg) + line = f" {pg_str}: {count}+ pending placement groups" + demand_lines.append(line) + if len(demand_lines) > 0: + demand_report = "\n".join(demand_lines) + else: + demand_report = " (no resource demands)" + return demand_report + + +def get_per_node_breakdown_as_dict( + lm_summary: LoadMetricsSummary, +) -> dict: + per_node_breakdown = {} + + for node_id, usage in lm_summary.usage_by_node.items(): + usage_string = "" + for line in parse_usage(usage, verbose=True): + usage_string += f"{line}\n" + per_node_breakdown[node_id] = usage_string.strip() + + return per_node_breakdown + + +def get_per_node_breakdown( + lm_summary: LoadMetricsSummary, + node_type_mapping: Optional[Dict[str, float]], + node_activities: Optional[Dict[str, List[str]]], + verbose: bool, +) -> str: + sio = StringIO() + + if node_type_mapping is None: + node_type_mapping = {} + + print(file=sio) + for node_id, usage in lm_summary.usage_by_node.items(): + print(file=sio) # Print a newline. + node_string = f"Node: {node_id}" + if node_id in node_type_mapping: + node_type = node_type_mapping[node_id] + node_string += f" ({node_type})" + print(node_string, file=sio) + if ( + lm_summary.idle_time_map + and node_id in lm_summary.idle_time_map + and lm_summary.idle_time_map[node_id] > 0 + ): + print(f" Idle: {lm_summary.idle_time_map[node_id]} ms", file=sio) + + print(" Usage:", file=sio) + for line in parse_usage(usage, verbose): + print(f" {line}", file=sio) + # Don't print anything if not provided. + if not node_activities: + continue + print(" Activity:", file=sio) + if node_id not in node_activities: + print(" (no activity)", file=sio) + else: + # Note: We have node IP here. + _, reasons = node_activities[node_id] + for reason in reasons: + print(f" {reason}", file=sio) + + return sio.getvalue() + + +def format_info_string( + lm_summary, + autoscaler_summary, + time=None, + gcs_request_time: Optional[float] = None, + non_terminated_nodes_time: Optional[float] = None, + autoscaler_update_time: Optional[float] = None, + verbose: bool = False, +): + if time is None: + time = datetime.now() + header = "=" * 8 + f" Autoscaler status: {time} " + "=" * 8 + separator = "-" * len(header) + if verbose: + header += "\n" + if gcs_request_time: + header += f"GCS request time: {gcs_request_time:3f}s\n" + if non_terminated_nodes_time: + header += ( + "Node Provider non_terminated_nodes time: " + f"{non_terminated_nodes_time:3f}s\n" + ) + if autoscaler_update_time: + header += "Autoscaler iteration time: " f"{autoscaler_update_time:3f}s\n" + + available_node_report_lines = [] + if not autoscaler_summary.active_nodes: + available_node_report = " (no active nodes)" + else: + for node_type, count in autoscaler_summary.active_nodes.items(): + line = f" {count} {node_type}" + available_node_report_lines.append(line) + available_node_report = "\n".join(available_node_report_lines) + + if not autoscaler_summary.idle_nodes: + idle_node_report = " (no idle nodes)" + else: + idle_node_report_lines = [] + for node_type, count in autoscaler_summary.idle_nodes.items(): + line = f" {count} {node_type}" + idle_node_report_lines.append(line) + idle_node_report = "\n".join(idle_node_report_lines) + + pending_lines = [] + for node_type, count in autoscaler_summary.pending_launches.items(): + line = f" {node_type}, {count} launching" + pending_lines.append(line) + for ip, node_type, status in autoscaler_summary.pending_nodes: + line = f" {ip}: {node_type}, {status.lower()}" + pending_lines.append(line) + if pending_lines: + pending_report = "\n".join(pending_lines) + else: + pending_report = " (no pending nodes)" + + failure_lines = [] + for ip, node_type in autoscaler_summary.failed_nodes: + line = f" {node_type}: NodeTerminated (ip: {ip})" + failure_lines.append(line) + if autoscaler_summary.node_availability_summary: + records = sorted( + autoscaler_summary.node_availability_summary.node_availabilities.values(), + key=lambda record: record.last_checked_timestamp, + ) + for record in records: + if record.is_available: + continue + assert record.unavailable_node_information is not None + node_type = record.node_type + category = record.unavailable_node_information.category + description = record.unavailable_node_information.description + attempted_time = datetime.fromtimestamp(record.last_checked_timestamp) + formatted_time = ( + # This `:02d` funny business is python syntax for printing a 2 + # digit number with a leading zero as padding if needed. + f"{attempted_time.hour:02d}:" + f"{attempted_time.minute:02d}:" + f"{attempted_time.second:02d}" + ) + line = f" {node_type}: {category} (latest_attempt: {formatted_time})" + if verbose: + line += f" - {description}" + failure_lines.append(line) + + failure_lines = failure_lines[: -constants.AUTOSCALER_MAX_FAILURES_DISPLAYED : -1] + failure_report = "Recent failures:\n" + if failure_lines: + failure_report += "\n".join(failure_lines) + else: + failure_report += " (no failures)" + + usage_report = get_usage_report(lm_summary, verbose) + constraints_report = get_constraint_report(lm_summary.request_demand) + demand_report = get_demand_report(lm_summary) + formatted_output = f"""{header} +Node status +{separator} +Active: +{available_node_report}""" + + if not autoscaler_summary.legacy: + formatted_output += f""" +Idle: +{idle_node_report}""" + + formatted_output += f""" +Pending: +{pending_report} +{failure_report} + +Resources +{separator} +Total Usage: +{usage_report} +Total Constraints: +{constraints_report} +Total Demands: +{demand_report}""" + + if verbose: + if lm_summary.usage_by_node: + formatted_output += get_per_node_breakdown( + lm_summary, + autoscaler_summary.node_type_mapping, + autoscaler_summary.node_activities, + verbose, + ) + else: + formatted_output += "\n" + + return formatted_output.strip() + + +def format_readonly_node_type(node_id: str): + """The anonymous node type for readonly node provider nodes.""" + return "node_{}".format(node_id) + + +def format_no_node_type_string(node_type: dict): + placement_group_resource_usage = {} + regular_resource_usage = collections.defaultdict(float) + for resource, total in node_type.items(): + (pg_resource_name, pg_name, is_countable) = parse_placement_group_resource_str( + resource + ) + if pg_name: + if not is_countable: + continue + if pg_resource_name not in placement_group_resource_usage: + placement_group_resource_usage[pg_resource_name] = 0 + placement_group_resource_usage[pg_resource_name] += total + else: + regular_resource_usage[resource] += total + + output_lines = [""] + for resource, total in regular_resource_usage.items(): + output_line = f"{resource}: {total}" + if resource in placement_group_resource_usage: + pg_resource = placement_group_resource_usage[resource] + output_line += f" ({pg_resource} reserved in placement groups)" + output_lines.append(output_line) + + return "\n ".join(output_lines) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..743cdc0c1ef8c1b8c2a1f7beeed22c4246cd0b73 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/cluster_operator_client.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/cluster_operator_client.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..27a6771902b54298872aa9ca566654d2f04c56ab Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/cluster_operator_client.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/config.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..04a0a7f0d33baa67b9583291c2d19965ab3a9295 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/config.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de640036992582cd87b659d1660a13256803b162 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/cluster_operator_client.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/cluster_operator_client.py new file mode 100644 index 0000000000000000000000000000000000000000..3f75f57819f28f9ba3a62750c424c907e91c62a6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/cluster_operator_client.py @@ -0,0 +1,685 @@ +import base64 +import ipaddress +import logging +import os +import random +import string +from enum import Enum +from threading import RLock +from typing import Any, Dict, Optional, Tuple + +from kubernetes import client, config + +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + NODE_KIND_WORKER, + STATUS_SETTING_UP, + STATUS_UNINITIALIZED, + STATUS_UP_TO_DATE, + TAG_RAY_CLUSTER_NAME, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, + TAG_RAY_USER_NODE_TYPE, +) + +# Design: + +# Each modification the autoscaler wants to make is posted to the API server's desired +# state (e.g. if the autoscaler wants to scale up, it adds VM name to the desired +# worker list it wants to scale, if it wants to scale down it removes the name from +# the list). + +# VMRay CRD +VMRAY_CRD_VER = os.getenv("VMRAY_CRD_VER", "v1alpha1") +VMRAY_GROUP = "vmray.broadcom.com" +VMRAYCLUSTER_PLURAL = "vmrayclusters" + +# VirtualMachineService CRD +VMSERVICE_CRD_VER = os.getenv("VMSERVICE_CRD_VER", "v1alpha2") +VMSERVICE_GROUP = "vmoperator.vmware.com" +VMSERVICE_PLURAL = "virtualmachineservices" + +SERVICE_ACCOUNT_TOKEN = os.getenv("SVC_ACCOUNT_TOKEN", None) + +logger = logging.getLogger(__name__) +cur_path = os.path.dirname(__file__) + + +class VMNodeStatus(Enum): + INITIALIZED = "initialized" + RUNNING = "running" + FAIL = "failure" + + +class KubernetesHttpApiClient(object): + def __init__(self, ca_cert: str, api_server: str): + token = SERVICE_ACCOUNT_TOKEN + # If SERVICE_ACCOUNT_TOKEN not present, use local + # ~/.kube/config file. Active context will be used. + # This is usefull when Ray CLI are used and local autoscaler needs + # communicate with the k8s API server + # If the token is present then use that for communication. + if not token: + self.client = client.ApiClient(config.load_kube_config()) + else: + configuration = client.Configuration() + configuration.api_key["authorization"] = token + configuration.api_key_prefix["authorization"] = "Bearer" + configuration.host = f"https://{api_server}" + if ca_cert: + configuration.ssl_ca_cert = ca_cert + else: + configuration.verify_ssl = False + self.client = client.ApiClient(configuration) + + # Use customObjectsApi to access custom resources + self.custom_object_api = client.CustomObjectsApi(self.client) + + +class ClusterOperatorClient(KubernetesHttpApiClient): + def __init__( + self, + cluster_name: str, + provider_config: Dict[str, Any], + cluster_config: Dict[str, Any], + ): + self.cluster_name = cluster_name + self.vmraycluster_nounce = None + self.max_worker_nodes = None + + self.vsphere_config = provider_config["vsphere_config"] + + self.namespace = self.vsphere_config["namespace"] + self.k8s_api_client = KubernetesHttpApiClient( + self.vsphere_config.get("ca_cert"), + self.vsphere_config.get("api_server"), + ) + self.lock = RLock() + + if cluster_config: + self.max_worker_nodes = cluster_config["max_workers"] + self.head_setup_commands = cluster_config["head_setup_commands"] + self.available_node_types = cluster_config["available_node_types"] + self.head_node_type = cluster_config["head_node_type"] + + # docker configurations. + self.provider_auth = cluster_config["auth"] + self.docker = cluster_config["docker"] + + # create docker login info secret, if it exists. + docker_auth_secret_name = self._create_docker_auth_secrets() + if docker_auth_secret_name: + self.docker_config = { + "auth_secret_name": docker_auth_secret_name, + } + else: + self.docker_config = None + else: + self._set_max_worker_nodes() + self._create_tls_secrets() + + def _create_docker_auth_secrets(self): + docker_auth_secret_name = self.cluster_name + "-docker-auth" + docker_auth = self.vsphere_config.get("docker_auth", {}) + username = docker_auth.get("username", None) + password = docker_auth.get("password", None) + kp = {} + if username and password: + kp["username"] = username + kp["password"] = password + registry = docker_auth.get("registry", None) + if registry: + kp["registry"] = registry + self._create_secret(self.namespace, docker_auth_secret_name, kp) + return docker_auth_secret_name + return None + + def _create_tls_secrets(self): + # If token is passed that means its instance of autoscaler + # running inside the head node, so validate if tls server cert + # and key are available then create a secret with their + # value. + tls_enabled = os.environ.get("RAY_USE_TLS", None) == "1" + if not SERVICE_ACCOUNT_TOKEN or not tls_enabled: + return + + tls_cert = None + tls_key = None + + cert_path = os.environ.get("RAY_TLS_SERVER_CERT", None) + key_path = os.environ.get("RAY_TLS_SERVER_KEY", None) + if cert_path: + with open(cert_path) as f: + tls_cert = f.read() + if key_path: + with open(key_path) as f: + tls_key = f.read() + + if tls_cert and tls_key: + kp = {"tls.crt": tls_cert, "tls.key": tls_key} + self._create_secret(self.namespace, self.cluster_name + "-tls", kp) + + def list_vms(self, tag_filters: Dict[str, str]) -> Tuple[list, dict]: + """Queries K8s for VMs in the RayCluster and filter them as per + tags provided in the tag_filters. + """ + logger.info(f"Getting nodes using tags \n{tag_filters}") + tag_cache = {} + + filters = tag_filters.copy() + # Use Ray cluster name to get resources + if TAG_RAY_CLUSTER_NAME not in tag_filters: + filters[TAG_RAY_CLUSTER_NAME] = self.cluster_name + nodes = [] + vmray_cluster_response = self._get_cluster_response() + if not vmray_cluster_response: + return nodes, tag_cache + + vmray_cluster_status = vmray_cluster_response.get("status", {}) + if not vmray_cluster_status: + return nodes, tag_cache + + vmray_cluster_spec = vmray_cluster_response.get("spec", {}) + + # Check for a head node + if NODE_KIND_HEAD in tag_filters.values() or not tag_filters: + head_node_status = vmray_cluster_status.get("head_node_status", {}) + # head node found + if head_node_status: + node_id = self._get_head_name() + nodes.append(node_id) + + # Setting head node status + status = head_node_status.get("vm_status", None) + head_nt = vmray_cluster_spec["head_node"]["node_type"] + tag_cache[node_id] = self._set_tags( + node_id, NODE_KIND_HEAD, head_nt, status, filters + ) + # Check current worker nodes + if NODE_KIND_WORKER in tag_filters.values() or not tag_filters: + current_workers = vmray_cluster_status.get("current_workers", {}) + desired_workers = vmray_cluster_spec.get("autoscaler_desired_workers", {}) + + # worker nodes found + for worker in current_workers.keys(): + nodes.append(worker) + # setting worker node status + status = current_workers[worker].get("vm_status", None) + node_type = desired_workers.get(worker, "") + + tag_cache[worker] = self._set_tags( + worker, NODE_KIND_WORKER, node_type, status, filters + ) + + # List VMs from the desired workers' list + for worker in desired_workers.keys(): + if worker in current_workers.keys(): + continue + nodes.append(worker) + node_type = desired_workers.get(worker, "") + tag_cache[worker] = self._set_tags( + worker, NODE_KIND_WORKER, node_type, STATUS_SETTING_UP, filters + ) + + logger.info( + f"Non terminated nodes {nodes}, Tags for these are: {tag_cache}" + ) + return nodes, tag_cache + + def is_vm_power_on(self, node_id: str) -> bool: + """Check current vm list. If its state is Running then return + true else false.""" + node = self._get_node(node_id) + if node: + return node.get("vm_status", None) == VMNodeStatus.RUNNING.value + logger.info(f"VM {node_id} not found") + return False + + def is_vm_creating(self, node_id: str) -> bool: + """Check current vm list. If its state is INITIALIZED then return + true else false.""" + node = self._get_node(node_id) + if node: + return node.get("vm_status", None) == VMNodeStatus.INITIALIZED.value + logger.info(f"VM {node_id} is not yet initialized") + return False + + def set_node_tags(self, tags: Dict[str, str]) -> None: + """ + Not required + """ + pass + + def get_vm_external_ip(self, node_id: str) -> Optional[str]: + """Check current worker list and get the external ip.""" + node = {} + # For a Ray head node, return external IP of the VMService + # Ray head node is not accessible directly. + if node_id == self._get_head_name(): + ingress = self._get_vm_service_ingress() + for item in ingress: + if "ip" in item.keys(): + node = item + break + else: + worker_node = self._get_node(node_id) + if ( + worker_node + and worker_node.get("vm_status", None) == VMNodeStatus.RUNNING.value + ): + node = worker_node + ip = node.get("ip", None) + # Validate returned IP + if ip and _is_ipv4(ip): + return ip + logger.info( + f"External IPv4 address: {ip} of VM: {node_id}" + f"is either invalid or not available" + ) + return None + + def delete_node(self, node_id: str) -> None: + """Remove name of the vm from the desired worker list and patch + the VmRayCluster CR""" + with self.lock: + vmray_cluster_response = self._get_cluster_response() + vmray_cluster_spec = vmray_cluster_response.get("spec", {}) + + # Get desired workers + desired_workers = vmray_cluster_spec.get("autoscaler_desired_workers", {}) + logger.info(f"Current desired workers: {desired_workers}") + + # remove the node from the desired workers list + if node_id in desired_workers: + + # By default it follow patch application of `merge-patch+json` + # so we need to remove the node ids by making them null. + # refs: + # 1. https://kubernetes.io/docs/tasks/manage-kubernetes-objects/ + # update-api-object-kubectl-patch/#use-a-json-merge-patch-to-update-a-deployment + # 2. https://github.com/kubernetes-client/python/blob/master/kubernetes/ + # client/api/custom_objects_api.py#L3106 + payload = {"spec": {"autoscaler_desired_workers": {node_id: None}}} + + logger.info(f"Deleting VM {node_id} | payload: {payload}") + self.k8s_api_client.custom_object_api.patch_namespaced_custom_object( + VMRAY_GROUP, + VMRAY_CRD_VER, + self.namespace, + VMRAYCLUSTER_PLURAL, + self.cluster_name, + payload, + async_req=False, + ) + elif node_id == self._get_head_name(): + # Handle case to delete a head node + # Delete VMRayCluster which will delete head node + # as well as associated secrets and other resources. + self.k8s_api_client.custom_object_api.delete_namespaced_custom_object( + VMRAY_GROUP, + VMRAY_CRD_VER, + self.namespace, + VMRAYCLUSTER_PLURAL, + self.cluster_name, + ) + + def create_nodes( + self, + tags: Dict[str, str], + to_be_launched_node_count: int, + node_config: Dict[str, Any], + ) -> Optional[Dict[str, Any]]: + """Ask cluster operator to create worker VMs""" + logger.info( + f"Creating {to_be_launched_node_count} nodes with tags: {tags}" + f"and with config: {node_config}" + ) + created_nodes_dict = {} + with self.lock: + if to_be_launched_node_count > 0: + new_desired_workers = {} + + new_vm_names = {} + for _ in range(to_be_launched_node_count): + name = self._create_node_name(tags[TAG_RAY_NODE_NAME]) + new_vm_names[name] = tags[TAG_RAY_USER_NODE_TYPE] + + # Create a head node + # Autoscaler sends a tag + # head_node_tags[TAG_RAY_NODE_NAME] = "ray-{}-head".format( + # config["cluster_name"]) + if "head" in tags[TAG_RAY_NODE_NAME]: + # head node will be created as a part of VMRayCluster CR + self._create_ssh_secret() + self._create_vmraycluster() + else: + # Once VMRayCluster CR is created, update it to create worker + # nodes. + vmray_cluster_response = self._get_cluster_response() + vmray_cluster_spec = vmray_cluster_response.get("spec", {}) + + # get desired workers + desired_workers = vmray_cluster_spec.get( + "autoscaler_desired_workers", {} + ) + + # If workers are present in both the list then it shows stable + # state for the cluster. + # Append new VM names with existing one + if desired_workers: + new_desired_workers.update(desired_workers) + + new_desired_workers.update(new_vm_names) + logger.info(f"New desired state will be {new_desired_workers}") + if len(new_desired_workers) > self.max_worker_nodes: + logger.warning( + "Autoscaler attempted to create more than max_workers VMs." + ) + return created_nodes_dict + + payload = { + "spec": {"autoscaler_desired_workers": new_desired_workers} + } + + custom_api = self.k8s_api_client.custom_object_api + custom_api.patch_namespaced_custom_object( + VMRAY_GROUP, + VMRAY_CRD_VER, + self.namespace, + VMRAYCLUSTER_PLURAL, + self.cluster_name, + payload, + async_req=False, + ) + for vm in new_vm_names: + created_nodes_dict[vm] = vm + return created_nodes_dict + + def _get_cluster_response(self): + response = {} + try: + response = ( + self.k8s_api_client.custom_object_api.get_namespaced_custom_object( + VMRAY_GROUP, + VMRAY_CRD_VER, + self.namespace, + VMRAYCLUSTER_PLURAL, + self.cluster_name, + ) + ) + return response + except client.exceptions.ApiException as e: + # If HTTP 404 received means the cluster is not yet created. + logger.warning( + f"Exception while getting {self.cluster_name}. Exception: {str(e)}" + ) + if e.status == 404: + logger.warning(f"{self.cluster_name} not available. Creating new one.") + return response + + def _get_node(self, node_id: str) -> Any: + vmray_cluster_response = self._get_cluster_response() + vmray_cluster_status = vmray_cluster_response.get("status", {}) + if not vmray_cluster_status: + return {} + head_node_status = vmray_cluster_status.get("head_node_status", {}) + current_workers = vmray_cluster_status.get("current_workers", {}) + # head node is found + if head_node_status and node_id == self._get_head_name(): + return head_node_status + # worker nodes found + for worker in current_workers.keys(): + if worker == node_id: + return current_workers.get(worker) + # If worker not found in the current worker then it might be getting created + # and not yet ready. So check if it is in the desired workers list. + vmray_cluster_spec = vmray_cluster_response.get("spec", {}) + desired_workers = vmray_cluster_spec.get("autoscaler_desired_workers", {}) + for worker in desired_workers.keys(): + if worker == node_id: + # set vm_status as VM in the desired workers' list will not + # have vm_status field. + node = {"vm_status": VMNodeStatus.INITIALIZED.value} + return node + logger.info(f"VM {node_id} not found") + return {} + + def safe_to_scale(self): + """ + It is safe to scale as long as total number of workers(desired + current) + do not exceeds cluster level max_workers. + This function should handle cases: + 1. If there are workers in the desired_workers list but not in the + current_workers list that means few workers are not yet up and running. + 2. If there are workers in the current_workers list but not in a + desired_workers list indicates workers are not yet deleted completely + and we should wait. + 3. If workers are present in both the list shows stable state for the cluster. + """ + vmray_cluster_response = self._get_cluster_response() + vmray_cluster_status = vmray_cluster_response.get("status", {}) + if not vmray_cluster_status: + return False + current_workers = vmray_cluster_status.get("current_workers", {}) + vmray_cluster_spec = vmray_cluster_response.get("spec", {}) + desired_workers = vmray_cluster_spec.get("autoscaler_desired_workers", {}) + logger.info( + f"Checking is it safe to scale:\n" + f"Current workers: {current_workers.keys()} \n" + f"Autoscaler desired workers: {desired_workers}" + ) + + # Do not scale until reaches desired state + if len(desired_workers) != len(current_workers): + return False + + # Wait until all nodes are in a Running state + for worker in current_workers.values(): + if worker.get("vm_status", None) != VMNodeStatus.RUNNING.value: + return False + + return True + + def _create_node_name(self, node_name_tag): + """Create name for a Ray node""" + # The nodes are named as follows: + # -h- for the head node + # -w-<> for the worker nodes + random_str = "".join( + random.choice(string.ascii_lowercase + string.digits) for _ in range(8) + ) + if "head" in node_name_tag: + self.vmraycluster_nounce = random_str + return f"{self.cluster_name}-h-" + self.vmraycluster_nounce + return f"{self.cluster_name}-w-" + random_str + + def _get_head_name(self): + if not self.vmraycluster_nounce: + vmray_cluster_response = self._get_cluster_response() + self.vmraycluster_nounce = vmray_cluster_response["metadata"]["labels"][ + "vmray.kubernetes.io/head-nounce" + ] + return f"{self.cluster_name}-h-" + self.vmraycluster_nounce + + def _create_vmraycluster(self): + + # Define vmraycluster config structure. + ray_cluster_config = {} + ray_cluster_config["apiVersion"] = VMRAY_GROUP + "/" + VMRAY_CRD_VER + ray_cluster_config["kind"] = "VMRayCluster" + ray_cluster_config["metadata"] = {} + ray_cluster_config["spec"] = {} + + # Start reading values from local bootstrap config. + ray_cluster_config["metadata"]["name"] = self.cluster_name + ray_cluster_config["metadata"]["labels"] = { + "vmray.kubernetes.io/head-nounce": self.vmraycluster_nounce, + "vmray.io/created-by": "ray-cli", + } + ray_cluster_config["metadata"]["namespace"] = self.namespace + + ray_cluster_config["spec"]["api_server"] = {} + ray_cluster_config["spec"]["api_server"]["location"] = self.vsphere_config.get( + "api_server" + ) + ray_cluster_config["spec"]["ray_docker_image"] = self.docker["image"] + + # Set head node specific config. + ray_cluster_config["spec"]["head_node"] = {} + ray_cluster_config["spec"]["head_node"][ + "head_setup_commands" + ] = self.head_setup_commands + ray_cluster_config["spec"]["head_node"][ + "port" + ] = 6379 # using default GCS port for now. + + ray_cluster_config["spec"]["head_node"]["node_type"] = self.head_node_type + + # Set common node config & available node types. + ray_cluster_config["spec"]["common_node_config"] = {} + ray_cluster_config["spec"]["common_node_config"][ + "vm_image" + ] = self.vsphere_config.get("vm_image") + ray_cluster_config["spec"]["common_node_config"][ + "storage_class" + ] = self.vsphere_config.get("storage_class") + ray_cluster_config["spec"]["common_node_config"][ + "vm_password_salt_hash" + ] = self.vsphere_config.get("vm_password_salt_hash", "") + ray_cluster_config["spec"]["common_node_config"][ + "max_workers" + ] = self.max_worker_nodes + available_node_types = {} + for node_type, node_config in self.available_node_types.items(): + available_node_types[node_type] = {} + available_node_types[node_type]["vm_class"] = node_config[ + "node_config" + ].get("vm_class", None) + available_node_types[node_type]["resources"] = node_config.get( + "resources", {} + ) + available_node_types[node_type]["min_workers"] = node_config.get( + "min_workers", 0 + ) + available_node_types[node_type]["max_workers"] = node_config.get( + "max_workers", 2 + ) + + ray_cluster_config["spec"]["common_node_config"][ + "available_node_types" + ] = available_node_types + ray_cluster_config["spec"]["common_node_config"][ + "vm_user" + ] = self.provider_auth["ssh_user"] + if self.docker_config is not None: + ray_cluster_config["spec"]["docker_config"] = self.docker_config + + logger.info(f"Creating VmRayCluster \n{ray_cluster_config}") + self.k8s_api_client.custom_object_api.create_namespaced_custom_object( + VMRAY_GROUP, + VMRAY_CRD_VER, + self.namespace, + VMRAYCLUSTER_PLURAL, + ray_cluster_config, + ) + + def _set_tags(self, node_id, node_kind, node_user_type, node_status, tags): + new_tags = tags.copy() + if node_status == VMNodeStatus.RUNNING.value: + new_tags[TAG_RAY_NODE_STATUS] = STATUS_UP_TO_DATE + elif node_status == VMNodeStatus.INITIALIZED.value: + new_tags[TAG_RAY_NODE_STATUS] = STATUS_SETTING_UP + else: + new_tags[TAG_RAY_NODE_STATUS] = STATUS_UNINITIALIZED + + new_tags[TAG_RAY_NODE_NAME] = node_id + new_tags[TAG_RAY_NODE_KIND] = node_kind + new_tags[TAG_RAY_USER_NODE_TYPE] = node_user_type + return new_tags + + def _set_max_worker_nodes(self): + vmray_cluster_response = self._get_cluster_response() + if not self.max_worker_nodes: + vmray_cluster_spec = vmray_cluster_response.get("spec", {}) + common_node_config = vmray_cluster_spec.get("common_node_config", {}) + # If max_workers is not provided then default to 2 + # ref: https://docs.ray.io/en/latest/cluster/vms/references/ + # ray-cluster-configuration.html#max-workers + self.max_worker_nodes = common_node_config.get("max_workers", 2) + logger.info(f"Max worker is set to {self.max_worker_nodes}") + + def _get_vm_service_ingress(self): + response = self._get_vm_service() + status = response.get("status", {}) + if not status: + return [] + ingress = status["loadBalancer"].get("ingress", []) + logger.info(f"VM service ingress is {ingress}") + return ingress + + def _get_vm_service(self): + try: + return self.k8s_api_client.custom_object_api.get_namespaced_custom_object( + VMSERVICE_GROUP, + VMSERVICE_CRD_VER, + self.namespace, + VMSERVICE_PLURAL, + self._get_head_name(), + ) + except client.exceptions.ApiException as e: + logger.warning( + f"Exception while getting vm service in namespace {self.namespace}." + f"Exception: {str(e)}" + ) + return {} + + def _create_secret(self, namespace, name, kp): + data = {} + for k, v in kp.items(): + # Base64 encode the SSH key + val = v + if type(v) is str: + val = v.encode("utf-8") + data[k] = base64.b64encode(val).decode("utf-8") + + # Create metadata + metadata = client.V1ObjectMeta(name=name) + + # Secret object + secret = client.V1Secret( + api_version="v1", kind="Secret", metadata=metadata, data=data, type="Opaque" + ) + instance = client.CoreV1Api(self.k8s_api_client.client) + + # Create the secret in the specified namespace. + try: + instance.create_namespaced_secret(namespace=namespace, body=secret) + logger.info(f"Secret {name} created in namespace {namespace}") + except client.exceptions.ApiException as e: + print("Failure while creating Secret [`%s`] : %s\n" % (name, e)) + + def _create_ssh_secret(self): + """Create a K8s SSH secret using a local private SSH key + specified in the config.""" + + # Define secret name + secret_name = f"{self.cluster_name}-ssh-key" + + pvt_key = self.provider_auth.get("ssh_private_key") + private_key_path = os.path.expanduser(pvt_key) + + # Read the SSH private key + with open(private_key_path, "rb") as ssh_key: + ssh_key_data = ssh_key.read() + + kp = {"ssh-pvt-key": ssh_key_data} + self._create_secret(self.namespace, secret_name, kp) + + +def _is_ipv4(ip): + try: + ipaddress.IPv4Address(ip) + return True + except ipaddress.AddressValueError: + return False diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/config.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/config.py new file mode 100644 index 0000000000000000000000000000000000000000..df9c96653016c926d3c7fa5bc28f00ff0e4810a6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/config.py @@ -0,0 +1,148 @@ +import copy +import logging +import os + +from cryptography.hazmat.primitives import serialization as crypto_serialization +from cryptography.hazmat.primitives.asymmetric import rsa + +from ray.autoscaler._private.constants import DISABLE_NODE_UPDATERS_KEY +from ray.autoscaler._private.event_system import CreateClusterEvent, global_event_system +from ray.autoscaler._private.util import check_legacy_fields + +PRIVATE_KEY_NAME = "ray-bootstrap-key.pem" +PUBLIC_KEY_NAME = "ray_bootstrap_public_key.key" + +PRIVATE_KEY_PATH = os.path.expanduser(f"~/{PRIVATE_KEY_NAME}") +PUBLIC_KEY_PATH = os.path.expanduser(f"~/{PUBLIC_KEY_NAME}") + +logger = logging.getLogger(__name__) + + +def bootstrap_vsphere(config): + + # create a copy of the input config to modify + config = copy.deepcopy(config) + + # Log warnings if user included deprecated `head_node` or `worker_nodes` + # fields. Raise error if no `available_node_types` + check_legacy_fields(config) + + # Configure SSH access, using an existing key pair if possible. + config = configure_key_pair(config) + # Configure docker run command to be executed on head and wroker nodes + config = configure_run_options(config) + + global_event_system.execute_callback( + CreateClusterEvent.ssh_keypair_downloaded, + {"ssh_key_path": config["auth"]["ssh_private_key"]}, + ) + logger.info(f"{config}") + return config + + +def configure_key_pair(config): + logger.info("Configuring keys for Ray Cluster Launcher to ssh into the head node.") + + if not os.path.exists(PRIVATE_KEY_PATH): + logger.warning( + "Private key file at path {} was not found".format(PRIVATE_KEY_PATH) + ) + _create_ssh_keys() + logger.info( + f"New SSH key pair {PRIVATE_KEY_PATH} and {PUBLIC_KEY_PATH} created." + ) + + # updater.py file uses the following config to ssh onto the head node + # Also, copies the file onto the head node + config["auth"]["ssh_private_key"] = PRIVATE_KEY_PATH + # The path where the public key should be copied onto the remote host + public_key_remote_path = f"~/{PUBLIC_KEY_NAME}" + + # Copy the public key to the remote host + config["file_mounts"][public_key_remote_path] = PUBLIC_KEY_PATH + + return config + + +def configure_run_options(config): + ssh_user = config["auth"]["ssh_user"] + # By default enable TLS for Head-Worker grpc communication + tls_enable = ( + 1 if config["provider"]["vsphere_config"].get("tls_enable", True) else 0 + ) + # Configure common run options + if "run_options" not in config["docker"]: + config["docker"]["run_options"] = [] + config["docker"]["run_options"].append(f"--env RAY_USE_TLS={tls_enable}") + + # Configure head_run_options + if "head_run_options" not in config["docker"]: + config["docker"]["head_run_options"] = [] + config["docker"]["head_run_options"].append( + f"--env-file /home/{ssh_user}/svc-account-token.env" + ) + + # Configure worker_run_options + if "worker_run_options" not in config["docker"]: + config["docker"]["worker_run_options"] = [] + + if tls_enable == 1: + # Generate TLS cert and key for head and worker nodes. + # This needs to be done before ray start command + config["head_start_ray_commands"].insert(0, "sh /home/ray/gencert.sh") + config["worker_start_ray_commands"].insert(0, "sh /home/ray/gencert.sh") + + config["docker"]["run_options"].append( + f"-v /home/{ssh_user}/ca.crt:/home/ray/ca.crt" + ) + config["docker"]["run_options"].append( + f"-v /home/{ssh_user}/ca.key:/home/ray/ca.key" + ) + config["docker"]["run_options"].append( + f"-v /home/{ssh_user}/gencert.sh:/home/ray/gencert.sh" + ) + + config["docker"]["run_options"].append("--env RAY_TLS_CA_CERT=/home/ray/ca.crt") + config["docker"]["run_options"].append( + "--env RAY_TLS_SERVER_KEY=/home/ray/tls.key" + ) + config["docker"]["run_options"].append( + "--env RAY_TLS_SERVER_CERT=/home/ray/tls.crt" + ) + + return config + + +def disable_node_updater(config): + logger.info( + "Disabling NodeUpdater threads as Cluster Operator is " + + "responsible for Ray setup on nodes." + ) + config["provider"][DISABLE_NODE_UPDATERS_KEY] = True + return config + + +def _create_ssh_keys(): + """Create SSH keys as specified""" + # Create a private key + private_key = rsa.generate_private_key(public_exponent=65537, key_size=4096) + # Encode it in PEM format + unencrypted_private_key = private_key.private_bytes( + encoding=crypto_serialization.Encoding.PEM, + format=crypto_serialization.PrivateFormat.TraditionalOpenSSL, + encryption_algorithm=crypto_serialization.NoEncryption(), + ) + # Create a public key + public_key = private_key.public_key().public_bytes( + encoding=crypto_serialization.Encoding.PEM, + format=crypto_serialization.PublicFormat.SubjectPublicKeyInfo, + ) + # Write keys + with open(PRIVATE_KEY_PATH, "wb") as pvt_key: + # manage access mode for the pvt key + os.chmod(PRIVATE_KEY_PATH, 0o600) + pvt_key.write(unencrypted_private_key) + + with open(PUBLIC_KEY_PATH, "wb") as pub_key: + # manage access mode for the pvt key + pub_key.write(public_key) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..4aef398fc7c2b2147f791dc085a8a4bd395a3718 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/_private/vsphere/node_provider.py @@ -0,0 +1,125 @@ +import logging +import threading +from typing import Any, Dict + +from ray.autoscaler._private.vsphere.cluster_operator_client import ( + ClusterOperatorClient, +) +from ray.autoscaler._private.vsphere.config import bootstrap_vsphere +from ray.autoscaler.node_provider import NodeProvider +from ray.autoscaler.tags import ( + STATUS_SETTING_UP, + TAG_RAY_CLUSTER_NAME, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, +) + +logger = logging.getLogger(__name__) + + +class VsphereWcpNodeProvider(NodeProvider): + max_terminate_nodes = 1000 + cluster_config = None + + def __init__(self, provider_config, cluster_name): + NodeProvider.__init__(self, provider_config, cluster_name) + self.tag_cache = {} + self.tag_cache_lock = threading.Lock() + self.client = ClusterOperatorClient( + cluster_name, provider_config, VsphereWcpNodeProvider.cluster_config + ) + + @staticmethod + def bootstrap_config(cluster_config): + config = bootstrap_vsphere(cluster_config) + VsphereWcpNodeProvider.cluster_config = config + return config + + def non_terminated_nodes(self, tag_filters): + nodes, tag_cache = self.client.list_vms(tag_filters) + with self.tag_cache_lock: + for node_id in nodes: + for k, v in tag_cache[node_id].items(): + if node_id in self.tag_cache.keys(): + self.tag_cache[node_id][k] = v + else: + self.tag_cache[node_id] = {} + self.tag_cache[node_id][k] = v + logger.info(f"Non terminated nodes' tags are {self.tag_cache}") + return nodes + + def is_running(self, node_id): + return self.client.is_vm_power_on(node_id) + + def is_terminated(self, node_id): + if self.client.is_vm_power_on(node_id): + return False + else: + # If the node is not powered on but has the creating tag, then it could + # be under reconfiguration, such as plugging the GPU. In this case we + # should consider the node is not terminated, it will be turned on later + return not self.client.is_vm_creating(node_id) + + def node_tags(self, node_id): + with self.tag_cache_lock: + return self.tag_cache[node_id] + + def external_ip(self, node_id): + return self.client.get_vm_external_ip(node_id) + + def internal_ip(self, node_id): + # Currently vSphere VMs do not show an internal IP. So we just return the + # external IP + return self.client.get_vm_external_ip(node_id) + + def set_node_tags(self, node_id, tags): + # This method gets called from the Ray and it passes + # node_id. It updates old tags (if present) with new values. + with self.tag_cache_lock: + for k, v in tags.items(): + # update tags for node_id + self.tag_cache[node_id][k] = v + logger.info(f"Updated tags for {node_id} to: {self.tag_cache[node_id]}") + + def create_node(self, node_config, tags, count) -> Dict[str, Any]: + """Creates instances. + + Returns dict mapping instance id to VM object for the created + instances. + """ + to_be_launched_node_count = count + created_nodes_dict = {} + if to_be_launched_node_count > 0: + created_nodes_dict = self.client.create_nodes( + tags, to_be_launched_node_count, node_config + ) + # make sure to mark newly created nodes as ready + # so autoscaler shouldn't provision new ones + with self.tag_cache_lock: + for node_id in created_nodes_dict.keys(): + self.tag_cache[node_id] = tags.copy() + self.tag_cache[node_id][TAG_RAY_NODE_STATUS] = STATUS_SETTING_UP + self.tag_cache[node_id][TAG_RAY_NODE_NAME] = node_id + self.tag_cache[node_id][TAG_RAY_CLUSTER_NAME] = self.cluster_name + logger.info( + f"Node {node_id} created with tags: {self.tag_cache[node_id]}" + ) + return created_nodes_dict + + def terminate_node(self, node_id): + if not node_id or self.client.is_vm_creating(node_id): + return + # Delete node iff it is either in a running or a failure state + self.client.delete_node(node_id) + with self.tag_cache_lock: + if node_id in self.tag_cache: + self.tag_cache.pop(node_id) + + def terminate_nodes(self, node_ids): + if not node_ids: + return + for node_id in node_ids: + self.terminate_node(node_id) + + def safe_to_scale(self) -> bool: + return self.client.safe_to_scale() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aliyun/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aliyun/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aliyun/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aliyun/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3f50d7f2c2a40235ad15494bcdffa5d5bd61672c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aliyun/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..78dca8ec3e30eaa8700df5e143e329124b578b56 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/cloudwatch/prometheus.yml b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/cloudwatch/prometheus.yml new file mode 100644 index 0000000000000000000000000000000000000000..98a503a9fbf979c398f872f801726a31fa66774c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/cloudwatch/prometheus.yml @@ -0,0 +1,15 @@ +# Prometheus config file + +# my global config +global: + scrape_interval: 10s + evaluation_interval: 10s + scrape_timeout: 10s + +# use ray file-based service discovery file as scrape target. +scrape_configs: +- job_name: 'ray' + file_sd_configs: + - files: + - '/tmp/ray/prom_metrics_service_discovery.json' + refresh_interval: 1m diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/cloudwatch/ray_prometheus_waiter.sh b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/cloudwatch/ray_prometheus_waiter.sh new file mode 100644 index 0000000000000000000000000000000000000000..4494d5ece79081fc4b545b1ec4e9427703e96603 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/cloudwatch/ray_prometheus_waiter.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +MAX_ATTEMPTS=120 +DELAY_SECONDS=10 +RAY_PROM_METRICS_FILE_PATH="/tmp/ray/prom_metrics_service_discovery.json" +CLUSTER_NAME=$1 +while [ $MAX_ATTEMPTS -gt 0 ]; do + if [ -f $RAY_PROM_METRICS_FILE_PATH ]; then + echo "Ray Prometheus metrics service discovery file found at: $RAY_PROM_METRICS_FILE_PATH." + echo "Restarting cloudwatch agent.This may take a few minutes..." + sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a stop + echo "Cloudwatch agent stopped, starting cloudwatch agent..." + sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c "ssm:AmazonCloudWatch-ray_agent_config_$CLUSTER_NAME" + echo "Cloudwatch agent successfully restarted!" + exit 0 + else + echo "Ray Prometheus metrics service discovery file not found at: $RAY_PROM_METRICS_FILE_PATH. Will check again in $DELAY_SECONDS seconds..." + sleep $DELAY_SECONDS + MAX_ATTEMPTS=$((MAX_ATTEMPTS-1)) + fi +done +echo "Ray Prometheus metrics service discovery file not found at: $RAY_PROM_METRICS_FILE_PATH. Ray system metrics will not be available in CloudWatch." +exit 1 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/defaults.yaml b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..507a53f8cf99b3e1c6595afdc5685e8cd4901a17 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/aws/defaults.yaml @@ -0,0 +1,144 @@ +# An unique identifier for the head node and workers of this cluster. +cluster_name: default + +# The maximum number of workers nodes to launch in addition to the head +# node. +max_workers: 2 + +# The autoscaler will scale up the cluster faster with higher upscaling speed. +# E.g., if the task requires adding more nodes then autoscaler will gradually +# scale up the cluster in chunks of upscaling_speed*currently_running_nodes. +# This number should be > 0. +upscaling_speed: 1.0 + +# This executes all commands on all nodes in the docker container, +# and opens all the necessary ports to support the Ray cluster. +# Empty string means disabled. +docker: {} + +# If a node is idle for this many minutes, it will be removed. +idle_timeout_minutes: 5 + +# Cloud-provider specific configuration. +provider: + type: aws + region: us-west-2 + # Availability zone(s), comma-separated, that nodes may be launched in. + # Nodes will be launched in the first listed availability zone and will + # be tried in the subsequent availability zones if launching fails. + availability_zone: us-west-2a,us-west-2b + # Whether to allow node reuse. If set to False, nodes will be terminated + # instead of stopped. + cache_stopped_nodes: True # If not present, the default is True. + +# How Ray will authenticate with newly launched nodes. +auth: + ssh_user: ubuntu +# By default Ray creates a new private keypair, but you can also use your own. +# If you do so, make sure to also set "KeyName" in the head and worker node +# configurations below. +# ssh_private_key: /path/to/your/key.pem + +# Tell the autoscaler the allowed node types and the resources they provide. +# The key is the name of the node type, which is just for debugging purposes. +# The node config specifies the launch config and physical instance type. +available_node_types: + ray.head.default: + # The node type's CPU and GPU resources are auto-detected based on AWS instance type. + # If desired, you can override the autodetected CPU and GPU resources advertised to the autoscaler. + # You can also set custom resources. + # For example, to mark a node type as having 1 CPU, 1 GPU, and 5 units of a resource called "custom", set + # resources: {"CPU": 1, "GPU": 1, "custom": 5} + resources: {} + # Provider-specific config for this node type, e.g. instance type. By default + # Ray will auto-configure unspecified fields such as SubnetId and KeyName. + # For more documentation on available fields, see: + # http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances + node_config: + InstanceType: m5.large + # You can provision additional disk space with a conf as follows + BlockDeviceMappings: + - DeviceName: /dev/sda1 + Ebs: + VolumeSize: 256 + # Additional options in the boto docs. + ray.worker.default: + # The minimum number of nodes of this type to launch. + # This number should be >= 0. + min_workers: 0 + # The node type's CPU and GPU resources are auto-detected based on AWS instance type. + # If desired, you can override the autodetected CPU and GPU resources advertised to the autoscaler. + # You can also set custom resources. + # For example, to mark a node type as having 1 CPU, 1 GPU, and 5 units of a resource called "custom", set + # resources: {"CPU": 1, "GPU": 1, "custom": 5} + resources: {} + # Provider-specific config for this node type, e.g. instance type. By default + # Ray will auto-configure unspecified fields such as SubnetId and KeyName. + # For more documentation on available fields, see: + # http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances + node_config: + InstanceType: m5.large + # Run workers on spot by default. Comment this out to use on-demand. + InstanceMarketOptions: + MarketType: spot + # Additional options can be found in the boto docs, e.g. + # SpotOptions: + # MaxPrice: MAX_HOURLY_PRICE + # Additional options in the boto docs. + +# Specify the node type of the head node (as configured above). +head_node_type: ray.head.default + +# Files or directories to copy to the head and worker nodes. The format is a +# dictionary from REMOTE_PATH: LOCAL_PATH, e.g. +file_mounts: { +# "/path1/on/remote/machine": "/path1/on/local/machine", +# "/path2/on/remote/machine": "/path2/on/local/machine", +} + +# Files or directories to copy from the head node to the worker nodes. The format is a +# list of paths. The same path on the head node will be copied to the worker node. +# This behavior is a subset of the file_mounts behavior. In the vast majority of cases +# you should just use file_mounts. Only use this if you know what you're doing! +cluster_synced_files: [] + +# Whether changes to directories in file_mounts or cluster_synced_files in the head node +# should sync to the worker node continuously +file_mounts_sync_continuously: False + +# Patterns for files to exclude when running rsync up or rsync down +rsync_exclude: [] + +# Pattern files to use for filtering out files when running rsync up or rsync down. The file is searched for +# in the source directory and recursively through all subdirectories. For example, if .gitignore is provided +# as a value, the behavior will match git's behavior for finding and using .gitignore files. +rsync_filter: [] + +# List of commands that will be run before `setup_commands`. If docker is +# enabled, these commands will run outside the container and before docker +# is setup. +initialization_commands: [] + +# List of shell commands to run to set up nodes. +setup_commands: + - >- + (stat $HOME/anaconda3/envs/tensorflow2_p310/ &> /dev/null && + echo 'export PATH="$HOME/anaconda3/envs/tensorflow2_p310/bin:$PATH"' >> ~/.bashrc) || true + - which ray || pip install -U "ray[default] @ https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl" + +# Custom commands that will be run on the head node after common setup. +head_setup_commands: + - pip install 'boto3>=1.4.8' # 1.4.8 adds InstanceMarketOptions + +# Custom commands that will be run on worker nodes after common setup. +worker_setup_commands: [] + +# Command to start ray on the head node. You don't need to change this. +head_start_ray_commands: + - ray stop + - ulimit -n 65536; ray start --head --port=6379 --object-manager-port=8076 --autoscaling-config=~/ray_bootstrap_config.yaml --dashboard-host=0.0.0.0 + +# Command to start ray on worker nodes. You don't need to change this. +worker_start_ray_commands: + - ray stop + - ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/azure/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/azure/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/azure/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/azure/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b01d24f5919b53ff92904c38b447518b7834552d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/azure/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/azure/defaults.yaml b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/azure/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..592a0f02e68140c9a2e14c520f52c77ccf10e882 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/azure/defaults.yaml @@ -0,0 +1,152 @@ +# An unique identifier for the head node and workers of this cluster. +cluster_name: default + +# The maximum number of workers nodes to launch in addition to the head +# node. +max_workers: 2 + +# The autoscaler will scale up the cluster faster with higher upscaling speed. +# E.g., if the task requires adding more nodes then autoscaler will gradually +# scale up the cluster in chunks of upscaling_speed*currently_running_nodes. +# This number should be > 0. +upscaling_speed: 1.0 + +# This executes all commands on all nodes in the docker container, +# and opens all the necessary ports to support the Ray cluster. +# Empty object means disabled. +docker: {} + +# If a node is idle for this many minutes, it will be removed. +idle_timeout_minutes: 5 + +# Cloud-provider specific configuration. +provider: + type: azure + # https://azure.microsoft.com/en-us/global-infrastructure/locations + location: westus2 + resource_group: ray-cluster + # set subscription id otherwise the default from az cli will be used + # subscription_id: 00000000-0000-0000-0000-000000000000 + # set unique subnet mask or a random mask will be used + # subnet_mask: 10.0.0.0/16 + # set unique id for resources in this cluster + # if not set a default id will be generated based on the resource group and cluster name + # unique_id: RAY1 + +# How Ray will authenticate with newly launched nodes. +auth: + ssh_user: ubuntu + # you must specify paths to matching private and public key pair files + # use `ssh-keygen -t rsa -b 4096` to generate a new ssh key pair + ssh_private_key: ~/.ssh/id_rsa + # changes to this should match what is specified in file_mounts + ssh_public_key: ~/.ssh/id_rsa.pub + +# More specific customization to node configurations can be made using the ARM template azure-vm-template.json file +# See documentation here: https://docs.microsoft.com/en-us/azure/templates/microsoft.compute/2019-03-01/virtualmachines +# Changes to the local file will be used during deployment of the head node, however worker nodes deployment occurs +# on the head node, so changes to the template must be included in the wheel file used in setup_commands section below + +# Tell the autoscaler the allowed node types and the resources they provide. +# The key is the name of the node type, which is just for debugging purposes. +# The node config specifies the launch config and physical instance type. +available_node_types: + ray.head.default: + resources: {"CPU": 2} + # Provider-specific config, e.g. instance type. + node_config: + azure_arm_parameters: + vmSize: Standard_D2s_v3 + # List images https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage + imagePublisher: microsoft-dsvm + imageOffer: ubuntu-1804 + imageSku: 1804-gen2 + imageVersion: latest + + ray.worker.default: + # The minimum number of nodes of this type to launch. + # This number should be >= 0. + min_workers: 0 + # The resources provided by this node type. + resources: {"CPU": 2} + # Provider-specific config, e.g. instance type. + node_config: + azure_arm_parameters: + vmSize: Standard_D2s_v3 + # List images https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage + imagePublisher: microsoft-dsvm + imageOffer: ubuntu-1804 + imageSku: 1804-gen2 + imageVersion: latest + # comment lines below to not use Spot instances + priority: Spot + # set a maximum price for spot instances if desired + # billingProfile: + # maxPrice: -1 + +# Specify the node type of the head node (as configured above). +head_node_type: ray.head.default + +# Files or directories to copy to the head and worker nodes. The format is a +# dictionary from REMOTE_PATH: LOCAL_PATH, e.g. +file_mounts: { +# "/path1/on/remote/machine": "/path1/on/local/machine", +# "/path2/on/remote/machine": "/path2/on/local/machine", + "~/.ssh/id_rsa.pub": "~/.ssh/id_rsa.pub" +} + +# Files or directories to copy from the head node to the worker nodes. The format is a +# list of paths. The same path on the head node will be copied to the worker node. +# This behavior is a subset of the file_mounts behavior. In the vast majority of cases +# you should just use file_mounts. Only use this if you know what you're doing! +cluster_synced_files: [] + +# Whether changes to directories in file_mounts or cluster_synced_files in the head node +# should sync to the worker node continuously +file_mounts_sync_continuously: False + +# Patterns for files to exclude when running rsync up or rsync down +rsync_exclude: [] + +# Pattern files to use for filtering out files when running rsync up or rsync down. The file is searched for +# in the source directory and recursively through all subdirectories. For example, if .gitignore is provided +# as a value, the behavior will match git's behavior for finding and using .gitignore files. +rsync_filter: [] + +# List of commands that will be run before `setup_commands`. If docker is +# enabled, these commands will run outside the container and before docker +# is setup. +initialization_commands: + # get rid of annoying Ubuntu message + - touch ~/.sudo_as_admin_successful + +# List of shell commands to run to set up nodes. +setup_commands: + # Note: if you're developing Ray, you probably want to create an AMI that + # has your Ray repo pre-cloned. Then, you can replace the pip installs + # below with a git checkout (and possibly a recompile). + - (which conda && echo 'eval "$(conda shell.bash hook)"' >> ~/.bashrc) || true + # - (conda activate py38_pytorch &> /dev/null && echo 'conda activate py38_pytorch' >> ~/.bashrc) || true + - (conda activate py38_tensorflow &> /dev/null && echo 'conda activate py38_tensorflow' >> ~/.bashrc) || true + - which ray || pip install -U "ray[default] @ https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl" + # Consider uncommenting these if you also want to run apt-get commands during setup + # - sudo pkill -9 apt-get || true + # - sudo pkill -9 dpkg || true + # - sudo dpkg --configure -a + +# Custom commands that will be run on the head node after common setup. +head_setup_commands: + - pip install -U azure-cli-core==2.29.1 azure-identity==1.7.0 azure-mgmt-compute==23.1.0 azure-mgmt-network==19.0.0 azure-mgmt-resource==20.0.0 msrestazure==0.6.4 + +# Custom commands that will be run on worker nodes after common setup. +worker_setup_commands: [] + +# Command to start ray on the head node. You don't need to change this. +head_start_ray_commands: + - ray stop + - ulimit -n 65536; ray start --head --port=6379 --object-manager-port=8076 --autoscaling-config=~/ray_bootstrap_config.yaml --dashboard-host=0.0.0.0 + +# Command to start ray on worker nodes. You don't need to change this. +worker_start_ray_commands: + - ray stop + - ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/gcp/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/gcp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/gcp/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/gcp/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e287868d22abbc95dc92d7443c260ffa9a51bd0d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/gcp/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/gcp/defaults.yaml b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/gcp/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..79da71efe142dff528fd80f64bac2d80987ac57a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/gcp/defaults.yaml @@ -0,0 +1,171 @@ +# An unique identifier for the head node and workers of this cluster. +cluster_name: default + +# The maximum number of workers nodes to launch in addition to the head +# node. +max_workers: 2 + +# The autoscaler will scale up the cluster faster with higher upscaling speed. +# E.g., if the task requires adding more nodes then autoscaler will gradually +# scale up the cluster in chunks of upscaling_speed*currently_running_nodes. +# This number should be > 0. +upscaling_speed: 1.0 + +# This executes all commands on all nodes in the docker container, +# and opens all the necessary ports to support the Ray cluster. +# Empty string means disabled. +docker: {} + +# If a node is idle for this many minutes, it will be removed. +idle_timeout_minutes: 5 + +# Cloud-provider specific configuration. +provider: + type: gcp + region: us-west1 + availability_zone: us-west1-a + project_id: null # Globally unique project id + +# How Ray will authenticate with newly launched nodes. +auth: + ssh_user: ubuntu +# By default Ray creates a new private keypair, but you can also use your own. +# If you do so, make sure to also set "KeyName" in the head and worker node +# configurations below. This requires that you have added the key into the +# project wide meta-data. +# ssh_private_key: /path/to/your/key.pem + +# Tell the autoscaler the allowed node types and the resources they provide. +# The key is the name of the node type, which is just for debugging purposes. +# The node config specifies the launch config and physical instance type. +available_node_types: + ray_head_default: + # The resources provided by this node type. + resources: {"CPU": 2} + # Provider-specific config for this node type, e.g. instance type. By default + # Ray will auto-configure unspecified fields such as subnets and ssh-keys. + # For more documentation on available fields, see: + # https://cloud.google.com/compute/docs/reference/rest/v1/instances/insert + node_config: + machineType: n1-standard-2 + disks: + - boot: true + autoDelete: true + type: PERSISTENT + initializeParams: + diskSizeGb: 50 + # See https://cloud.google.com/compute/docs/images for more images + sourceImage: projects/deeplearning-platform-release/global/images/family/common-cpu + + # Additional options can be found in in the compute docs at + # https://cloud.google.com/compute/docs/reference/rest/v1/instances/insert + + # If the network interface is specified as below in both head and worker + # nodes, the manual network config is used. Otherwise an existing subnet is + # used. To use a shared subnet, ask the subnet owner to grant permission + # for 'compute.subnetworks.use' to the ray autoscaler account... + # networkInterfaces: + # - kind: compute#networkInterface + # subnetwork: path/to/subnet + # aliasIpRanges: [] + ray_worker_small: + # The minimum number of nodes of this type to launch. + # This number should be >= 0. + min_workers: 0 + # The resources provided by this node type. + resources: {"CPU": 2} + # Provider-specific config for this node type, e.g. instance type. By default + # Ray will auto-configure unspecified fields such as subnets and ssh-keys. + # For more documentation on available fields, see: + # https://cloud.google.com/compute/docs/reference/rest/v1/instances/insert + node_config: + machineType: n1-standard-2 + disks: + - boot: true + autoDelete: true + type: PERSISTENT + initializeParams: + diskSizeGb: 50 + # See https://cloud.google.com/compute/docs/images for more images + sourceImage: projects/deeplearning-platform-release/global/images/family/common-cpu + # Run workers on preemtible instance by default. + # Comment this out to use on-demand. + scheduling: + - preemptible: true + + # Additional options can be found in in the compute docs at + # https://cloud.google.com/compute/docs/reference/rest/v1/instances/insert + +# Specify the node type of the head node (as configured above). +head_node_type: ray_head_default + +# Files or directories to copy to the head and worker nodes. The format is a +# dictionary from REMOTE_PATH: LOCAL_PATH, e.g. +file_mounts: { +# "/path1/on/remote/machine": "/path1/on/local/machine", +# "/path2/on/remote/machine": "/path2/on/local/machine", +} + +# Files or directories to copy from the head node to the worker nodes. The format is a +# list of paths. The same path on the head node will be copied to the worker node. +# This behavior is a subset of the file_mounts behavior. In the vast majority of cases +# you should just use file_mounts. Only use this if you know what you're doing! +cluster_synced_files: [] + +# Whether changes to directories in file_mounts or cluster_synced_files in the head node +# should sync to the worker node continuously +file_mounts_sync_continuously: False + +# Patterns for files to exclude when running rsync up or rsync down +rsync_exclude: [] + +# Pattern files to use for filtering out files when running rsync up or rsync down. The file is searched for +# in the source directory and recursively through all subdirectories. For example, if .gitignore is provided +# as a value, the behavior will match git's behavior for finding and using .gitignore files. +rsync_filter: [] + +# List of commands that will be run before `setup_commands`. If docker is +# enabled, these commands will run outside the container and before docker +# is setup. +initialization_commands: [] + +# List of shell commands to run to set up nodes. +setup_commands: + # Note: if you're developing Ray, you probably want to create an AMI that + # has your Ray repo pre-cloned. Then, you can replace the pip installs + # below with a git checkout (and possibly a recompile). + # - echo 'export PATH="$HOME/anaconda3/envs/tensorflow_p36/bin:$PATH"' >> ~/.bashrc + # Install ray if not present + - >- + (stat /opt/conda/bin/ &> /dev/null && + echo 'export PATH="/opt/conda/bin:$PATH"' >> ~/.bashrc) || true + - which ray || pip install -U "ray[default] @ https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl" + + +# Custom commands that will be run on the head node after common setup. +head_setup_commands: + - pip install google-api-python-client==1.7.8 + +# Custom commands that will be run on worker nodes after common setup. +worker_setup_commands: [] + +# Command to start ray on the head node. You don't need to change this. +head_start_ray_commands: + - ray stop + - >- + ulimit -n 65536; + ray start + --head + --port=6379 + --object-manager-port=8076 + --autoscaling-config=~/ray_bootstrap_config.yaml + --dashboard-host=0.0.0.0 + +# Command to start ray on worker nodes. You don't need to change this. +worker_start_ray_commands: + - ray stop + - >- + ulimit -n 65536; + ray start + --address=$RAY_HEAD_IP:6379 + --object-manager-port=8076 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..37feedd73ffd5367575fb3248ec7a5024177c7c7 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/__pycache__/coordinator_server.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/__pycache__/coordinator_server.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1cf9b0be0252878e2f8d9dee0d4f1603befced8c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/__pycache__/coordinator_server.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/coordinator_server.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/coordinator_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6ea69d71857bb8c468d6e26f1192535efb71ddbe --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/coordinator_server.py @@ -0,0 +1,132 @@ +"""Web server that runs on local/private clusters to coordinate and manage +different clusters for multiple users. It receives node provider function calls +through HTTP requests from remote CoordinatorSenderNodeProvider and runs them +locally in LocalNodeProvider. To start the webserver the user runs: +`python coordinator_server.py --ips --host --port `.""" +import argparse +import json +import logging +import threading +import socket +from http.server import HTTPServer, SimpleHTTPRequestHandler + +from ray.autoscaler._private.local.node_provider import LocalNodeProvider +from ray._common.network_utils import build_address + +logger = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO) + + +def runner_handler(node_provider): + class Handler(SimpleHTTPRequestHandler): + """A custom handler for OnPremCoordinatorServer. + + Handles all requests and responses coming into and from the + remote CoordinatorSenderNodeProvider. + """ + + def _do_header(self, response_code=200, headers=None): + """Sends the header portion of the HTTP response. + + Args: + response_code: Standard HTTP response code + headers (list[tuples]): Standard HTTP response headers + """ + if headers is None: + headers = [("Content-type", "application/json")] + + self.send_response(response_code) + for key, value in headers: + self.send_header(key, value) + self.end_headers() + + def do_HEAD(self): + """HTTP HEAD handler method.""" + self._do_header() + + def do_GET(self): + """Processes requests from remote CoordinatorSenderNodeProvider.""" + if self.headers["content-length"]: + raw_data = ( + self.rfile.read(int(self.headers["content-length"])) + ).decode("utf-8") + logger.info( + "OnPremCoordinatorServer received request: " + str(raw_data) + ) + request = json.loads(raw_data) + response = getattr(node_provider, request["type"])(*request["args"]) + logger.info( + "OnPremCoordinatorServer response content: " + str(raw_data) + ) + response_code = 200 + message = json.dumps(response) + self._do_header(response_code=response_code) + self.wfile.write(message.encode()) + + return Handler + + +class OnPremCoordinatorServer(threading.Thread): + """Initializes HTTPServer and serves CoordinatorSenderNodeProvider forever. + + It handles requests from the remote CoordinatorSenderNodeProvider. The + requests are forwarded to LocalNodeProvider function calls. + """ + + def __init__(self, list_of_node_ips, host, port): + """Initialize HTTPServer and serve forever by invoking self.run().""" + + logger.info( + "Running on prem coordinator server on address " + build_address(host, port) + ) + threading.Thread.__init__(self) + self._port = port + self._list_of_node_ips = list_of_node_ips + address = (host, self._port) + config = {"list_of_node_ips": list_of_node_ips} + self._server = HTTPServer( + address, + runner_handler(LocalNodeProvider(config, cluster_name=None)), + ) + self.start() + + def run(self): + self._server.serve_forever() + + def shutdown(self): + """Shutdown the underlying server.""" + self._server.shutdown() + self._server.server_close() + + +def main(): + parser = argparse.ArgumentParser( + description="Please provide a list of node ips and port." + ) + parser.add_argument( + "--ips", required=True, help="Comma separated list of node ips." + ) + parser.add_argument( + "--host", + type=str, + required=False, + help="The Host on which the coordinator listens.", + ) + parser.add_argument( + "--port", + type=int, + required=True, + help="The port on which the coordinator listens.", + ) + args = parser.parse_args() + host = args.host or socket.gethostbyname(socket.gethostname()) + list_of_node_ips = args.ips.split(",") + OnPremCoordinatorServer( + list_of_node_ips=list_of_node_ips, + host=host, + port=args.port, + ) + + +if __name__ == "__main__": + main() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/defaults.yaml b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8a3f8de6fb1fb1be8769256dbfc973512d33a75f --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/local/defaults.yaml @@ -0,0 +1,33 @@ +# This configuration file is used internally +# to fill default settings for on-prem Ray clusters +# bootstrapped by the Ray autoscaler. +# For annotated examples, see the example yamls in this directory. + +cluster_name: default + +auth: {} + +upscaling_speed: 1.0 +idle_timeout_minutes: 5 + +docker: {} + +# Defaults are empty to avoid any surprise changes to on-prem cluster's state. +# Refer to example yamls for examples of ray installation in setup commands. +initialization_commands: [] +setup_commands: [] +head_setup_commands: [] +worker_setup_commands: [] + +head_start_ray_commands: + - ray stop + - ulimit -c unlimited; ray start --head --port=6379 --autoscaling-config=~/ray_bootstrap_config.yaml +worker_start_ray_commands: + - ray stop + - ray start --address=$RAY_HEAD_IP:6379 + +file_mounts: {} +cluster_synced_files: [] +file_mounts_sync_continuously: false +rsync_exclude: [] +rsync_filter: [] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7dcad853f6a118f03a4e1c4198f11f3be281c5f9 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/__init__.py @@ -0,0 +1,29 @@ +from ray.autoscaler.sdk.sdk import ( + bootstrap_config, + configure_logging, + create_or_update_cluster, + fillout_defaults, + get_docker_host_mount_location, + get_head_node_ip, + get_worker_node_ips, + register_callback_handler, + request_resources, + rsync, + run_on_cluster, + teardown_cluster, +) + +__all__ = [ + "create_or_update_cluster", + "teardown_cluster", + "run_on_cluster", + "rsync", + "get_head_node_ip", + "get_worker_node_ips", + "request_resources", + "configure_logging", + "bootstrap_config", + "fillout_defaults", + "register_callback_handler", + "get_docker_host_mount_location", +] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..79b297772d3665cae02834eb455fe40071c4ff30 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/__pycache__/sdk.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/__pycache__/sdk.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3a979bedb29237c841c156a682c42892287219eb Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/__pycache__/sdk.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/sdk.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/sdk.py new file mode 100644 index 0000000000000000000000000000000000000000..276e85892c0e3aee9cbbea22b413800be3eaebbf --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/sdk/sdk.py @@ -0,0 +1,343 @@ +"""IMPORTANT: this is an experimental interface and not currently stable.""" + +import json +import os +import tempfile +from contextlib import contextmanager +from typing import Any, Callable, Dict, Iterator, List, Optional, Union + +from ray.autoscaler._private import commands +from ray.autoscaler._private.cli_logger import cli_logger +from ray.autoscaler._private.event_system import CreateClusterEvent # noqa: F401 +from ray.autoscaler._private.event_system import global_event_system # noqa: F401 +from ray.util.annotations import DeveloperAPI + + +@DeveloperAPI +def create_or_update_cluster( + cluster_config: Union[dict, str], + *, + no_restart: bool = False, + restart_only: bool = False, + no_config_cache: bool = False +) -> Dict[str, Any]: + """Create or updates an autoscaling Ray cluster from a config json. + + Args: + cluster_config (Union[str, dict]): Either the config dict of the + cluster, or a path pointing to a file containing the config. + no_restart: Whether to skip restarting Ray services during the + update. This avoids interrupting running jobs and can be used to + dynamically adjust autoscaler configuration. + restart_only: Whether to skip running setup commands and only + restart Ray. This cannot be used with 'no-restart'. + no_config_cache: Whether to disable the config cache and fully + resolve all environment settings from the Cloud provider again. + """ + with _as_config_file(cluster_config) as config_file: + return commands.create_or_update_cluster( + config_file=config_file, + override_min_workers=None, + override_max_workers=None, + no_restart=no_restart, + restart_only=restart_only, + yes=True, + override_cluster_name=None, + no_config_cache=no_config_cache, + redirect_command_output=None, + use_login_shells=True, + ) + + +@DeveloperAPI +def teardown_cluster( + cluster_config: Union[dict, str], + workers_only: bool = False, + keep_min_workers: bool = False, +) -> None: + """Destroys all nodes of a Ray cluster described by a config json. + + Args: + cluster_config (Union[str, dict]): Either the config dict of the + cluster, or a path pointing to a file containing the config. + workers_only: Whether to keep the head node running and only + teardown worker nodes. + keep_min_workers: Whether to keep min_workers (as specified + in the YAML) still running. + """ + with _as_config_file(cluster_config) as config_file: + return commands.teardown_cluster( + config_file=config_file, + yes=True, + workers_only=workers_only, + override_cluster_name=None, + keep_min_workers=keep_min_workers, + ) + + +@DeveloperAPI +def run_on_cluster( + cluster_config: Union[dict, str], + *, + cmd: Optional[str] = None, + run_env: str = "auto", + tmux: bool = False, + stop: bool = False, + no_config_cache: bool = False, + port_forward: Optional[commands.Port_forward] = None, + with_output: bool = False +) -> Optional[str]: + """Runs a command on the specified cluster. + + Args: + cluster_config (Union[str, dict]): Either the config dict of the + cluster, or a path pointing to a file containing the config. + cmd: the command to run, or None for a no-op command. + run_env: whether to run the command on the host or in a + container. Select between "auto", "host" and "docker". + tmux: whether to run in a tmux session + stop: whether to stop the cluster after command run + no_config_cache: Whether to disable the config cache and fully + resolve all environment settings from the Cloud provider again. + port_forward ( (int,int) or list[(int,int)]): port(s) to forward. + with_output: Whether to capture command output. + + Returns: + The output of the command as a string. + """ + with _as_config_file(cluster_config) as config_file: + return commands.exec_cluster( + config_file, + cmd=cmd, + run_env=run_env, + screen=False, + tmux=tmux, + stop=stop, + start=False, + override_cluster_name=None, + no_config_cache=no_config_cache, + port_forward=port_forward, + with_output=with_output, + ) + + +@DeveloperAPI +def rsync( + cluster_config: Union[dict, str], + *, + source: Optional[str], + target: Optional[str], + down: bool, + ip_address: Optional[str] = None, + use_internal_ip: bool = False, + no_config_cache: bool = False, + should_bootstrap: bool = True +): + """Rsyncs files to or from the cluster. + + Args: + cluster_config (Union[str, dict]): Either the config dict of the + cluster, or a path pointing to a file containing the config. + source: rsync source argument. + target: rsync target argument. + down: whether we're syncing remote -> local. + ip_address: Address of node. + use_internal_ip: Whether the provided ip_address is + public or private. + no_config_cache: Whether to disable the config cache and fully + resolve all environment settings from the Cloud provider again. + should_bootstrap: whether to bootstrap cluster config before syncing + + Raises: + RuntimeError: If the cluster head node is not found. + """ + with _as_config_file(cluster_config) as config_file: + return commands.rsync( + config_file=config_file, + source=source, + target=target, + override_cluster_name=None, + down=down, + ip_address=ip_address, + use_internal_ip=use_internal_ip, + no_config_cache=no_config_cache, + all_nodes=False, + should_bootstrap=should_bootstrap, + ) + + +@DeveloperAPI +def get_head_node_ip(cluster_config: Union[dict, str]) -> str: + """Returns head node IP for given configuration file if exists. + + Args: + cluster_config (Union[str, dict]): Either the config dict of the + cluster, or a path pointing to a file containing the config. + + Returns: + The ip address of the cluster head node. + + Raises: + RuntimeError: If the cluster is not found. + """ + with _as_config_file(cluster_config) as config_file: + return commands.get_head_node_ip(config_file) + + +@DeveloperAPI +def get_worker_node_ips(cluster_config: Union[dict, str]) -> List[str]: + """Returns worker node IPs for given configuration file. + + Args: + cluster_config (Union[str, dict]): Either the config dict of the + cluster, or a path pointing to a file containing the config. + + Returns: + List of worker node ip addresses. + + Raises: + RuntimeError: If the cluster is not found. + """ + with _as_config_file(cluster_config) as config_file: + return commands.get_worker_node_ips(config_file) + + +@DeveloperAPI +def request_resources( + num_cpus: Optional[int] = None, bundles: Optional[List[dict]] = None +) -> None: + """Command the autoscaler to scale to accommodate the specified requests. + + The cluster will immediately attempt to scale to accommodate the requested + resources, bypassing normal upscaling speed constraints. This takes into + account existing resource usage. + + For example, suppose you call ``request_resources(num_cpus=100)`` and + there are 45 currently running tasks, each requiring 1 CPU. Then, enough + nodes will be added so up to 100 tasks can run concurrently. It does + **not** add enough nodes so that 145 tasks can run. + + This call is only a hint to the autoscaler. The actual resulting cluster + size may be slightly larger or smaller than expected depending on the + internal bin packing algorithm and max worker count restrictions. + + Args: + num_cpus: Scale the cluster to ensure this number of CPUs are + available. This request is persistent until another call to + request_resources() is made to override. + bundles (List[ResourceDict]): Scale the cluster to ensure this set of + resource shapes can fit. This request is persistent until another + call to request_resources() is made to override. + + Examples: + >>> from ray.autoscaler.sdk import request_resources + >>> # Request 1000 CPUs. + >>> request_resources(num_cpus=1000) # doctest: +SKIP + >>> # Request 64 CPUs and also fit a 1-GPU/4-CPU task. + >>> request_resources( # doctest: +SKIP + ... num_cpus=64, bundles=[{"GPU": 1, "CPU": 4}]) + >>> # Same as requesting num_cpus=3. + >>> request_resources( # doctest: +SKIP + ... bundles=[{"CPU": 1}, {"CPU": 1}, {"CPU": 1}]) + """ + if num_cpus is not None and not isinstance(num_cpus, int): + raise TypeError("num_cpus should be of type int.") + if bundles is not None: + if isinstance(bundles, List): + for bundle in bundles: + if isinstance(bundle, Dict): + for key in bundle.keys(): + if not (isinstance(key, str) and isinstance(bundle[key], int)): + raise TypeError( + "each bundle key should be str and value as int." + ) + else: + raise TypeError("each bundle should be a Dict.") + else: + raise TypeError("bundles should be of type List") + + return commands.request_resources(num_cpus, bundles) + + +@DeveloperAPI +def configure_logging( + log_style: Optional[str] = None, + color_mode: Optional[str] = None, + verbosity: Optional[int] = None, +): + """Configures logging for cluster command calls. + + Args: + log_style: If 'pretty', outputs with formatting and color. + If 'record', outputs record-style without formatting. + 'auto' defaults to 'pretty', and disables pretty logging + if stdin is *not* a TTY. Defaults to "auto". + color_mode (str): + Can be "true", "false", or "auto". + + Enables or disables `colorful`. + + If `color_mode` is "auto", is set to `not stdout.isatty()` + vebosity (int): + Output verbosity (0, 1, 2, 3). + + Low verbosity will disable `verbose` and `very_verbose` messages. + + """ + cli_logger.configure( + log_style=log_style, color_mode=color_mode, verbosity=verbosity + ) + + +@contextmanager +@DeveloperAPI +def _as_config_file(cluster_config: Union[dict, str]) -> Iterator[str]: + if isinstance(cluster_config, dict): + tmp = tempfile.NamedTemporaryFile("w", prefix="autoscaler-sdk-tmp-") + tmp.write(json.dumps(cluster_config)) + tmp.flush() + cluster_config = tmp.name + if not os.path.exists(cluster_config): + raise ValueError("Cluster config not found {}".format(cluster_config)) + yield cluster_config + + +@DeveloperAPI +def bootstrap_config( + cluster_config: Dict[str, Any], no_config_cache: bool = False +) -> Dict[str, Any]: + """Validate and add provider-specific fields to the config. For example, + IAM/authentication may be added here.""" + return commands._bootstrap_config(cluster_config, no_config_cache) + + +@DeveloperAPI +def fillout_defaults(config: Dict[str, Any]) -> Dict[str, Any]: + """Fillout default values for a cluster_config based on the provider.""" + from ray.autoscaler._private.util import fillout_defaults + + return fillout_defaults(config) + + +@DeveloperAPI +def register_callback_handler( + event_name: str, + callback: Union[Callable[[Dict], None], List[Callable[[Dict], None]]], +) -> None: + """Registers a callback handler for autoscaler events. + + Args: + event_name: Event that callback should be called on. See + CreateClusterEvent for details on the events available to be + registered against. + callback: Callable object that is invoked + when specified event occurs. + """ + global_event_system.add_callback_handler(event_name, callback) + + +@DeveloperAPI +def get_docker_host_mount_location(cluster_name: str) -> str: + """Return host path that Docker mounts attach to.""" + docker_mount_prefix = "/tmp/ray_tmp_mount/{cluster_name}" + return docker_mount_prefix.format(cluster_name=cluster_name) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/spark/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/spark/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/spark/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/spark/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8d2695d5726ee86bdabe3553256b61a487a16778 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/spark/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/spark/defaults.yaml b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/spark/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bc69977cfc6f5678caf5a2c77df3072df088c21c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/spark/defaults.yaml @@ -0,0 +1,49 @@ +# Example command to start a cluster with this config: +# +# ray start --autoscaling-config=default.yaml --head --block +# +cluster_name: spark +max_workers: 8 +provider: + type: spark + # This must be true since the nodes share the same ip! + use_node_id_as_ip: True + disable_node_updaters: True + disable_launch_config_check: True +available_node_types: + ray.head.default: + # You must set this manually to your "head" node resources!! The head + # node is launched via `ray start` and hence the autoscaler cannot + # configure its resources. The resources specified for its node type + # must line up with what Ray detects/is configured with on start. + resources: + CPU: 8 # <-- set this to num CPUs used/detected in `ray start` + GPU: 0 # <-- set this to num GPUs used/detected in `ray start` + node_config: {} + max_workers: 0 + ray.worker: + resources: + CPU: 1 + object_store_memory: 1000000000 + node_config: {} + min_workers: 0 + max_workers: 4 +head_node_type: ray.head.default +upscaling_speed: 1.0 +idle_timeout_minutes: 1.0 +# +# !!! Configurations below are not supported in spark cluster mode +# +auth: {} +docker: {} +initialization_commands: [] +setup_commands: [] +head_setup_commands: [] +worker_setup_commands: [] +head_start_ray_commands: [] +worker_start_ray_commands: [] +file_mounts: {} +cluster_synced_files: [] +file_mounts_sync_continuously: false +rsync_exclude: [] +rsync_filter: [] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e59952af81c0cb2e824645e09cce1427a48a0721 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/autoscaler.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/autoscaler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..407705dcf4ede6c9c984d7b36e079a792cc08af7 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/autoscaler.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/event_logger.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/event_logger.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b00059542e60b389bdd33a15e7836a74d580e916 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/event_logger.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/metrics_reporter.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/metrics_reporter.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..929bd8300cad0915c379bab1b4535379ffae68d9 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/metrics_reporter.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/monitor.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/monitor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8a5107472206c8f915f9c8ded899e0cf657bf747 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/monitor.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/scheduler.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/scheduler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f7c2b4a1599a8937d6c9588d8eaf3721a894f0e9 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/scheduler.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/schema.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/schema.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9260978832e29c4ce21427ed5b93314dcfb7b480 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/schema.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/sdk.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/sdk.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7255a60be1a67e9e7f58128226a870c21bac0148 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/sdk.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b3a9390dc75bb9fff43210f0867b049d6b4b5e3 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/__pycache__/utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/autoscaler.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/autoscaler.py new file mode 100644 index 0000000000000000000000000000000000000000..82de748a1f5f7005263aec33bc40f114a989336b --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/autoscaler.py @@ -0,0 +1,216 @@ +import logging +from queue import Queue +from typing import List, Optional + +from ray._raylet import GcsClient +from ray.autoscaler._private.providers import _get_node_provider +from ray.autoscaler.v2.event_logger import AutoscalerEventLogger +from ray.autoscaler.v2.instance_manager.cloud_providers.kuberay.cloud_provider import ( + KubeRayProvider, +) +from ray.autoscaler.v2.instance_manager.cloud_providers.read_only.cloud_provider import ( # noqa + ReadOnlyProvider, +) +from ray.autoscaler.v2.instance_manager.config import ( + AutoscalingConfig, + IConfigReader, + Provider, +) +from ray.autoscaler.v2.instance_manager.instance_manager import ( + InstanceManager, + InstanceUpdatedSubscriber, +) +from ray.autoscaler.v2.instance_manager.instance_storage import InstanceStorage +from ray.autoscaler.v2.instance_manager.node_provider import ( + ICloudInstanceProvider, + NodeProviderAdapter, +) +from ray.autoscaler.v2.instance_manager.ray_installer import RayInstaller +from ray.autoscaler.v2.instance_manager.reconciler import Reconciler +from ray.autoscaler.v2.instance_manager.storage import InMemoryStorage +from ray.autoscaler.v2.instance_manager.subscribers.cloud_instance_updater import ( + CloudInstanceUpdater, +) +from ray.autoscaler.v2.instance_manager.subscribers.ray_stopper import RayStopper +from ray.autoscaler.v2.instance_manager.subscribers.threaded_ray_installer import ( + ThreadedRayInstaller, +) +from ray.autoscaler.v2.metrics_reporter import AutoscalerMetricsReporter +from ray.autoscaler.v2.scheduler import ResourceDemandScheduler +from ray.autoscaler.v2.sdk import get_cluster_resource_state +from ray.core.generated.autoscaler_pb2 import AutoscalingState +from urllib.parse import urlsplit + +logger = logging.getLogger(__name__) + + +class Autoscaler: + def __init__( + self, + session_name: str, + config_reader: IConfigReader, + gcs_client: GcsClient, + event_logger: Optional[AutoscalerEventLogger] = None, + metrics_reporter: Optional[AutoscalerMetricsReporter] = None, + ) -> None: + """ + Args: + session_name: The current Ray session name. + config_reader: The config reader. + gcs_client: The GCS client. + event_logger: The event logger for emitting cluster events. + metrics_reporter: The metrics reporter for emitting cluster metrics. + """ + + self._config_reader = config_reader + + config = config_reader.get_cached_autoscaling_config() + logger.info(f"Using Autoscaling Config: \n{config.dump()}") + + self._gcs_client = gcs_client + self._cloud_instance_provider = None + self._instance_manager = None + self._ray_stop_errors_queue = Queue() + self._ray_install_errors_queue = Queue() + self._event_logger = event_logger + self._metrics_reporter = metrics_reporter + + self._init_cloud_instance_provider(config, config_reader) + self._init_instance_manager( + session_name=session_name, + config=config, + cloud_provider=self._cloud_instance_provider, + gcs_client=self._gcs_client, + ) + self._scheduler = ResourceDemandScheduler(self._event_logger) + + def _init_cloud_instance_provider( + self, config: AutoscalingConfig, config_reader: IConfigReader + ): + """ + Initialize the cloud provider, and its dependencies (the v1 node provider) + + Args: + config: The autoscaling config. + config_reader: The config reader. + + """ + provider_config = config.get_provider_config() + if provider_config["type"] == "kuberay": + provider_config["head_node_type"] = config.get_head_node_type() + self._cloud_instance_provider = KubeRayProvider( + config.get_config("cluster_name"), + provider_config, + ) + elif config.provider == Provider.READ_ONLY: + provider_config["gcs_address"] = self._gcs_client.address + self._cloud_instance_provider = ReadOnlyProvider( + provider_config=provider_config, + ) + else: + node_provider_v1 = _get_node_provider( + provider_config, + config.get_config("cluster_name"), + ) + + self._cloud_instance_provider = NodeProviderAdapter( + v1_provider=node_provider_v1, + config_reader=config_reader, + ) + + def _init_instance_manager( + self, + session_name: str, + cloud_provider: ICloudInstanceProvider, + gcs_client: GcsClient, + config: AutoscalingConfig, + ): + """ + Initialize the instance manager, and its dependencies. + """ + + instance_storage = InstanceStorage( + cluster_id=session_name, + storage=InMemoryStorage(), + ) + subscribers: List[InstanceUpdatedSubscriber] = [] + subscribers.append(CloudInstanceUpdater(cloud_provider=cloud_provider)) + subscribers.append( + RayStopper(gcs_client=gcs_client, error_queue=self._ray_stop_errors_queue) + ) + if not config.disable_node_updaters() and isinstance( + cloud_provider, NodeProviderAdapter + ): + head_node_ip = urlsplit("//" + self._gcs_client.address).hostname + assert head_node_ip is not None, "Invalid GCS address format" + subscribers.append( + ThreadedRayInstaller( + head_node_ip=head_node_ip, + instance_storage=instance_storage, + ray_installer=RayInstaller( + provider=cloud_provider.v1_provider, + config=config, + ), + error_queue=self._ray_install_errors_queue, + # TODO(rueian): Rewrite the ThreadedRayInstaller and its underlying + # NodeUpdater and CommandRunner to use the asyncio, so that we don't + # need to use so many threads. We use so many threads now because + # they are blocking and letting the new cloud machines to wait for + # previous machines to finish installing Ray is quite inefficient. + max_concurrent_installs=config.get_max_num_worker_nodes() or 50, + ) + ) + + self._instance_manager = InstanceManager( + instance_storage=instance_storage, + instance_status_update_subscribers=subscribers, + ) + + def update_autoscaling_state( + self, + ) -> Optional[AutoscalingState]: + """Update the autoscaling state of the cluster by reconciling the current + state of the cluster resources, the cloud providers as well as instance + update subscribers with the desired state. + + Returns: + AutoscalingState: The new autoscaling state of the cluster or None if + the state is not updated. + + Raises: + None: No exception. + """ + + try: + ray_stop_errors = [] + while not self._ray_stop_errors_queue.empty(): + ray_stop_errors.append(self._ray_stop_errors_queue.get()) + + ray_install_errors = [] + while not self._ray_install_errors_queue.empty(): + ray_install_errors.append(self._ray_install_errors_queue.get()) + + # Get the current state of the ray cluster resources. + ray_cluster_resource_state = get_cluster_resource_state(self._gcs_client) + + # Refresh the config from the source + self._config_reader.refresh_cached_autoscaling_config() + autoscaling_config = self._config_reader.get_cached_autoscaling_config() + + return Reconciler.reconcile( + instance_manager=self._instance_manager, + scheduler=self._scheduler, + cloud_provider=self._cloud_instance_provider, + ray_cluster_resource_state=ray_cluster_resource_state, + non_terminated_cloud_instances=( + self._cloud_instance_provider.get_non_terminated() + ), + cloud_provider_errors=self._cloud_instance_provider.poll_errors(), + ray_install_errors=ray_install_errors, + ray_stop_errors=ray_stop_errors, + autoscaling_config=autoscaling_config, + metrics_reporter=self._metrics_reporter, + ) + except Exception as e: + logger.exception(e) + return None diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/event_logger.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/event_logger.py new file mode 100644 index 0000000000000000000000000000000000000000..316378867e27a72190bd23910d1e41f086db3e6d --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/event_logger.py @@ -0,0 +1,173 @@ +import logging +from collections import defaultdict +from typing import Dict, List, Optional + +from ray._private.event.event_logger import EventLoggerAdapter +from ray.autoscaler.v2.instance_manager.config import NodeTypeConfig +from ray.autoscaler.v2.schema import NodeType +from ray.autoscaler.v2.utils import ResourceRequestUtil +from ray.core.generated.autoscaler_pb2 import ( + ClusterResourceConstraint, + GangResourceRequest, + ResourceRequest, +) +from ray.core.generated.common_pb2 import LabelSelectorOperator +from ray.core.generated.instance_manager_pb2 import LaunchRequest, TerminationRequest + +logger = logging.getLogger(__name__) + + +class AutoscalerEventLogger: + """ + Logs events related to the autoscaler. + + # TODO: + - Add more logging for other events. + - Rate limit the events if too spammy. + """ + + def __init__(self, logger: EventLoggerAdapter): + self._logger = logger + + def log_cluster_scheduling_update( + self, + node_type_configs: Dict[NodeType, NodeTypeConfig], + cluster_shape: Dict[NodeType, int], + launch_requests: Optional[List[LaunchRequest]] = None, + terminate_requests: Optional[List[TerminationRequest]] = None, + infeasible_requests: Optional[List[ResourceRequest]] = None, + infeasible_gang_requests: Optional[List[GangResourceRequest]] = None, + infeasible_cluster_resource_constraints: Optional[ + List[ClusterResourceConstraint] + ] = None, + ) -> None: + """ + Log any update of the cluster scheduling state. + """ + + # Log any launch events. + if launch_requests: + launch_type_count = defaultdict(int) + for req in launch_requests: + launch_type_count[req.instance_type] += req.count + + for idx, (instance_type, count) in enumerate(launch_type_count.items()): + log_str = f"Adding {count} node(s) of type {instance_type}." + self._logger.info(f"{log_str}") + logger.info(f"{log_str}") + + # Log any terminate events. + if terminate_requests: + termination_by_causes_and_type = defaultdict(int) + for req in terminate_requests: + termination_by_causes_and_type[(req.cause, req.instance_type)] += 1 + + cause_reason_map = { + TerminationRequest.Cause.OUTDATED: "outdated", + TerminationRequest.Cause.MAX_NUM_NODES: "max number of worker nodes reached", # noqa + TerminationRequest.Cause.MAX_NUM_NODE_PER_TYPE: "max number of worker nodes per type reached", # noqa + TerminationRequest.Cause.IDLE: "idle", + } + + for idx, ((cause, instance_type), count) in enumerate( + termination_by_causes_and_type.items() + ): + log_str = f"Removing {count} nodes of type {instance_type} ({cause_reason_map[cause]})." # noqa + self._logger.info(f"{log_str}") + logger.info(f"{log_str}") + + # Cluster shape changes. + if launch_requests or terminate_requests: + total_resources = defaultdict(float) + + for node_type, count in cluster_shape.items(): + node_config = node_type_configs[node_type] + for resource_name, resource_quantity in node_config.resources.items(): + total_resources[resource_name] += resource_quantity * count + + num_cpus = total_resources.get("CPU", 0) + log_str = f"Resized to {int(num_cpus)} CPUs" + + if "GPU" in total_resources: + log_str += f", {int(total_resources['GPU'])} GPUs" + if "TPU" in total_resources: + log_str += f", {int(total_resources['TPU'])} TPUs" + + self._logger.info(f"{log_str}.") + self._logger.debug(f"Current cluster shape: {dict(cluster_shape)}.") + + # Log any infeasible requests. + if infeasible_requests: + requests_by_count = ResourceRequestUtil.group_by_count(infeasible_requests) + log_str = "No available node types can fulfill resource requests " + for idx, req_count in enumerate(requests_by_count): + resource_map = ResourceRequestUtil.to_resource_map(req_count.request) + log_str += f"{resource_map}*{req_count.count}" + if idx < len(requests_by_count) - 1: + log_str += ", " + + # Parse and log label selectors if present + if req_count.request.label_selectors: + selector_strs = [] + for selector in req_count.request.label_selectors: + for constraint in selector.label_constraints: + op = LabelSelectorOperator.Name(constraint.operator) + values = ",".join(constraint.label_values) + selector_strs.append( + f"{constraint.label_key} {op} [{values}]" + ) + if selector_strs: + log_str += ( + " with label selectors: [" + "; ".join(selector_strs) + "]" + ) + + log_str += ( + ". Add suitable node types to this cluster to resolve this issue." + ) + self._logger.warning(log_str) + + if infeasible_gang_requests: + # Log for each placement group requests. + for gang_request in infeasible_gang_requests: + log_str = ( + "No available node types can fulfill " + "placement group requests (detail={details}): ".format( + details=gang_request.details + ) + ) + requests_by_count = ResourceRequestUtil.group_by_count( + gang_request.requests + ) + for idx, req_count in enumerate(requests_by_count): + resource_map = ResourceRequestUtil.to_resource_map( + req_count.request + ) + log_str += f"{resource_map}*{req_count.count}" + if idx < len(requests_by_count) - 1: + log_str += ", " + + log_str += ( + ". Add suitable node types to this cluster to resolve this issue." + ) + self._logger.warning(log_str) + + if infeasible_cluster_resource_constraints: + # We will only have max 1 cluster resource constraint for now since it's + # from `request_resources()` sdk, where the most recent call would override + # the previous one. + for infeasible_constraint in infeasible_cluster_resource_constraints: + log_str = "No available node types can fulfill cluster constraint: " + for i, requests_by_count in enumerate( + infeasible_constraint.resource_requests + ): + resource_map = ResourceRequestUtil.to_resource_map( + requests_by_count.request + ) + log_str += f"{resource_map}*{requests_by_count.count}" + if i < len(infeasible_constraint.resource_requests) - 1: + log_str += ", " + + log_str += ( + ". Add suitable node types to this cluster to resolve this issue." + ) + self._logger.warning(log_str) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f8ef7c5060d4f1d36162ecdaf61496ca991af413 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/common.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/common.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..60705b3de62faebfd47509199ede5bd6419d47de Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/common.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/config.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..be08a2f5c619e24a89db8af38b40820aa51ad659 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/config.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/instance_manager.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/instance_manager.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..582295fc75422eb7916ca2c51d7772c39add21df Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/instance_manager.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/instance_storage.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/instance_storage.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fa4b631f6d53b024fc13c5b61f83673941f4ae4e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/instance_storage.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/node_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/node_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c9ac8e628be95969ca6195448c714d6919d49261 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/node_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/ray_installer.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/ray_installer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9dd1a2fb36dd0f0cf76b8ae0059b735a5e0d4510 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/ray_installer.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/reconciler.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/reconciler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1691ee1361cfd008c4355ee73e22bb33c405c67b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/reconciler.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/storage.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/storage.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76617e4e186a4d1d1f78dc6dbe34d65c7e60eeb2 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/__pycache__/storage.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7e2ef4c13f821efedc2657192abfc055a6d8b079 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b94116f417050b515b31fd50ce9b650c0d235e62 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/__pycache__/cloud_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/__pycache__/cloud_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d40bd768501c9f099f5344e9e868ac260753498 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/__pycache__/cloud_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/cloud_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/cloud_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..1a5ef98e394b4a6c5306adf23825a132f84a2828 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/kuberay/cloud_provider.py @@ -0,0 +1,572 @@ +import copy +import logging +import time +from collections import defaultdict +from dataclasses import dataclass, field +from typing import Any, Dict, List, Optional, Set, Tuple + +import requests + +# TODO(rickyx): We should eventually remove these imports +# when we deprecate the v1 kuberay node provider. +from ray.autoscaler._private.kuberay.node_provider import ( + KUBERAY_KIND_HEAD, + KUBERAY_KIND_WORKER, + KUBERAY_LABEL_KEY_KIND, + KUBERAY_LABEL_KEY_TYPE, + RAY_HEAD_POD_NAME, + IKubernetesHttpApiClient, + KubernetesHttpApiClient, + _worker_group_index, + _worker_group_max_replicas, + _worker_group_replicas, + worker_delete_patch, + worker_replica_patch, +) +from ray.autoscaler.v2.instance_manager.node_provider import ( + CloudInstance, + CloudInstanceId, + CloudInstanceProviderError, + ICloudInstanceProvider, + LaunchNodeError, + NodeKind, + TerminateNodeError, +) +from ray.autoscaler.v2.schema import NodeType + +logger = logging.getLogger(__name__) + + +class KubeRayProvider(ICloudInstanceProvider): + """ + This class is a thin wrapper around the Kubernetes API client. It modifies + the RayCluster resource spec on the Kubernetes API server to scale the cluster: + + It launches new instances/nodes by submitting patches to the Kubernetes API + to update the RayCluster CRD. + """ + + def __init__( + self, + cluster_name: str, + provider_config: Dict[str, Any], + k8s_api_client: Optional[IKubernetesHttpApiClient] = None, + ): + """ + Args: + cluster_name: The name of the RayCluster resource. + provider_config: The namespace of the RayCluster. + k8s_api_client: The client to the Kubernetes API server. + This could be used to mock the Kubernetes API server for testing. + """ + self._cluster_name = cluster_name + self._namespace = provider_config["namespace"] + + self._k8s_api_client = k8s_api_client or KubernetesHttpApiClient( + namespace=self._namespace + ) + + # Below are states that are cached locally. + self._requests = set() + self._launch_errors_queue = [] + self._terminate_errors_queue = [] + + # Below are states that are fetched from the Kubernetes API server. + self._ray_cluster = None + self._cached_instances: Dict[CloudInstanceId, CloudInstance] + + @dataclass + class ScaleRequest: + """Represents a scale request that contains the current states and go-to states + for the ray cluster. + + This class will be converted to patches to be submitted to the Kubernetes API + server: + - For launching new instances, it will adjust the `replicas` field in the + workerGroupSpecs. + - For terminating instances, it will adjust the `workersToDelete` field in the + workerGroupSpecs. + + """ + + # The desired number of workers for each node type. + desired_num_workers: Dict[NodeType, int] = field(default_factory=dict) + # The workers to delete for each node type. + workers_to_delete: Dict[NodeType, List[CloudInstanceId]] = field( + default_factory=dict + ) + # The worker groups with empty workersToDelete field. + # This is needed since we will also need to clear the workersToDelete field + # for the worker groups that have finished deletes. + worker_groups_without_pending_deletes: Set[NodeType] = field( + default_factory=set + ) + # The worker groups that still have workers to be deleted. + worker_groups_with_pending_deletes: Set[NodeType] = field(default_factory=set) + + ################################ + # Interface for ICloudInstanceProvider + ################################ + + def get_non_terminated(self) -> Dict[CloudInstanceId, CloudInstance]: + self._sync_with_api_server() + return copy.deepcopy(dict(self._cached_instances)) + + def terminate(self, ids: List[CloudInstanceId], request_id: str) -> None: + if request_id in self._requests: + # This request is already processed. + logger.warning(f"Request {request_id} is already processed for: {ids}") + return + self._requests.add(request_id) + logger.info("Terminating worker pods: {}".format(ids)) + + scale_request = self._initialize_scale_request( + to_launch={}, to_delete_instances=ids + ) + if scale_request.worker_groups_with_pending_deletes: + errors_msg = ( + "There are workers to be deleted from: " + f"{scale_request.worker_groups_with_pending_deletes}. " + "Waiting for them to be deleted before adding new workers " + " to be deleted" + ) + logger.warning(errors_msg) + self._add_terminate_errors( + ids, + request_id, + details=errors_msg, + ) + return + + try: + self._submit_scale_request(scale_request) + except Exception as e: + logger.exception(f"Error terminating nodes: {scale_request}") + self._add_terminate_errors(ids, request_id, details=str(e), e=e) + + def launch(self, shape: Dict[NodeType, int], request_id: str) -> None: + if request_id in self._requests: + # This request is already processed. + return + self._requests.add(request_id) + + scale_request = self._initialize_scale_request( + to_launch=shape, to_delete_instances=[] + ) + + if scale_request.worker_groups_with_pending_deletes: + error_msg = ( + "There are workers to be deleted from: " + f"{scale_request.worker_groups_with_pending_deletes}. " + "Waiting for them to be deleted before creating new workers." + ) + logger.warning(error_msg) + self._add_launch_errors( + shape, + request_id, + details=error_msg, + ) + return + + try: + self._submit_scale_request(scale_request) + except Exception as e: + logger.exception(f"Error launching nodes: {scale_request}") + self._add_launch_errors(shape, request_id, details=str(e), e=e) + + def poll_errors(self) -> List[CloudInstanceProviderError]: + errors = [] + errors += self._launch_errors_queue + errors += self._terminate_errors_queue + self._launch_errors_queue = [] + self._terminate_errors_queue = [] + return errors + + ############################ + # Private + ############################ + + def _initialize_scale_request( + self, to_launch: Dict[NodeType, int], to_delete_instances: List[CloudInstanceId] + ) -> "KubeRayProvider.ScaleRequest": + """ + Initialize the scale request based on the current state of the cluster and + the desired state (to launch, to delete). + + Args: + to_launch: The desired number of workers to launch for each node type. + to_delete_instances: The instances to delete. + + Returns: + The scale request. + """ + + # Update the cached states. + self._sync_with_api_server() + ray_cluster = self.ray_cluster + cur_instances = self.instances + + # Get the worker groups that have pending deletes and the worker groups that + # have finished deletes, and the set of workers included in the workersToDelete + # field of any worker group. + ( + worker_groups_with_pending_deletes, + worker_groups_without_pending_deletes, + worker_to_delete_set, + ) = self._get_workers_delete_info(ray_cluster, set(cur_instances.keys())) + + # Calculate the desired number of workers by type. + num_workers_dict = defaultdict(int) + worker_groups = ray_cluster["spec"].get("workerGroupSpecs", []) + for worker_group in worker_groups: + node_type = worker_group["groupName"] + # Handle the case where users manually increase `minReplicas` + # to scale up the number of worker Pods. In this scenario, + # `replicas` will be smaller than `minReplicas`. + # num_workers_dict should account for multi-host replicas when + # `numOfHosts`` is set. + num_of_hosts = worker_group.get("numOfHosts", 1) + num_workers_dict[node_type] = ( + max(worker_group["replicas"], worker_group["minReplicas"]) + * num_of_hosts + ) + + # Add to launch nodes. + for node_type, count in to_launch.items(): + num_workers_dict[node_type] += count + + to_delete_instances_by_type = defaultdict(list) + # Update the number of workers with to_delete_instances + # and group them by type. + for to_delete_id in to_delete_instances: + to_delete_instance = cur_instances.get(to_delete_id, None) + if to_delete_instance is None: + # This instance has already been deleted. + continue + + if to_delete_instance.node_kind == NodeKind.HEAD: + # Not possible to delete head node. + continue + + if to_delete_instance.cloud_instance_id in worker_to_delete_set: + # If the instance is already in the workersToDelete field of + # any worker group, skip it. + continue + + num_workers_dict[to_delete_instance.node_type] -= 1 + assert num_workers_dict[to_delete_instance.node_type] >= 0 + to_delete_instances_by_type[to_delete_instance.node_type].append( + to_delete_instance + ) + + scale_request = KubeRayProvider.ScaleRequest( + desired_num_workers=num_workers_dict, + workers_to_delete=to_delete_instances_by_type, + worker_groups_without_pending_deletes=worker_groups_without_pending_deletes, + worker_groups_with_pending_deletes=worker_groups_with_pending_deletes, + ) + + return scale_request + + def _submit_scale_request( + self, scale_request: "KubeRayProvider.ScaleRequest" + ) -> None: + """Submits a scale request to the Kubernetes API server. + + This method will convert the scale request to patches and submit the patches + to the Kubernetes API server. + + Args: + scale_request: The scale request. + + Raises: + Exception: An exception is raised if the Kubernetes API server returns an + error. + """ + # Get the current ray cluster spec. + patch_payload = [] + + raycluster = self.ray_cluster + + # Collect patches for replica counts. + for node_type, target_replicas in scale_request.desired_num_workers.items(): + group_index = _worker_group_index(raycluster, node_type) + group_max_replicas = _worker_group_max_replicas(raycluster, group_index) + # Cap the replica count to maxReplicas. + if group_max_replicas is not None and group_max_replicas < target_replicas: + logger.warning( + "Autoscaler attempted to create " + + "more than maxReplicas pods of type {}.".format(node_type) + ) + target_replicas = group_max_replicas + # Check if we need to change the target count. + if target_replicas == _worker_group_replicas(raycluster, group_index): + # No patch required. + continue + # Need to patch replica count. Format the patch and add it to the payload. + patch = worker_replica_patch(group_index, target_replicas) + patch_payload.append(patch) + + # Maps node_type to nodes to delete for that group. + for ( + node_type, + workers_to_delete_of_type, + ) in scale_request.workers_to_delete.items(): + group_index = _worker_group_index(raycluster, node_type) + worker_ids_to_delete = [ + worker.cloud_instance_id for worker in workers_to_delete_of_type + ] + patch = worker_delete_patch(group_index, worker_ids_to_delete) + patch_payload.append(patch) + + # Clear the workersToDelete field for the worker groups that have been deleted. + for node_type in scale_request.worker_groups_without_pending_deletes: + if node_type in scale_request.workers_to_delete: + # This node type is still being deleted. + continue + group_index = _worker_group_index(raycluster, node_type) + patch = worker_delete_patch(group_index, []) + patch_payload.append(patch) + + if len(patch_payload) == 0: + # No patch required. + return + + logger.info(f"Submitting a scale request: {scale_request}") + self._patch(f"rayclusters/{self._cluster_name}", patch_payload) + + def _add_launch_errors( + self, + shape: Dict[NodeType, int], + request_id: str, + details: str, + e: Optional[Exception] = None, + ) -> None: + """ + Adds launch errors to the error queue. + + Args: + shape: The shape of the nodes that failed to launch. + request_id: The request id of the launch request. + details: The details of the error. + e: The exception that caused the error. + """ + for node_type, count in shape.items(): + self._launch_errors_queue.append( + LaunchNodeError( + node_type=node_type, + timestamp_ns=time.time_ns(), + count=count, + request_id=request_id, + details=details, + cause=e, + ) + ) + + def _add_terminate_errors( + self, + ids: List[CloudInstanceId], + request_id: str, + details: str, + e: Optional[Exception] = None, + ) -> None: + """ + Adds terminate errors to the error queue. + + Args: + ids: The ids of the nodes that failed to terminate. + request_id: The request id of the terminate request. + details: The details of the error. + e: The exception that caused the error. + """ + for id in ids: + self._terminate_errors_queue.append( + TerminateNodeError( + cloud_instance_id=id, + timestamp_ns=time.time_ns(), + request_id=request_id, + details=details, + cause=e, + ) + ) + + def _sync_with_api_server(self) -> None: + """Fetches the RayCluster resource from the Kubernetes API server.""" + self._ray_cluster = self._get(f"rayclusters/{self._cluster_name}") + self._cached_instances = self._fetch_instances() + + @property + def ray_cluster(self) -> Dict[str, Any]: + return copy.deepcopy(self._ray_cluster) + + @property + def instances(self) -> Dict[CloudInstanceId, CloudInstance]: + return copy.deepcopy(self._cached_instances) + + @staticmethod + def _get_workers_delete_info( + ray_cluster_spec: Dict[str, Any], node_set: Set[CloudInstanceId] + ) -> Tuple[Set[NodeType], Set[NodeType], Set[CloudInstanceId]]: + """ + Gets the worker groups that have pending deletes and the worker groups that + have finished deletes. + + Returns: + worker_groups_with_pending_deletes: The worker groups that have pending + deletes. + worker_groups_with_finished_deletes: The worker groups that have finished + deletes. + worker_to_delete_set: A set of Pods that are included in the workersToDelete + field of any worker group. + """ + + worker_groups_with_pending_deletes = set() + worker_groups_with_deletes = set() + worker_to_delete_set = set() + + worker_groups = ray_cluster_spec["spec"].get("workerGroupSpecs", []) + for worker_group in worker_groups: + workersToDelete = worker_group.get("scaleStrategy", {}).get( + "workersToDelete", [] + ) + if not workersToDelete: + # No workers to delete in this group. + continue + + node_type = worker_group["groupName"] + worker_groups_with_deletes.add(node_type) + + for worker in workersToDelete: + worker_to_delete_set.add(worker) + if worker in node_set: + worker_groups_with_pending_deletes.add(node_type) + + worker_groups_with_finished_deletes = ( + worker_groups_with_deletes - worker_groups_with_pending_deletes + ) + return ( + worker_groups_with_pending_deletes, + worker_groups_with_finished_deletes, + worker_to_delete_set, + ) + + def _fetch_instances(self) -> Dict[CloudInstanceId, CloudInstance]: + """ + Fetches the pods from the Kubernetes API server and convert them to Ray + CloudInstance. + + Returns: + A dict of CloudInstanceId to CloudInstance. + """ + # Get the pods resource version. + # Specifying a resource version in list requests is important for scalability: + # https://kubernetes.io/docs/reference/using-api/api-concepts/#semantics-for-get-and-list + resource_version = self._get_head_pod_resource_version() + if resource_version: + logger.info( + f"Listing pods for RayCluster {self._cluster_name}" + f" in namespace {self._namespace}" + f" at pods resource version >= {resource_version}." + ) + + # Filter pods by cluster_name. + label_selector = requests.utils.quote(f"ray.io/cluster={self._cluster_name}") + + resource_path = f"pods?labelSelector={label_selector}" + if resource_version: + resource_path += ( + f"&resourceVersion={resource_version}" + + "&resourceVersionMatch=NotOlderThan" + ) + + pod_list = self._get(resource_path) + fetched_resource_version = pod_list["metadata"]["resourceVersion"] + logger.info( + f"Fetched pod data at resource version" f" {fetched_resource_version}." + ) + + # Extract node data from the pod list. + cloud_instances = {} + for pod in pod_list["items"]: + # Kubernetes sets metadata.deletionTimestamp immediately after admitting a + # request to delete an object. Full removal of the object may take some time + # after the deletion timestamp is set. See link for details: + # https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-deletion + if "deletionTimestamp" in pod["metadata"]: + # Ignore pods marked for termination. + continue + pod_name = pod["metadata"]["name"] + cloud_instance = self._cloud_instance_from_pod(pod) + if cloud_instance: + cloud_instances[pod_name] = cloud_instance + return cloud_instances + + @staticmethod + def _cloud_instance_from_pod(pod: Dict[str, Any]) -> Optional[CloudInstance]: + """ + Convert a pod to a Ray CloudInstance. + + Args: + pod: The pod resource dict. + """ + labels = pod["metadata"]["labels"] + if labels[KUBERAY_LABEL_KEY_KIND] == KUBERAY_KIND_HEAD: + kind = NodeKind.HEAD + type = labels[KUBERAY_LABEL_KEY_TYPE] + elif labels[KUBERAY_LABEL_KEY_KIND] == KUBERAY_KIND_WORKER: + kind = NodeKind.WORKER + type = labels[KUBERAY_LABEL_KEY_TYPE] + else: + # Other ray nodes types defined by KubeRay. + # e.g. this could also be `redis-cleanup` + # We will not track these nodes. + return None + + # TODO: we should prob get from the pod's env var (RAY_CLOUD_INSTANCE_ID) + # directly. + cloud_instance_id = pod["metadata"]["name"] + return CloudInstance( + cloud_instance_id=cloud_instance_id, + node_type=type, + node_kind=kind, + is_running=KubeRayProvider._is_running(pod), + ) + + @staticmethod + def _is_running(pod) -> bool: + """Convert pod state to Ray NodeStatus + + A cloud instance is considered running if the pod is in the running state, + else it could be pending/containers-terminated. + + When it disappears from the list, it is considered terminated. + """ + if ( + "containerStatuses" not in pod["status"] + or not pod["status"]["containerStatuses"] + ): + return False + + state = pod["status"]["containerStatuses"][0]["state"] + if "running" in state: + return True + + return False + + def _get(self, remote_path: str) -> Dict[str, Any]: + """Get a resource from the Kubernetes API server.""" + return self._k8s_api_client.get(remote_path) + + def _patch(self, remote_path: str, payload: List[Dict[str, Any]]) -> Dict[str, Any]: + """Patch a resource on the Kubernetes API server.""" + return self._k8s_api_client.patch(remote_path, payload) + + def _get_head_pod_resource_version(self) -> str: + """ + Extract a recent pods resource version by reading the head pod's + metadata.resourceVersion of the response. + """ + if not RAY_HEAD_POD_NAME: + return None + pod_resp = self._get(f"pods/{RAY_HEAD_POD_NAME}") + return pod_resp["metadata"]["resourceVersion"] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d472708f03519ed27734caacb3eb06f1c405d5a6 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/__pycache__/cloud_provider.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/__pycache__/cloud_provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7439d6dd7d4c640aba9629f99edecf601d4f3116 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/__pycache__/cloud_provider.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/cloud_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/cloud_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..01c11c35fe7cac0fca41e3b3bbad23c48dcbbaa6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/cloud_providers/read_only/cloud_provider.py @@ -0,0 +1,73 @@ +from typing import Dict, List + +from ray._common.utils import binary_to_hex +from ray._raylet import GcsClient +from ray.autoscaler._private.util import format_readonly_node_type +from ray.autoscaler.v2.instance_manager.node_provider import ( + CloudInstance, + CloudInstanceId, + CloudInstanceProviderError, + ICloudInstanceProvider, + NodeKind, +) +from ray.autoscaler.v2.sdk import get_cluster_resource_state +from ray.autoscaler.v2.utils import is_head_node +from ray.core.generated.autoscaler_pb2 import NodeStatus + + +class ReadOnlyProvider(ICloudInstanceProvider): + """ + A read only provider that use the ray node states from the GCS as the + cloud instances. + + This is used for laptop mode / manual cluster setup modes, in order to + provide status reporting in the same way for users. + """ + + def __init__(self, provider_config: dict): + self._provider_config = provider_config + self._gcs_address = provider_config["gcs_address"] + + self._gcs_client = GcsClient(address=self._gcs_address) + + def get_non_terminated(self) -> Dict[str, CloudInstance]: + cluster_resource_state = get_cluster_resource_state(self._gcs_client) + cloud_instances = {} + for gcs_node_state in cluster_resource_state.node_states: + if gcs_node_state.status == NodeStatus.DEAD: + # Skip dead nodes. + continue + + # Use node's node id if instance id is not available + cloud_instance_id = ( + gcs_node_state.instance_id + if gcs_node_state.instance_id + else binary_to_hex(gcs_node_state.node_id) + ) + + # TODO: we should add a field to the proto to indicate if the node is head + # or not. + is_head = is_head_node(gcs_node_state) + + cloud_instances[cloud_instance_id] = CloudInstance( + cloud_instance_id=cloud_instance_id, + node_kind=NodeKind.HEAD if is_head else NodeKind.WORKER, + node_type=format_readonly_node_type( + binary_to_hex(gcs_node_state.node_id) # Legacy behavior. + ), + is_running=True, + request_id="", + ) + + return cloud_instances + + def terminate(self, instance_id: CloudInstanceId) -> None: + raise NotImplementedError("Cannot terminate instances in read-only mode.") + + def launch( + self, shape: Dict[CloudInstanceId, int], request_id: CloudInstanceId + ) -> None: + raise NotImplementedError("Cannot launch instances in read-only mode.") + + def poll_errors(self) -> List[CloudInstanceProviderError]: + return [] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/common.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/common.py new file mode 100644 index 0000000000000000000000000000000000000000..fa792f29e820b9d75c26f0120cf2de03be94c3ca --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/common.py @@ -0,0 +1,472 @@ +import time +import uuid +from typing import Dict, List, Optional, Set + +from ray.core.generated.instance_manager_pb2 import Instance, InstanceUpdateEvent + + +class InstanceUtil: + """ + A helper class to group updates and operations on an Instance object defined + in instance_manager.proto + """ + + # Memoized reachable from sets, where the key is the instance status, and + # the value is the set of instance status that is reachable from the key + # instance status. + _reachable_from: Optional[ + Dict["Instance.InstanceStatus", Set["Instance.InstanceStatus"]] + ] = None + + @staticmethod + def new_instance( + instance_id: str, + instance_type: str, + status: Instance.InstanceStatus, + details: str = "", + ) -> Instance: + """ + Returns a new instance with the given status. + + Args: + instance_id: The instance id. + instance_type: The instance type. + status: The status of the new instance. + details: The details of the status transition. + """ + instance = Instance() + instance.version = 0 # it will be populated by the underlying storage. + instance.instance_id = instance_id + instance.instance_type = instance_type + instance.status = status + InstanceUtil._record_status_transition(instance, status, details) + return instance + + @staticmethod + def random_instance_id() -> str: + """ + Returns a random instance id. + """ + return str(uuid.uuid4()) + + @staticmethod + def is_cloud_instance_allocated(instance_status: Instance.InstanceStatus) -> bool: + """ + Returns True if the instance is in a status where there could exist + a cloud instance allocated by the cloud provider. + """ + assert instance_status != Instance.UNKNOWN + return instance_status in { + Instance.ALLOCATED, + Instance.RAY_INSTALLING, + Instance.RAY_RUNNING, + Instance.RAY_STOPPING, + Instance.RAY_STOP_REQUESTED, + Instance.RAY_STOPPED, + Instance.TERMINATING, + Instance.RAY_INSTALL_FAILED, + Instance.TERMINATION_FAILED, + } + + @staticmethod + def is_ray_running(instance_status: Instance.InstanceStatus) -> bool: + """ + Returns True if the instance is in a status where the ray process is + running on the cloud instance. + i.e. RAY_RUNNING, RAY_STOP_REQUESTED, RAY_STOPPING + """ + assert instance_status != Instance.UNKNOWN + + if instance_status in InstanceUtil.get_reachable_statuses( + Instance.RAY_STOPPING + ): + return False + + if instance_status in InstanceUtil.get_reachable_statuses(Instance.RAY_RUNNING): + return True + + return False + + @staticmethod + def is_ray_pending(instance_status: Instance.InstanceStatus) -> bool: + """ + Returns True if the instance is in a status where the ray process is + pending to be started on the cloud instance. + + """ + assert instance_status != Instance.UNKNOWN + # Not gonna be in a RAY_RUNNING status. + if Instance.RAY_RUNNING not in InstanceUtil.get_reachable_statuses( + instance_status + ): + return False + + # Already running ray. + if instance_status in InstanceUtil.get_reachable_statuses(Instance.RAY_RUNNING): + return False + + return True + + def is_ray_running_reachable(instance_status: Instance.InstanceStatus) -> bool: + """ + Returns True if the instance is in a status where it may transition + to RAY_RUNNING status. + """ + return Instance.RAY_RUNNING in InstanceUtil.get_reachable_statuses( + instance_status + ) + + @staticmethod + def set_status( + instance: Instance, + new_instance_status: Instance.InstanceStatus, + details: str = "", + ) -> bool: + """Transitions the instance to the new state. + + Args: + instance: The instance to update. + new_instance_status: The new status to transition to. + details: The details of the transition. + + Returns: + True if the status transition is successful, False otherwise. + """ + if ( + new_instance_status + not in InstanceUtil.get_valid_transitions()[instance.status] + ): + return False + instance.status = new_instance_status + InstanceUtil._record_status_transition(instance, new_instance_status, details) + return True + + @staticmethod + def _record_status_transition( + instance: Instance, status: Instance.InstanceStatus, details: str + ): + """Records the status transition. + + Args: + instance: The instance to update. + status: The new status to transition to. + """ + now_ns = time.time_ns() + instance.status_history.append( + Instance.StatusHistory( + instance_status=status, + timestamp_ns=now_ns, + details=details, + ) + ) + + @staticmethod + def has_timeout(instance: Instance, timeout_s: int) -> bool: + """ + Returns True if the instance has been in the current status for more + than the timeout_seconds. + + Args: + instance: The instance to check. + timeout_seconds: The timeout in seconds. + + Returns: + True if the instance has been in the current status for more than + the timeout_s seconds. + """ + cur_status = instance.status + + status_times_ns = InstanceUtil.get_status_transition_times_ns( + instance, select_instance_status=cur_status + ) + assert len(status_times_ns) >= 1, ( + f"instance {instance.instance_id} has {len(status_times_ns)} " + f"{Instance.InstanceStatus.Name(cur_status)} status" + ) + status_time_ns = sorted(status_times_ns)[-1] + if time.time_ns() - status_time_ns <= (timeout_s * 1e9): + return False + + return True + + @staticmethod + def get_valid_transitions() -> Dict[ + "Instance.InstanceStatus", Set["Instance.InstanceStatus"] + ]: + return { + # This is the initial status of a new instance. + Instance.QUEUED: { + # Cloud provider requested to launch a node for the instance. + # This happens when the a launch request is made to the node provider. + Instance.REQUESTED, + }, + # When in this status, a launch request to the node provider is made. + Instance.REQUESTED: { + # Cloud provider allocated a cloud instance for the instance. + # This happens when the cloud instance first appears in the list of + # running cloud instances from the cloud instance provider. + Instance.ALLOCATED, + # Retry the allocation, become queueing again. + Instance.QUEUED, + # Cloud provider fails to allocate one. Either as a timeout or + # the launch request fails immediately. + Instance.ALLOCATION_FAILED, + }, + # When in this status, the cloud instance is allocated and running. This + # happens when the cloud instance is present in node provider's list of + # running cloud instances. + Instance.ALLOCATED: { + # Ray needs to be install and launch on the provisioned cloud instance. + # This happens when the cloud instance is allocated, and the autoscaler + # is responsible for installing and launching ray on the cloud instance. + # For node provider that manages the ray installation and launching, + # this state is skipped. + Instance.RAY_INSTALLING, + # Ray is already installed on the provisioned cloud + # instance. It could be any valid ray status. + Instance.RAY_RUNNING, + Instance.RAY_STOPPING, + Instance.RAY_STOPPED, + # Instance is requested to be stopped, e.g. instance leaked: no matching + # Instance with the same type is found in the autoscaler's state. + Instance.TERMINATING, + # cloud instance somehow failed. + Instance.TERMINATED, + }, + # Ray process is being installed and started on the cloud instance. + # This status is skipped for node provider that manages the ray + # installation and launching. (e.g. Ray-on-Spark) + Instance.RAY_INSTALLING: { + # Ray installed and launched successfully, reported by the ray cluster. + # Similar to the Instance.ALLOCATED -> Instance.RAY_RUNNING transition, + # where the ray process is managed by the node provider. + Instance.RAY_RUNNING, + # Ray installation failed. This happens when the ray process failed to + # be installed and started on the cloud instance. + Instance.RAY_INSTALL_FAILED, + # Wen the ray node is reported as stopped by the ray cluster. + # This could happen that the ray process was stopped quickly after start + # such that a ray running node wasn't discovered and the RAY_RUNNING + # transition was skipped. + Instance.RAY_STOPPED, + # A cloud instance is being terminated (when the instance itself is no + # longer needed, e.g. instance is outdated, autoscaler is scaling down) + Instance.TERMINATING, + # cloud instance somehow failed during the installation process. + Instance.TERMINATED, + }, + # Ray process is installed and running on the cloud instance. When in this + # status, a ray node must be present in the ray cluster. + Instance.RAY_RUNNING: { + # Ray is requested to be stopped. + Instance.RAY_STOP_REQUESTED, + # Ray is stopping (currently draining), + # e.g. idle termination. + Instance.RAY_STOPPING, + # Ray is already stopped, as reported by the ray cluster. + Instance.RAY_STOPPED, + # A cloud instance is being terminated (when the instance itself is no + # longer needed, e.g. instance is outdated, autoscaler is scaling down) + Instance.TERMINATING, + # cloud instance somehow failed. + Instance.TERMINATED, + }, + # Ray process should be stopped on the cloud instance. The RayStopper + # subscriber will listen to this status and stop the ray process. + Instance.RAY_STOP_REQUESTED: { + # Ray is stopping on the cloud instance. + Instance.RAY_STOPPING, + # Ray stopped already. + Instance.RAY_STOPPED, + # Ray stop request failed (e.g. idle node no longer idle), + # ray is still running. + Instance.RAY_RUNNING, + # cloud instance somehow failed. + Instance.TERMINATED, + }, + # When in this status, the ray process is requested to be stopped to the + # ray cluster, but not yet present in the dead ray node list reported by + # the ray cluster. + Instance.RAY_STOPPING: { + # Ray is stopped, and the ray node is present in the dead ray node list + # reported by the ray cluster. + Instance.RAY_STOPPED, + # A cloud instance is being terminated (when the instance itself is no + # longer needed, e.g. instance is outdated, autoscaler is scaling down) + Instance.TERMINATING, + # cloud instance somehow failed. + Instance.TERMINATED, + }, + # When in this status, the ray process is stopped, and the ray node is + # present in the dead ray node list reported by the ray cluster. + Instance.RAY_STOPPED: { + # A cloud instance is being terminated (when the instance itself is no + # longer needed, e.g. instance is outdated, autoscaler is scaling down) + Instance.TERMINATING, + # cloud instance somehow failed. + Instance.TERMINATED, + }, + # When in this status, the cloud instance is requested to be stopped to + # the node provider. + Instance.TERMINATING: { + # When a cloud instance no longer appears in the list of running cloud + # instances from the node provider. + Instance.TERMINATED, + # When the cloud instance failed to be terminated. + Instance.TERMINATION_FAILED, + }, + # When in this status, the cloud instance failed to be terminated by the + # node provider. We will keep retrying. + Instance.TERMINATION_FAILED: { + # Retry the termination, become terminating again. + Instance.TERMINATING, + }, + # Whenever a cloud instance disappears from the list of running cloud + # instances from the node provider, the instance is marked as stopped. Since + # we guarantee 1:1 mapping of a Instance to a cloud instance, this is a + # terminal state. + Instance.TERMINATED: set(), # Terminal state. + # When in this status, the cloud instance failed to be allocated by the + # node provider. + Instance.ALLOCATION_FAILED: set(), # Terminal state. + Instance.RAY_INSTALL_FAILED: { + # Autoscaler requests to shutdown the instance when ray install failed. + Instance.TERMINATING, + # cloud instance somehow failed. + Instance.TERMINATED, + }, + # Initial state before the instance is created. Should never be used. + Instance.UNKNOWN: set(), + } + + @staticmethod + def get_status_transitions( + instance: Instance, + select_instance_status: Optional["Instance.InstanceStatus"] = None, + ) -> List["Instance.StatusHistory"]: + """ + Returns the status history of the instance. + + Args: + instance: The instance. + select_instance_status: The go-to status to search for, i.e. select + only status history when the instance transitions into the status. + If None, returns all status updates. + """ + history = [] + for status_update in instance.status_history: + if ( + select_instance_status + and status_update.instance_status != select_instance_status + ): + continue + history.append(status_update) + return history + + @staticmethod + def get_last_status_transition( + instance: Instance, + select_instance_status: Optional["Instance.InstanceStatus"] = None, + ) -> Optional["Instance.StatusHistory"]: + """ + Returns the last status transition of the instance. + + Args: + instance: The instance. + instance_status: The status to search for. If None, returns the last + status update. + """ + history = InstanceUtil.get_status_transitions(instance, select_instance_status) + history.sort(key=lambda x: x.timestamp_ns) + if history: + return history[-1] + return None + + @staticmethod + def get_status_transition_times_ns( + instance: Instance, + select_instance_status: Optional["Instance.InstanceStatus"] = None, + ) -> List[int]: + """ + Returns a list of timestamps of the instance status update. + + Args: + instance: The instance. + instance_status: The status to search for. If None, returns all + status updates timestamps. + + Returns: + The list of timestamps of the instance status updates. + """ + return [ + e.timestamp_ns + for e in InstanceUtil.get_status_transitions( + instance, select_instance_status + ) + ] + + @classmethod + def get_reachable_statuses( + cls, + instance_status: Instance.InstanceStatus, + ) -> Set["Instance.InstanceStatus"]: + """ + Returns the set of instance status that is reachable from the given + instance status following the status transitions. + This method is memoized. + Args: + instance_status: The instance status to start from. + Returns: + The set of instance status that is reachable from the given instance + status. + """ + if cls._reachable_from is None: + cls._compute_reachable() + return cls._reachable_from[instance_status] + + @staticmethod + def get_log_str_for_update(instance: Instance, update: InstanceUpdateEvent) -> str: + """Returns a log string for the given instance update.""" + if update.upsert: + return ( + f"New instance " + f"{Instance.InstanceStatus.Name(update.new_instance_status)} (id=" + f"{instance.instance_id}, type={instance.instance_type}, " + f"cloud_instance_id={instance.cloud_instance_id}, " + f"ray_id={instance.node_id}): {update.details}" + ) + return ( + f"Update instance " + f"{Instance.InstanceStatus.Name(instance.status)}->" + f"{Instance.InstanceStatus.Name(update.new_instance_status)} (id=" + f"{instance.instance_id}, type={instance.instance_type}, " + f"cloud_instance_id={instance.cloud_instance_id}, " + f"ray_id={instance.node_id}): {update.details}" + ) + + @classmethod + def _compute_reachable(cls): + """ + Computes and memorize the from status sets for each status machine with + a DFS search. + """ + valid_transitions = cls.get_valid_transitions() + + def dfs(graph, start, visited): + """ + Regular DFS algorithm to find all reachable nodes from a given node. + """ + for next_node in graph[start]: + if next_node not in visited: + # We delay adding the visited set here so we could capture + # the self loop. + visited.add(next_node) + dfs(graph, next_node, visited) + return visited + + # Initialize the graphs + cls._reachable_from = {} + for status in Instance.InstanceStatus.values(): + # All nodes reachable from 'start' + visited = set() + cls._reachable_from[status] = dfs(valid_transitions, status, visited) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/config.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/config.py new file mode 100644 index 0000000000000000000000000000000000000000..ef329f804e71d2f3d655dbc86ff3d73cf4cf4ce5 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/config.py @@ -0,0 +1,545 @@ +import copy +import logging +from abc import ABC, abstractmethod +from dataclasses import dataclass, field +from enum import Enum +from pathlib import Path +from typing import Any, Dict, List, Optional + +import yaml + +from ray._private.ray_constants import env_integer +from ray._common.utils import binary_to_hex +from ray._raylet import GcsClient +from ray.autoscaler._private.constants import ( + AUTOSCALER_MAX_CONCURRENT_LAUNCHES, + DEFAULT_UPSCALING_SPEED, + DISABLE_LAUNCH_CONFIG_CHECK_KEY, + DISABLE_NODE_UPDATERS_KEY, +) +from ray.autoscaler._private.kuberay.autoscaling_config import AutoscalingConfigProducer +from ray.autoscaler._private.monitor import BASE_READONLY_CONFIG +from ray.autoscaler._private.util import ( + format_readonly_node_type, + hash_launch_conf, + hash_runtime_conf, + prepare_config, + validate_config, +) +from ray.autoscaler.v2.schema import NodeType +from ray.autoscaler.v2.sdk import get_cluster_resource_state +from ray.autoscaler.v2.utils import is_head_node + +logger = logging.getLogger(__name__) + + +class Provider(Enum): + UNKNOWN = 0 + ALIYUN = 1 + AWS = 2 + AZURE = 3 + GCP = 4 + KUBERAY = 5 + LOCAL = 6 + READ_ONLY = 7 + + +class IConfigReader(ABC): + """An interface for reading Autoscaling config. + + A utility class that reads autoscaling configs from various sources: + - File + - In-memory dict + - Remote config service (e.g. KubeRay's config) + + Example: + reader = FileConfigReader("path/to/config.yaml") + # Get the recently cached config. + config = reader.get_cached_autoscaling_config() + + ... + # Refresh the cached config. + reader.refresh_cached_autoscaling_config() + config = reader.get_cached_autoscaling_config() + + """ + + @abstractmethod + def get_cached_autoscaling_config(self) -> "AutoscalingConfig": + """Returns the recently read autoscaling config. + + Returns: + AutoscalingConfig: The recently read autoscaling config. + """ + pass + + @abstractmethod + def refresh_cached_autoscaling_config(self): + """Read the config from the source.""" + pass + + +@dataclass(frozen=True) +class InstanceReconcileConfig: + # The timeout for waiting for a REQUESTED instance to be ALLOCATED. + request_status_timeout_s: int = env_integer( + "RAY_AUTOSCALER_RECONCILE_REQUEST_STATUS_TIMEOUT_S", 10 * 60 + ) + # The timeout for waiting for a ALLOCATED instance to be RAY_RUNNING. + allocate_status_timeout_s: int = env_integer( + "RAY_AUTOSCALER_RECONCILE_ALLOCATE_STATUS_TIMEOUT_S", 300 + ) + # The timeout for waiting for a RAY_INSTALLING instance to be RAY_RUNNING. + ray_install_status_timeout_s: int = env_integer( + "RAY_AUTOSCALER_RECONCILE_RAY_INSTALL_STATUS_TIMEOUT_S", 30 * 60 + ) + # The timeout for waiting for a TERMINATING instance to be TERMINATED. + terminating_status_timeout_s: int = env_integer( + "RAY_AUTOSCALER_RECONCILE_TERMINATING_STATUS_TIMEOUT_S", 300 + ) + # The timeout for waiting for a RAY_STOP_REQUESTED instance + # to be RAY_STOPPING or RAY_STOPPED. + ray_stop_requested_status_timeout_s: int = env_integer( + "RAY_AUTOSCALER_RECONCILE_RAY_STOP_REQUESTED_STATUS_TIMEOUT_S", 300 + ) + # The interval for raise a warning when an instance in transient status + # is not updated for a long time. + transient_status_warn_interval_s: int = env_integer( + "RAY_AUTOSCALER_RECONCILE_TRANSIENT_STATUS_WARN_INTERVAL_S", 90 + ) + # The number of times to retry requesting to allocate an instance. + max_num_retry_request_to_allocate: int = env_integer( + "RAY_AUTOSCALER_RECONCILE_MAX_NUM_RETRY_REQUEST_TO_ALLOCATE", 3 + ) + + +@dataclass +class NodeTypeConfig: + """ + NodeTypeConfig is the helper class to provide node type specific configs. + This maps to subset of the `available_node_types` field in the + autoscaling config. + """ + + # Node type name + name: NodeType + # The minimal number of worker nodes to be launched for this node type. + min_worker_nodes: int + # The maximal number of worker nodes can be launched for this node type. + max_worker_nodes: int + # Idle timeout seconds for worker nodes of this node type. + idle_timeout_s: Optional[float] = None + # The total resources on the node. + resources: Dict[str, float] = field(default_factory=dict) + # The labels on the node. + labels: Dict[str, str] = field(default_factory=dict) + # The node config's launch config hash. It's calculated from the auth + # config, and the node's config in the `AutoscalingConfig` for the node + # type when launching the node. It's used to detect config changes. + launch_config_hash: str = "" + + def __post_init__(self): + assert self.min_worker_nodes <= self.max_worker_nodes + assert self.min_worker_nodes >= 0 + + +class AutoscalingConfig: + """ + AutoscalingConfig is the helper class to provide autoscaling + related configs. + + # TODO(rickyx): + 1. Move the config validation logic here. + 2. Deprecate the ray-schema.json for validation because it's + static thus not possible to validate the config with interdependency + of each other. + """ + + def __init__( + self, + configs: Dict[str, Any], + skip_content_hash: bool = False, + ) -> None: + """ + Args: + configs : The raw configs dict. + skip_content_hash : + Whether to skip file mounts/ray command hash calculation. + """ + self._sync_continuously = False + self.update_configs(configs, skip_content_hash) + + def update_configs(self, configs: Dict[str, Any], skip_content_hash: bool) -> None: + self._configs = prepare_config(configs) + validate_config(self._configs) + if skip_content_hash: + return + self._calculate_hashes() + self._sync_continuously = self._configs.get( + "generate_file_mounts_contents_hash", True + ) + + def _calculate_hashes(self) -> None: + logger.info("Calculating hashes for file mounts and ray commands.") + self._runtime_hash, self._file_mounts_contents_hash = hash_runtime_conf( + self._configs.get("file_mounts", {}), + self._configs.get("cluster_synced_files", []), + [ + self._configs.get("worker_setup_commands", []), + self._configs.get("worker_start_ray_commands", []), + ], + generate_file_mounts_contents_hash=self._configs.get( + "generate_file_mounts_contents_hash", True + ), + ) + + def get_cloud_node_config(self, ray_node_type: NodeType) -> Dict[str, Any]: + return copy.deepcopy( + self.get_node_type_specific_config(ray_node_type, "node_config") or {} + ) + + def get_docker_config(self, ray_node_type: NodeType) -> Dict[str, Any]: + """ + Return the docker config for the specified node type. + If it's a head node, the image will be chosen in the following order: + 1. Node specific docker image. + 2. The 'docker' config's 'head_image' field. + 3. The 'docker' config's 'image' field. + If it's a worker node, the image will be chosen in the following order: + 1. Node specific docker image. + 2. The 'docker' config's 'worker_image' field. + 3. The 'docker' config's 'image' field. + """ + # TODO(rickyx): It's unfortunate we have multiple fields in ray-schema.json + # that can specify docker images. We should consolidate them. + docker_config = copy.deepcopy(self._configs.get("docker", {})) + node_specific_docker_config = self._configs["available_node_types"][ + ray_node_type + ].get("docker", {}) + # Override the global docker config with node specific docker config. + docker_config.update(node_specific_docker_config) + + if self._configs.get("head_node_type") == ray_node_type: + if "head_image" in docker_config: + logger.info( + "Overwriting image={} by head_image({}) for head node docker.".format( # noqa: E501 + docker_config["image"], docker_config["head_image"] + ) + ) + docker_config["image"] = docker_config["head_image"] + else: + if "worker_image" in docker_config: + logger.info( + "Overwriting image={} by worker_image({}) for worker node docker.".format( # noqa: E501 + docker_config["image"], docker_config["worker_image"] + ) + ) + docker_config["image"] = docker_config["worker_image"] + + # These fields should be merged. + docker_config.pop("head_image", None) + docker_config.pop("worker_image", None) + return docker_config + + def get_worker_start_ray_commands(self) -> List[str]: + return self._configs.get("worker_start_ray_commands", []) + + def get_head_setup_commands(self) -> List[str]: + return self._configs.get("head_setup_commands", []) + + def get_head_start_ray_commands(self) -> List[str]: + return self._configs.get("head_start_ray_commands", []) + + def get_worker_setup_commands(self, ray_node_type: NodeType) -> List[str]: + """ + Return the worker setup commands for the specified node type. + + If the node type specific worker setup commands are not specified, + return the global worker setup commands. + """ + worker_setup_command = self.get_node_type_specific_config( + ray_node_type, "worker_setup_commands" + ) + if worker_setup_command is None: + # Return global worker setup commands if node type specific + # worker setup commands are not specified. + logger.info( + "Using global worker setup commands for {}".format(ray_node_type) + ) + return self._configs.get("worker_setup_commands", []) + return worker_setup_command + + def get_initialization_commands(self, ray_node_type: NodeType) -> List[str]: + """ + Return the initialization commands for the specified node type. + + If the node type specific initialization commands are not specified, + return the global initialization commands. + """ + initialization_command = self.get_node_type_specific_config( + ray_node_type, "initialization_commands" + ) + if initialization_command is None: + logger.info( + "Using global initialization commands for {}".format(ray_node_type) + ) + return self._configs.get("initialization_commands", []) + return initialization_command + + def get_node_type_specific_config( + self, ray_node_type: NodeType, config_name: str + ) -> Optional[Any]: + node_specific_config = self._configs["available_node_types"].get( + ray_node_type, {} + ) + return node_specific_config.get(config_name, None) + + def get_node_resources(self, ray_node_type: NodeType) -> Dict[str, float]: + return copy.deepcopy( + self.get_node_type_specific_config(ray_node_type, "resources") or {} + ) + + def get_node_labels(self, ray_node_type: NodeType) -> Dict[str, str]: + return copy.deepcopy( + self.get_node_type_specific_config(ray_node_type, "labels") or {} + ) + + def get_config(self, config_name, default=None) -> Any: + return self._configs.get(config_name, default) + + def get_provider_instance_type(self, ray_node_type: NodeType) -> str: + provider = self.provider + node_config = self.get_node_type_specific_config(ray_node_type, "node_config") + if provider in [Provider.AWS, Provider.ALIYUN]: + return node_config.get("InstanceType", "") + elif provider == Provider.AZURE: + return node_config.get("azure_arm_parameters", {}).get("vmSize", "") + elif provider == Provider.GCP: + return node_config.get("machineType", "") + elif provider in [Provider.KUBERAY, Provider.LOCAL, Provider.UNKNOWN]: + return "" + else: + raise ValueError(f"Unknown provider {provider}") + + def get_node_type_configs(self) -> Dict[NodeType, NodeTypeConfig]: + """ + Returns the node type configs from the `available_node_types` field. + + Returns: + Dict[NodeType, NodeTypeConfig]: The node type configs. + """ + available_node_types = self._configs.get("available_node_types", {}) + if not available_node_types: + return None + node_type_configs = {} + auth_config = self._configs.get("auth", {}) + head_node_type = self.get_head_node_type() + assert head_node_type + for node_type, node_config in available_node_types.items(): + launch_config_hash = hash_launch_conf( + node_config.get("node_config", {}), auth_config + ) + max_workers_nodes = node_config.get("max_workers", 0) + if head_node_type == node_type: + max_workers_nodes += 1 + + node_type_configs[node_type] = NodeTypeConfig( + name=node_type, + min_worker_nodes=node_config.get("min_workers", 0), + max_worker_nodes=max_workers_nodes, + idle_timeout_s=node_config.get("idle_timeout_s", None), + resources=node_config.get("resources", {}), + labels=node_config.get("labels", {}), + launch_config_hash=launch_config_hash, + ) + return node_type_configs + + def get_head_node_type(self) -> NodeType: + """ + Returns the head node type. + + If there is only one node type, return the only node type as the head + node type. + If there are multiple node types, return the head node type specified + in the config. + """ + available_node_types = self._configs.get("available_node_types", {}) + if len(available_node_types) == 1: + return list(available_node_types.keys())[0] + return self._configs.get("head_node_type") + + def get_max_num_worker_nodes(self) -> Optional[int]: + return self.get_config("max_workers", None) + + def get_max_num_nodes(self) -> Optional[int]: + max_num_workers = self.get_max_num_worker_nodes() + if max_num_workers is not None: + return max_num_workers + 1 # For head node + return None + + def get_raw_config_mutable(self) -> Dict[str, Any]: + return self._configs + + def get_upscaling_speed(self) -> float: + return self.get_config("upscaling_speed", DEFAULT_UPSCALING_SPEED) + + def get_max_concurrent_launches(self) -> int: + return AUTOSCALER_MAX_CONCURRENT_LAUNCHES + + def disable_node_updaters(self) -> bool: + provider_config = self._configs.get("provider", {}) + return provider_config.get(DISABLE_NODE_UPDATERS_KEY, False) + + def get_idle_timeout_s(self) -> Optional[float]: + """ + Returns the idle timeout in seconds if present in config, otherwise None. + """ + idle_timeout_s = self.get_config("idle_timeout_minutes", None) + return idle_timeout_s * 60 if idle_timeout_s is not None else None + + def disable_launch_config_check(self) -> bool: + provider_config = self.get_provider_config() + return provider_config.get(DISABLE_LAUNCH_CONFIG_CHECK_KEY, True) + + def get_instance_reconcile_config(self) -> InstanceReconcileConfig: + # TODO(rickyx): we need a way to customize these configs, + # either extending the current ray-schema.json, or just use another + # schema validation paths. + return InstanceReconcileConfig() + + def get_provider_config(self) -> Dict[str, Any]: + return self._configs.get("provider", {}) + + def dump(self) -> str: + return yaml.safe_dump(self._configs) + + @property + def provider(self) -> Provider: + provider_str = self._configs.get("provider", {}).get("type", "") + if provider_str == "local": + return Provider.LOCAL + elif provider_str == "aws": + return Provider.AWS + elif provider_str == "azure": + return Provider.AZURE + elif provider_str == "gcp": + return Provider.GCP + elif provider_str == "aliyun": + return Provider.ALIYUN + elif provider_str == "kuberay": + return Provider.KUBERAY + elif provider_str == "readonly": + return Provider.READ_ONLY + else: + return Provider.UNKNOWN + + @property + def runtime_hash(self) -> str: + if not hasattr(self, "_runtime_hash"): + self._calculate_hashes() + return self._runtime_hash + + @property + def file_mounts_contents_hash(self) -> str: + if not hasattr(self, "_file_mounts_contents_hash"): + self._calculate_hashes() + return self._file_mounts_contents_hash + + +class FileConfigReader(IConfigReader): + """A class that reads cluster config from a yaml file.""" + + def __init__(self, config_file: str, skip_content_hash: bool = True) -> None: + """ + Args: + config_file: The path to the config file. + skip_content_hash: Whether to skip file mounts/ray command + hash calculation. Default to True. + """ + self._config_file_path = Path(config_file).resolve() + self._skip_content_hash = skip_content_hash + self._cached_config = self._read() + + def _read(self) -> AutoscalingConfig: + with open(self._config_file_path) as f: + config = yaml.safe_load(f.read()) + return AutoscalingConfig(config, skip_content_hash=self._skip_content_hash) + + def get_cached_autoscaling_config(self) -> AutoscalingConfig: + """ + Returns: + AutoscalingConfig: The autoscaling config. + """ + + return self._cached_config + + def refresh_cached_autoscaling_config(self): + self._cached_config = self._read() + + +class KubeRayConfigReader(IConfigReader): + """A class that reads cluster config from a K8s RayCluster CR.""" + + def __init__(self, config_producer: AutoscalingConfigProducer): + self._config_producer = config_producer + self._cached_config = self._generate_configs_from_k8s() + + def _generate_configs_from_k8s(self) -> AutoscalingConfig: + return AutoscalingConfig(self._config_producer()) + + def get_cached_autoscaling_config(self) -> AutoscalingConfig: + """ + Returns: + AutoscalingConfig: The autoscaling config. + """ + return self._cached_config + + def refresh_cached_autoscaling_config(self): + """ + Reads the configs from the K8s RayCluster CR. + + This reads from the K8s API server every time to pick up changes. + """ + self._cached_config = self._generate_configs_from_k8s() + + +class ReadOnlyProviderConfigReader(IConfigReader): + """A class that reads cluster config for a read-only provider. + + This is used for laptop mode / manual cluster setup modes, in order to + provide status reporting in the same way for users.""" + + def __init__(self, gcs_address: str): + self._configs = BASE_READONLY_CONFIG + self._gcs_client = GcsClient(address=gcs_address) + + def refresh_cached_autoscaling_config(self) -> AutoscalingConfig: + # Update the config with node types from GCS. + ray_cluster_resource_state = get_cluster_resource_state(self._gcs_client) + + # Format each node type's config from the running nodes. + available_node_types = {} + + head_node_type = None + for node_state in ray_cluster_resource_state.node_states: + node_type = format_readonly_node_type(binary_to_hex(node_state.node_id)) + if is_head_node(node_state): + head_node_type = node_type + + available_node_types[node_type] = { + "resources": dict(node_state.total_resources), + "min_workers": 0, + "max_workers": 0 if is_head_node(node_state) else 1, + "node_config": {}, + } + if available_node_types: + self._configs["available_node_types"].update(available_node_types) + self._configs["max_workers"] = len(available_node_types) + assert head_node_type, "Head node type should be found." + self._configs["head_node_type"] = head_node_type + + # Don't idle terminated nodes in read-only mode. + self._configs.pop("idle_timeout_minutes", None) + + def get_cached_autoscaling_config(self) -> AutoscalingConfig: + return AutoscalingConfig(self._configs, skip_content_hash=True) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/instance_manager.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/instance_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..bff1fb9b6d2da30abf2c44e33b9a392be28859d0 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/instance_manager.py @@ -0,0 +1,271 @@ +import logging +from abc import ABC, abstractmethod +from typing import List, Optional + +from ray.autoscaler.v2.instance_manager.common import InstanceUtil +from ray.autoscaler.v2.instance_manager.instance_storage import InstanceStorage +from ray.core.generated.instance_manager_pb2 import ( + GetInstanceManagerStateReply, + GetInstanceManagerStateRequest, + Instance, + InstanceUpdateEvent, + NodeKind, + StatusCode, + UpdateInstanceManagerStateReply, + UpdateInstanceManagerStateRequest, +) + +logger = logging.getLogger(__name__) + + +class InstanceUpdatedSubscriber(ABC): + """Subscribers to instance status changes.""" + + @abstractmethod + def notify(self, events: List[InstanceUpdateEvent]) -> None: + pass + + +class InstanceManager: + """ + See `InstanceManagerService` in instance_manager.proto + + This handles updates to an instance, or inserts a new instance if + it's an insert update. We should only be inserting new instances + of the below statuses: + 1. ALLOCATED: For unmanaged instance not initialized by InstanceManager, + e.g. head node + 2. QUEUED: For new instance being queued to launch. + 3. TERMINATING: For leaked cloud instance that needs to be terminated. + + For full status transitions, see: + https://docs.google.com/document/d/1NzQjA8Mh-oMc-QxXOa529oneWCoA8sDiVoNkBqqDb4U/edit#heading=h.k9a1sp4qpqj4 + + Not thread safe, should be used as a singleton. + """ + + def __init__( + self, + instance_storage: InstanceStorage, + instance_status_update_subscribers: Optional[List[InstanceUpdatedSubscriber]], + ): + self._instance_storage = instance_storage + self._status_update_subscribers = instance_status_update_subscribers or [] + + def update_instance_manager_state( + self, request: UpdateInstanceManagerStateRequest + ) -> UpdateInstanceManagerStateReply: + """ + Updates the instance manager state. + + If there's any failure, no updates would be made and the reply + would contain the latest version of the instance manager state, + and the error info. + + Args: + request: The request to update the instance manager state. + + Returns: + The reply to the request. + """ + + # Handle updates + ids_to_updates = {update.instance_id: update for update in request.updates} + to_update_instances, version = self._instance_storage.get_instances( + instance_ids=ids_to_updates.keys() + ) + + if request.expected_version >= 0 and request.expected_version != version: + err_str = ( + f"Version mismatch: expected: {request.expected_version}, " + f"actual: {version}" + ) + logger.warning(err_str) + return self._get_update_im_state_reply( + StatusCode.VERSION_MISMATCH, + version, + err_str, + ) + + # Handle instances states update. + to_upsert_instances = [] + for instance_id, update in ids_to_updates.items(): + if instance_id in to_update_instances: + instance = self._update_instance( + to_update_instances[instance_id], update + ) + else: + instance = self._create_instance(update) + + to_upsert_instances.append(instance) + + # Updates the instance storage. + result = self._instance_storage.batch_upsert_instances( + updates=to_upsert_instances, + expected_storage_version=version, + ) + + if not result.success: + if result.version != version: + err_str = ( + f"Version mismatch: expected: {version}, actual: {result.version}" + ) + logger.warning(err_str) + return self._get_update_im_state_reply( + StatusCode.VERSION_MISMATCH, result.version, err_str + ) + else: + err_str = "Failed to update instance storage." + logger.error(err_str) + return self._get_update_im_state_reply( + StatusCode.UNKNOWN_ERRORS, result.version, err_str + ) + + # Successful updates. + for subscriber in self._status_update_subscribers: + subscriber.notify(request.updates) + + return self._get_update_im_state_reply(StatusCode.OK, result.version) + + def get_instance_manager_state( + self, request: GetInstanceManagerStateRequest + ) -> GetInstanceManagerStateReply: + """ + Gets the instance manager state. + + Args: + request: The request to get the instance manager state. + + Returns: + The reply to the request. + """ + reply = GetInstanceManagerStateReply() + instances, version = self._instance_storage.get_instances() + reply.state.instances.extend(instances.values()) + reply.state.version = version + reply.status.code = StatusCode.OK + + return reply + + ######################################### + # Private methods + ######################################### + + @staticmethod + def _get_update_im_state_reply( + status_code: StatusCode, version: int, error_message: str = "" + ) -> UpdateInstanceManagerStateReply: + """ + Returns a UpdateInstanceManagerStateReply with the given status code and + version. + + Args: + status_code: The status code. + version: The version. + error_message: The error message if any. + + Returns: + The reply. + """ + reply = UpdateInstanceManagerStateReply() + reply.status.code = status_code + reply.version = version + if error_message: + reply.status.message = error_message + return reply + + @staticmethod + def _apply_update(instance: Instance, update: InstanceUpdateEvent): + """ + Apply status specific update to the instance. + + Args: + instance: The instance to update. + update: The update to apply. + """ + if update.new_instance_status == Instance.ALLOCATED: + assert ( + update.cloud_instance_id + ), "ALLOCATED update must have cloud_instance_id" + assert update.node_kind in [ + NodeKind.WORKER, + NodeKind.HEAD, + ], "ALLOCATED update must have node_kind as WORKER or HEAD" + assert update.instance_type, "ALLOCATED update must have instance_type" + assert ( + update.cloud_instance_id + ), "ALLOCATED update must have cloud_instance_id" + instance.cloud_instance_id = update.cloud_instance_id + instance.node_kind = update.node_kind + instance.instance_type = update.instance_type + instance.node_id = update.ray_node_id + elif update.new_instance_status == Instance.RAY_RUNNING: + assert update.ray_node_id, "RAY_RUNNING update must have ray_node_id" + instance.node_id = update.ray_node_id + elif update.new_instance_status == Instance.REQUESTED: + assert ( + update.launch_request_id + ), "REQUESTED update must have launch_request_id" + assert update.instance_type, "REQUESTED update must have instance_type" + instance.launch_request_id = update.launch_request_id + instance.instance_type = update.instance_type + elif update.new_instance_status == Instance.TERMINATING: + assert ( + update.cloud_instance_id + ), "TERMINATING update must have cloud instance id" + + @staticmethod + def _create_instance(update: InstanceUpdateEvent) -> Instance: + """ + Create a new instance from the given update. + """ + + assert update.upsert, "upsert must be true for creating new instance." + + assert update.new_instance_status in [ + # For unmanaged instance not initialized by InstanceManager, + # e.g. head node + Instance.ALLOCATED, + # For new instance being queued to launch. + Instance.QUEUED, + # For leaked cloud instance that needs to be terminated. + Instance.TERMINATING, + ], ( + "Invalid status for new instance, must be one of " + "[ALLOCATED, QUEUED, TERMINATING]" + ) + + # Create a new instance first for common fields. + instance = InstanceUtil.new_instance( + instance_id=update.instance_id, + instance_type=update.instance_type, + status=update.new_instance_status, + details=update.details, + ) + + # Apply the status specific updates. + logger.info(InstanceUtil.get_log_str_for_update(instance, update)) + InstanceManager._apply_update(instance, update) + return instance + + @staticmethod + def _update_instance(instance: Instance, update: InstanceUpdateEvent) -> Instance: + """ + Update the instance with the given update. + + Args: + instance: The instance to update. + update: The update to apply. + + Returns: + The updated instance. + """ + logger.info(InstanceUtil.get_log_str_for_update(instance, update)) + assert InstanceUtil.set_status(instance, update.new_instance_status), ( + "Invalid status transition from " + f"{Instance.InstanceStatus.Name(instance.status)} to " + f"{Instance.InstanceStatus.Name(update.new_instance_status)}" + ) + InstanceManager._apply_update(instance, update) + + return instance diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/instance_storage.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/instance_storage.py new file mode 100644 index 0000000000000000000000000000000000000000..645cd1eb904a83478f01803fd652ad82b4cb1b39 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/instance_storage.py @@ -0,0 +1,151 @@ +import copy +import logging +from typing import Dict, List, Optional, Set, Tuple + +from ray.autoscaler.v2.instance_manager.storage import Storage, StoreStatus +from ray.core.generated.instance_manager_pb2 import Instance + +logger = logging.getLogger(__name__) + + +class InstanceStorage: + """Instance storage stores the states of instances in the storage.""" + + def __init__( + self, + cluster_id: str, + storage: Storage, + ) -> None: + self._storage = storage + self._cluster_id = cluster_id + self._table_name = f"instance_table@{cluster_id}" + + def batch_upsert_instances( + self, + updates: List[Instance], + expected_storage_version: Optional[int] = None, + ) -> StoreStatus: + """Upsert instances into the storage. If the instance already exists, + it will be updated. Otherwise, it will be inserted. If the + expected_storage_version is specified, the update will fail if the + current storage version does not match the expected version. + + Note the version of the upserted instances will be set to the current + storage version. + + Args: + updates: A list of instances to be upserted. + expected_storage_version: The expected storage version. + + Returns: + StoreStatus: A tuple of (success, storage_version). + """ + mutations = {} + version = self._storage.get_version() + # handle version mismatch + if expected_storage_version and expected_storage_version != version: + return StoreStatus(False, version) + + for instance in updates: + instance = copy.deepcopy(instance) + # the instance version is set to 0, it will be + # populated by the storage entry's verion on read + instance.version = 0 + mutations[instance.instance_id] = instance.SerializeToString() + + result, version = self._storage.batch_update( + self._table_name, mutations, {}, expected_storage_version + ) + + return StoreStatus(result, version) + + def upsert_instance( + self, + instance: Instance, + expected_instance_version: Optional[int] = None, + expected_storage_verison: Optional[int] = None, + ) -> StoreStatus: + """Upsert an instance in the storage. + If the expected_instance_version is specified, the update will fail + if the current instance version does not match the expected version. + Similarly, if the expected_storage_version is + specified, the update will fail if the current storage version does not + match the expected version. + + Note the version of the upserted instances will be set to the current + storage version. + + Args: + instance: The instance to be updated. + expected_instance_version: The expected instance version. + expected_storage_version: The expected storage version. + + Returns: + StoreStatus: A tuple of (success, storage_version). + """ + instance = copy.deepcopy(instance) + # the instance version is set to 0, it will be + # populated by the storage entry's verion on read + instance.version = 0 + result, version = self._storage.update( + self._table_name, + key=instance.instance_id, + value=instance.SerializeToString(), + expected_entry_version=expected_instance_version, + expected_storage_version=expected_storage_verison, + insert_only=False, + ) + + return StoreStatus(result, version) + + def get_instances( + self, + instance_ids: List[str] = None, + status_filter: Set[int] = None, + ) -> Tuple[Dict[str, Instance], int]: + """Get instances from the storage. + + Args: + instance_ids: A list of instance ids to be retrieved. If empty, all + instances will be retrieved. + status_filter: Only instances with the specified status will be returned. + + Returns: + Tuple[Dict[str, Instance], int]: A tuple of (instances, version). + The instances is a dictionary of (instance_id, instance) pairs. + """ + instance_ids = instance_ids or [] + status_filter = status_filter or set() + pairs, version = self._storage.get(self._table_name, instance_ids) + instances = {} + for instance_id, (instance_data, entry_version) in pairs.items(): + instance = Instance() + instance.ParseFromString(instance_data) + instance.version = entry_version + if status_filter and instance.status not in status_filter: + continue + instances[instance_id] = instance + return instances, version + + def batch_delete_instances( + self, instance_ids: List[str], expected_storage_version: Optional[int] = None + ) -> StoreStatus: + """Delete instances from the storage. If the expected_version is + specified, the update will fail if the current storage version does not + match the expected version. + + Args: + to_delete: A list of instances to be deleted. + expected_version: The expected storage version. + + Returns: + StoreStatus: A tuple of (success, storage_version). + """ + version = self._storage.get_version() + if expected_storage_version and expected_storage_version != version: + return StoreStatus(False, version) + + result = self._storage.batch_update( + self._table_name, {}, instance_ids, expected_storage_version + ) + return result diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/node_provider.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/node_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..263af5dc35217a0bd9a5cbf7271a7df0c93a3696 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/node_provider.py @@ -0,0 +1,529 @@ +import logging +import math +import time +from abc import ABC, abstractmethod +from concurrent.futures import ThreadPoolExecutor +from dataclasses import dataclass +from queue import Queue +from typing import Any, Dict, List, Optional + +from ray.autoscaler._private.constants import ( + AUTOSCALER_MAX_CONCURRENT_LAUNCHES, + AUTOSCALER_MAX_LAUNCH_BATCH, +) +from ray.autoscaler._private.util import hash_launch_conf +from ray.autoscaler.node_provider import NodeProvider as NodeProviderV1 +from ray.autoscaler.tags import ( + NODE_KIND_HEAD, + NODE_KIND_UNMANAGED, + NODE_KIND_WORKER, + STATUS_UNINITIALIZED, + TAG_RAY_LAUNCH_CONFIG, + TAG_RAY_LAUNCH_REQUEST, + TAG_RAY_NODE_KIND, + TAG_RAY_NODE_NAME, + TAG_RAY_NODE_STATUS, + TAG_RAY_USER_NODE_TYPE, +) +from ray.autoscaler.v2.instance_manager.config import IConfigReader +from ray.autoscaler.v2.schema import NodeType +from ray.core.generated.instance_manager_pb2 import NodeKind + +logger = logging.getLogger(__name__) + +# Type Alias. This is a **unique identifier** for a cloud instance in the cluster. +# The provider should guarantee that this id is unique across the cluster, +# such that: +# - When a cloud instance is created and running, no other cloud instance in the +# cluster has the same id. +# - When a cloud instance is terminated, no other cloud instance in the cluster will +# be assigned the same id later. +CloudInstanceId = str + + +@dataclass +class CloudInstance: + """ + A class that represents a cloud instance in the cluster, with necessary metadata + of the cloud instance. + """ + + # The cloud instance id. + cloud_instance_id: CloudInstanceId + # The node type of the cloud instance. + node_type: NodeType + # The node kind, i.e head or worker. + node_kind: NodeKind + # If the cloud instance is already running. + is_running: bool + # Update request id from which the cloud instance is launched. + # This could be None if the cloud instance couldn't be associated with requests + # by the cloud provider: e.g. cloud provider doesn't support per-instance + # extra metadata. + # This is fine for now since the reconciler should be able to know how + # to handle cloud instances w/o request ids. + # TODO: make this a required field. + request_id: Optional[str] = None + + +class CloudInstanceProviderError(Exception): + """ + An base error class that represents an error that happened in the cloud instance + provider. + """ + + # The timestamp of the error occurred in nanoseconds. + timestamp_ns: int + + def __init__(self, msg, timestamp_ns) -> None: + super().__init__(msg) + self.timestamp_ns = timestamp_ns + + +class LaunchNodeError(CloudInstanceProviderError): + # The node type that failed to launch. + node_type: NodeType + # Number of nodes that failed to launch. + count: int + # A unique id that identifies from which update request the error originates. + request_id: str + + def __init__( + self, + node_type: NodeType, + count: int, + request_id: str, + timestamp_ns: int, + details: str = "", + cause: Optional[Exception] = None, + ) -> None: + msg = ( + f"Failed to launch {count} nodes of type {node_type} with " + f"request id {request_id}: {details}" + ) + super().__init__(msg, timestamp_ns=timestamp_ns) + self.node_type = node_type + self.count = count + self.request_id = request_id + if cause: + self.__cause__ = cause + + def __repr__(self) -> str: + return ( + f"LaunchNodeError(node_type={self.node_type}, count={self.count}, " + f"request_id={self.request_id}): {self.__cause__}" + ) + + +class TerminateNodeError(CloudInstanceProviderError): + # The cloud instance id of the node that failed to terminate. + cloud_instance_id: CloudInstanceId + # A unique id that identifies from which update request the error originates. + request_id: str + + def __init__( + self, + cloud_instance_id: CloudInstanceId, + request_id: str, + timestamp_ns: int, + details: str = "", + cause: Optional[Exception] = None, + ) -> None: + msg = ( + f"Failed to terminate node {cloud_instance_id} with " + f"request id {request_id}: {details}" + ) + super().__init__(msg, timestamp_ns=timestamp_ns) + self.cloud_instance_id = cloud_instance_id + self.request_id = request_id + if cause: + self.__cause__ = cause + + def __repr__(self) -> str: + return ( + f"TerminateNodeError(cloud_instance_id={self.cloud_instance_id}, " + f"request_id={self.request_id}): {self.__cause__}" + ) + + +class ICloudInstanceProvider(ABC): + """ + The interface for a cloud instance provider. + + This interface is a minimal interface that should be implemented by the + various cloud instance providers (e.g. AWS, and etc). + + The cloud instance provider is responsible for managing the cloud instances in the + cluster. It provides the following main functionalities: + - Launch new cloud instances. + - Terminate existing running instances. + - Get the non-terminated cloud instances in the cluster. + - Poll the errors that happened for the updates to the cloud instance provider. + + Below properties of the cloud instance provider are assumed with this interface: + + 1. Eventually consistent + The cloud instance provider is expected to be eventually consistent with the + cluster state. For example, when a cloud instance is request to be terminated + or launched, the provider may not immediately reflect the change in its state. + However, the provider is expected to eventually reflect the change in its state. + + 2. Asynchronous + The provider could also be asynchronous, where the termination/launch + request may not immediately return the result of the request. + + 3. Unique cloud instance ids + Cloud instance ids are expected to be unique across the cluster. + + 4. Idempotent updates + For the update APIs (e.g. ensure_min_nodes, terminate), the provider may use the + request ids to provide idempotency. + + Usage: + ``` + provider: ICloudInstanceProvider = ... + + # Update the cluster with a desired shape. + provider.launch( + shape={ + "worker_nodes": 10, + "ray_head": 1, + }, + request_id="1", + ) + + # Get the non-terminated nodes of the cloud instance provider. + running = provider.get_non_terminated() + + # Poll the errors + errors = provider.poll_errors() + + # Terminate nodes. + provider.terminate( + ids=["cloud_instance_id_1", "cloud_instance_id_2"], + request_id="2", + ) + + # Process the state of the provider. + ... + ``` + """ + + @abstractmethod + def get_non_terminated(self) -> Dict[CloudInstanceId, CloudInstance]: + """Get the non-terminated cloud instances in the cluster. + + Returns: + A dictionary of the non-terminated cloud instances in the cluster. + The key is the cloud instance id, and the value is the cloud instance. + """ + pass + + @abstractmethod + def terminate(self, ids: List[CloudInstanceId], request_id: str) -> None: + """ + Terminate the cloud instances asynchronously. + + This method is expected to be idempotent, i.e. if the same request id is used + to terminate the same cloud instances, this should be a no-op if + the cloud instances are already terminated or being terminated. + + Args: + ids: the cloud instance ids to terminate. + request_id: a unique id that identifies the request. + """ + pass + + @abstractmethod + def launch( + self, + shape: Dict[NodeType, int], + request_id: str, + ) -> None: + """Launch the cloud instances asynchronously. + + Args: + shape: A map from node type to number of nodes to launch. + request_id: a unique id that identifies the update request. + """ + pass + + @abstractmethod + def poll_errors(self) -> List[CloudInstanceProviderError]: + """ + Poll the errors that happened since the last poll. + + This method would also clear the errors that happened since the last poll. + + Returns: + The errors that happened since the last poll. + """ + pass + + +@dataclass(frozen=True) +class CloudInstanceLaunchRequest: + """ + The arguments to launch a node. + """ + + # The node type to launch. + node_type: NodeType + # Number of nodes to launch. + count: int + # A unique id that identifies the request. + request_id: str + + +@dataclass(frozen=True) +class CloudInstanceTerminateRequest: + """ + The arguments to terminate a node. + """ + + # The cloud instance id of the node to terminate. + cloud_instance_id: CloudInstanceId + # A unique id that identifies the request. + request_id: str + + +class NodeProviderAdapter(ICloudInstanceProvider): + """ + Warps a NodeProviderV1 to a ICloudInstanceProvider. + + TODO(rickyx): + The current adapter right now consists of two sets of APIs: + - v1: the old APIs that are used by the autoscaler, where + we forward the calls to the NodeProviderV1. + - v2: the new APIs that are used by the autoscaler v2, this is + defined in the ICloudInstanceProvider interface. + + We should eventually remove the v1 APIs and only use the v2 APIs. + It's currently left as a TODO since changing the v1 APIs would + requires a lot of changes in the cluster launcher codebase. + """ + + def __init__( + self, + v1_provider: NodeProviderV1, + config_reader: IConfigReader, + max_launch_batch_per_type: int = AUTOSCALER_MAX_LAUNCH_BATCH, + max_concurrent_launches: int = AUTOSCALER_MAX_CONCURRENT_LAUNCHES, + ) -> None: + """ + Args: + v1_provider: The v1 node provider to wrap. + config_reader: The config reader to read the autoscaling config. + max_launch_batch_per_type: The maximum number of nodes to launch per + node type in a single batch. + max_concurrent_launches: The maximum number of concurrent launches. + """ + + super().__init__() + self._v1_provider = v1_provider + self._config_reader = config_reader + # Executor to async launching and terminating nodes. + self._main_executor = ThreadPoolExecutor( + max_workers=1, thread_name_prefix="ray::NodeProviderAdapter" + ) + + # v1 legacy rate limiting on the node provider launch calls. + self._max_launch_batch_per_type = max_launch_batch_per_type + max_batches = math.ceil( + max_concurrent_launches / float(max_launch_batch_per_type) + ) + self._node_launcher_executors = ThreadPoolExecutor( + max_workers=max_batches, + thread_name_prefix="ray::NodeLauncherPool", + ) + + # Queue to retrieve new errors occur in the multi-thread executors + # temporarily. + self._errors_queue = Queue() + + @property + def v1_provider(self) -> NodeProviderV1: + return self._v1_provider + + def get_non_terminated(self) -> Dict[CloudInstanceId, CloudInstance]: + nodes = {} + + cloud_instance_ids = self._v1_non_terminated_nodes({}) + # Filter out nodes that are not running. + # This is efficient since the provider is expected to cache the + # running status of the nodes. + for cloud_instance_id in cloud_instance_ids: + node_tags = self._v1_node_tags(cloud_instance_id) + node_kind_tag = node_tags.get(TAG_RAY_NODE_KIND, NODE_KIND_UNMANAGED) + if node_kind_tag == NODE_KIND_UNMANAGED: + # Filter out unmanaged nodes. + continue + elif node_kind_tag == NODE_KIND_WORKER: + node_kind = NodeKind.WORKER + elif node_kind_tag == NODE_KIND_HEAD: + node_kind = NodeKind.HEAD + else: + raise ValueError(f"Invalid node kind: {node_kind_tag}") + + nodes[cloud_instance_id] = CloudInstance( + cloud_instance_id=cloud_instance_id, + node_type=node_tags.get(TAG_RAY_USER_NODE_TYPE, ""), + is_running=self._v1_is_running(cloud_instance_id), + request_id=node_tags.get(TAG_RAY_LAUNCH_REQUEST, ""), + node_kind=node_kind, + ) + + return nodes + + def poll_errors(self) -> List[CloudInstanceProviderError]: + errors = [] + while not self._errors_queue.empty(): + errors.append(self._errors_queue.get_nowait()) + return errors + + def launch( + self, + shape: Dict[NodeType, int], + request_id: str, + ) -> None: + self._main_executor.submit(self._do_launch, shape, request_id) + + def terminate(self, ids: List[CloudInstanceId], request_id: str) -> None: + self._main_executor.submit(self._do_terminate, ids, request_id) + + ########################################### + # Private APIs + ########################################### + + def _do_launch( + self, + shape: Dict[NodeType, int], + request_id: str, + ) -> None: + """ + Launch the cloud instances by calling into the v1 base node provider. + + Args: + shape: The requested to launch node type and number of nodes. + request_id: The request id that identifies the request. + """ + for node_type, count in shape.items(): + # Keep submitting the launch requests to the launch pool in batches. + while count > 0: + to_launch = min(count, self._max_launch_batch_per_type) + self._node_launcher_executors.submit( + self._launch_nodes_by_type, + node_type, + to_launch, + request_id, + ) + count -= to_launch + + def _do_terminate(self, ids: List[CloudInstanceId], request_id: str) -> None: + """ + Terminate the cloud instances by calling into the v1 base node provider. + + If errors happen during the termination, the errors will be put into the + errors queue. + + Args: + ids: The cloud instance ids to terminate. + request_id: The request id that identifies the request. + """ + + try: + self._v1_terminate_nodes(ids) + except Exception as e: + for id in ids: + error = TerminateNodeError(id, request_id, int(time.time_ns())) + error.__cause__ = e + self._errors_queue.put(error) + + def _launch_nodes_by_type( + self, + node_type: NodeType, + count: int, + request_id: str, + ) -> None: + """ + Launch nodes of the given node type. + + Args: + node_type: The node type to launch. + count: Number of nodes to launch. + request_id: A unique id that identifies the request. + + Raises: + ValueError: If the node type is invalid. + LaunchNodeError: If the launch failed and raised by the underlying provider. + """ + # Check node type is valid. + try: + config = self._config_reader.get_cached_autoscaling_config() + launch_config = config.get_cloud_node_config(node_type) + resources = config.get_node_resources(node_type) + labels = config.get_node_labels(node_type) + + # This is to be compatible with the v1 node launcher. + # See more in https://github.com/ray-project/ray/blob/6f5a189bc463e52c51a70f8aea41fb2950b443e8/python/ray/autoscaler/_private/node_launcher.py#L78-L85 # noqa + # TODO: this should be synced with what's stored in the IM, it should + # probably be made as a metadata field in the cloud instance. This is + # another incompatibility with KubeRay. + launch_hash = hash_launch_conf(launch_config, config.get_config("auth", {})) + node_tags = { + TAG_RAY_NODE_NAME: "ray-{}-worker".format( + config.get_config("cluster_name", "") + ), + TAG_RAY_NODE_KIND: NODE_KIND_WORKER, + TAG_RAY_NODE_STATUS: STATUS_UNINITIALIZED, + TAG_RAY_LAUNCH_CONFIG: launch_hash, + TAG_RAY_LAUNCH_REQUEST: request_id, + TAG_RAY_USER_NODE_TYPE: node_type, + } + + logger.info("Launching {} nodes of type {}.".format(count, node_type)) + self._v1_provider.create_node_with_resources_and_labels( + launch_config, node_tags, count, resources, labels + ) + logger.info("Launched {} nodes of type {}.".format(count, node_type)) + except Exception as e: + logger.info( + "Failed to launch {} nodes of type {}: {}".format(count, node_type, e) + ) + error = LaunchNodeError(node_type, count, request_id, int(time.time_ns())) + error.__cause__ = e + self._errors_queue.put(error) + + ########################################### + # V1 Legacy APIs + ########################################### + """ + Below are the necessary legacy APIs from the V1 node provider. + These are needed as of now to provide the needed features + for V2 node provider. + The goal is to eventually remove these APIs and only use the + V2 APIs by modifying the individual node provider to inherit + from ICloudInstanceProvider. + """ + + def _v1_terminate_nodes( + self, ids: List[CloudInstanceId] + ) -> Optional[Dict[str, Any]]: + return self._v1_provider.terminate_nodes(ids) + + def _v1_non_terminated_nodes( + self, tag_filters: Dict[str, str] + ) -> List[CloudInstanceId]: + return self._v1_provider.non_terminated_nodes(tag_filters) + + def _v1_is_running(self, node_id: CloudInstanceId) -> bool: + return self._v1_provider.is_running(node_id) + + def _v1_post_process(self) -> None: + self._v1_provider.post_process() + + def _v1_node_tags(self, node_id: CloudInstanceId) -> Dict[str, str]: + return self._v1_provider.node_tags(node_id) + + def _v1_safe_to_scale(self) -> bool: + return self._v1_provider.safe_to_scale() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/ray_installer.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/ray_installer.py new file mode 100644 index 0000000000000000000000000000000000000000..3daf5d3e0b71be9571ad7be052848d8b1e8dc708 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/ray_installer.py @@ -0,0 +1,96 @@ +import logging +import subprocess + +from ray.autoscaler._private.updater import ( + NodeUpdater, + TAG_RAY_NODE_STATUS, + STATUS_UP_TO_DATE, +) +from ray.autoscaler._private.util import with_envs, with_head_node_ip +from ray.autoscaler.node_provider import NodeProvider as NodeProviderV1 +from ray.autoscaler.v2.instance_manager.config import AutoscalingConfig +from ray.core.generated.instance_manager_pb2 import Instance + +logger = logging.getLogger(__name__) + + +class RayInstaller(object): + """ + RayInstaller is responsible for installing ray on the target instance. + """ + + def __init__( + self, + provider: NodeProviderV1, + config: AutoscalingConfig, + process_runner=subprocess, + ) -> None: + self._provider = provider + self._config = config + self._process_runner = process_runner + + def install_ray(self, instance: Instance, head_node_ip: str) -> None: + """ + Install ray on the target instance synchronously. + TODO:(rickyx): This runs in another thread, and errors are silently + ignored. We should propagate the error to the main thread. + """ + setup_commands = self._config.get_worker_setup_commands(instance.instance_type) + ray_start_commands = self._config.get_worker_start_ray_commands() + docker_config = self._config.get_docker_config(instance.instance_type) + + logger.info( + f"Creating new (spawn_updater) updater thread for node" + f" {instance.cloud_instance_id}." + ) + provider_instance_type_name = self._config.get_provider_instance_type( + instance.instance_type + ) + updater = NodeUpdater( + node_id=instance.cloud_instance_id, + provider_config=self._config.get_config("provider"), + provider=self._provider, + auth_config=self._config.get_config("auth"), + cluster_name=self._config.get_config("cluster_name"), + file_mounts=self._config.get_config("file_mounts"), + initialization_commands=with_head_node_ip( + self._config.get_initialization_commands(instance.instance_type), + head_node_ip, + ), + setup_commands=with_head_node_ip(setup_commands, head_node_ip), + # This will prepend envs to the begin of the ray start commands, e.g. + # `RAY_HEAD_IP= \ + # RAY_CLOUD_INSTANCE_ID= \ + # ray start --head ...` + # See src/ray/common/constants.h for ENV name definitions. + ray_start_commands=with_envs( + ray_start_commands, + { + "RAY_HEAD_IP": head_node_ip, + "RAY_CLOUD_INSTANCE_ID": instance.cloud_instance_id, + "RAY_NODE_TYPE_NAME": instance.instance_type, + "RAY_CLOUD_INSTANCE_TYPE_NAME": provider_instance_type_name, + }, + ), + runtime_hash=self._config.runtime_hash, + file_mounts_contents_hash=self._config.file_mounts_contents_hash, + is_head_node=False, + cluster_synced_files=self._config.get_config("cluster_synced_files"), + rsync_options={ + "rsync_exclude": self._config.get_config("rsync_exclude"), + "rsync_filter": self._config.get_config("rsync_filter"), + }, + use_internal_ip=True, + docker_config=docker_config, + node_resources=self._config.get_node_resources(instance.instance_type), + node_labels=self._config.get_node_labels(instance.instance_type), + process_runner=self._process_runner, + ) + updater.run() + # check if the updater was successful by checking the node tags + # since the updater could hide exceptions and just set the status tag + tags = self._provider.node_tags(instance.cloud_instance_id) + if tags.get(TAG_RAY_NODE_STATUS) != STATUS_UP_TO_DATE: + raise Exception( + f"Ray installation failed with unexpected status: {tags.get(TAG_RAY_NODE_STATUS)}" + ) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/reconciler.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/reconciler.py new file mode 100644 index 0000000000000000000000000000000000000000..f274854eca6ae9c79fd348406ddba3103e3b8675 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/reconciler.py @@ -0,0 +1,1603 @@ +import logging +import math +import time +import uuid +from collections import defaultdict +from typing import Dict, List, Optional, Set, Tuple + +from ray._common.utils import binary_to_hex +from ray.autoscaler.v2.instance_manager.common import InstanceUtil +from ray.autoscaler.v2.instance_manager.config import ( + AutoscalingConfig, + InstanceReconcileConfig, + Provider, +) +from ray.autoscaler.v2.instance_manager.instance_manager import InstanceManager +from ray.autoscaler.v2.instance_manager.node_provider import ( + CloudInstance, + CloudInstanceId, + CloudInstanceProviderError, + ICloudInstanceProvider, + LaunchNodeError, + TerminateNodeError, +) +from ray.autoscaler.v2.instance_manager.subscribers.threaded_ray_installer import ( + RayInstallError, +) +from ray.autoscaler.v2.instance_manager.subscribers.ray_stopper import RayStopError +from ray.autoscaler.v2.metrics_reporter import AutoscalerMetricsReporter +from ray.autoscaler.v2.scheduler import IResourceScheduler, SchedulingRequest +from ray.autoscaler.v2.schema import AutoscalerInstance, NodeType +from ray.autoscaler.v2.utils import is_head_node +from ray.core.generated.autoscaler_pb2 import ( + AutoscalingState, + ClusterResourceState, + FailedInstanceRequest, + NodeState, + NodeStatus, + PendingInstance, + PendingInstanceRequest, +) +from ray.core.generated.instance_manager_pb2 import GetInstanceManagerStateRequest +from ray.core.generated.instance_manager_pb2 import Instance as IMInstance +from ray.core.generated.instance_manager_pb2 import ( + InstanceUpdateEvent as IMInstanceUpdateEvent, +) +from ray.core.generated.instance_manager_pb2 import ( + NodeKind, + StatusCode, + UpdateInstanceManagerStateRequest, +) + +logger = logging.getLogger(__name__) + + +class Reconciler: + """ + A singleton class that reconciles the instance states of the instance manager + for autoscaler. + + """ + + @staticmethod + def reconcile( + instance_manager: InstanceManager, + scheduler: IResourceScheduler, + cloud_provider: ICloudInstanceProvider, + ray_cluster_resource_state: ClusterResourceState, + non_terminated_cloud_instances: Dict[CloudInstanceId, CloudInstance], + autoscaling_config: AutoscalingConfig, + cloud_provider_errors: Optional[List[CloudInstanceProviderError]] = None, + ray_install_errors: Optional[List[RayInstallError]] = None, + ray_stop_errors: Optional[List[RayStopError]] = None, + metrics_reporter: Optional[AutoscalerMetricsReporter] = None, + _logger: Optional[logging.Logger] = None, + ) -> AutoscalingState: + """ + The reconcile method computes InstanceUpdateEvents for the instance manager + by: + + 1. Reconciling the instance manager's instances with external states like + the cloud provider's, the ray cluster's states, the ray installer's results. + It performs "passive" status transitions for the instances (where the status + transition should only be reflecting the external states of the cloud provider + and the ray cluster, and should not be actively changing them) + + 2. Stepping the instances to the active states by computing instance status + transitions that are needed and updating the instance manager's state. + These transitions should be "active" where the transitions have side effects + (through InstanceStatusSubscriber) to the cloud provider and the ray cluster. + + Args: + instance_manager: The instance manager to reconcile. + ray_cluster_resource_state: The ray cluster's resource state. + non_terminated_cloud_instances: The non-terminated cloud instances from + the cloud provider. + cloud_provider_errors: The errors from the cloud provider. + ray_install_errors: The errors from RayInstaller. + ray_stop_errors: The errors from RayStopper. + metrics_reporter: The metric reporter to report the autoscaler metrics. + _logger: The logger (for testing). + + """ + cloud_provider_errors = cloud_provider_errors or [] + ray_install_errors = ray_install_errors or [] + ray_stop_errors = ray_stop_errors or [] + + autoscaling_state = AutoscalingState() + autoscaling_state.last_seen_cluster_resource_state_version = ( + ray_cluster_resource_state.cluster_resource_state_version + ) + + Reconciler._sync_from( + instance_manager=instance_manager, + ray_nodes=ray_cluster_resource_state.node_states, + non_terminated_cloud_instances=non_terminated_cloud_instances, + cloud_provider_errors=cloud_provider_errors, + ray_install_errors=ray_install_errors, + ray_stop_errors=ray_stop_errors, + autoscaling_config=autoscaling_config, + ) + + Reconciler._step_next( + autoscaling_state=autoscaling_state, + instance_manager=instance_manager, + scheduler=scheduler, + cloud_provider=cloud_provider, + ray_cluster_resource_state=ray_cluster_resource_state, + non_terminated_cloud_instances=non_terminated_cloud_instances, + autoscaling_config=autoscaling_config, + _logger=_logger, + ) + + Reconciler._report_metrics( + instance_manager=instance_manager, + autoscaling_config=autoscaling_config, + metrics_reporter=metrics_reporter, + ) + + return autoscaling_state + + @staticmethod + def _sync_from( + instance_manager: InstanceManager, + ray_nodes: List[NodeState], + non_terminated_cloud_instances: Dict[CloudInstanceId, CloudInstance], + cloud_provider_errors: List[CloudInstanceProviderError], + ray_install_errors: List[RayInstallError], + ray_stop_errors: List[RayStopError], + autoscaling_config: AutoscalingConfig, + ): + """ + Reconcile the instance states of the instance manager from external states like + the cloud provider's, the ray cluster's states, the ray installer's results, + etc. + + For each instance, we try to figure out if we need to transition the instance + status to a new status, and if so, what the new status should be. + + These transitions should be purely "passive", meaning they should only be + reflecting the external states of the cloud provider and the ray cluster, + and should not be actively changing the states of the cloud provider or the ray + cluster. + + More specifically, we will reconcile status transitions for: + 1. QUEUED/REQUESTED -> ALLOCATED: + When a instance with launch request id (indicating a previous launch + request was made) could be assigned to an unassigned cloud instance + of the same instance type. + 2. REQUESTED -> ALLOCATION_FAILED: + When there's an error from the cloud provider for launch failure so + that the instance becomes ALLOCATION_FAILED. + 3. * -> RAY_RUNNING: + When a ray node on a cloud instance joins the ray cluster, we will + transition the instance to RAY_RUNNING. + 4. * -> TERMINATED: + When the cloud instance is already terminated, we will transition the + instance to TERMINATED. + 5. TERMINATING -> TERMINATION_FAILED: + When there's an error from the cloud provider for termination failure. + 6. * -> RAY_STOPPED: + When ray was stopped on the cloud instance, we will transition the + instance to RAY_STOPPED. + 7. * -> RAY_INSTALL_FAILED: + When there's an error from RayInstaller. + 8. RAY_STOP_REQUESTED -> RAY_RUNNING: + When requested to stop ray, but failed to stop/drain the ray node + (e.g. idle termination drain rejected by the node). + + Args: + instance_manager: The instance manager to reconcile. + ray_nodes: The ray cluster's states of ray nodes. + non_terminated_cloud_instances: The non-terminated cloud instances from + the cloud provider. + cloud_provider_errors: The errors from the cloud provider. + ray_install_errors: The errors from RayInstaller. + ray_stop_errors: The errors from RayStopper. + + """ + + # Handle 1 & 2 for cloud instance allocation. + Reconciler._handle_cloud_instance_allocation( + instance_manager, + non_terminated_cloud_instances, + cloud_provider_errors, + ) + Reconciler._handle_cloud_instance_terminated( + instance_manager, non_terminated_cloud_instances + ) + + Reconciler._handle_cloud_instance_termination_errors( + instance_manager, cloud_provider_errors + ) + + Reconciler._handle_extra_cloud_instances( + instance_manager, non_terminated_cloud_instances, ray_nodes + ) + + Reconciler._handle_ray_status_transition( + instance_manager, ray_nodes, autoscaling_config + ) + + Reconciler._handle_ray_install_failed(instance_manager, ray_install_errors) + + Reconciler._handle_ray_stop_failed(instance_manager, ray_stop_errors, ray_nodes) + + @staticmethod + def _step_next( + autoscaling_state: AutoscalingState, + instance_manager: InstanceManager, + scheduler: IResourceScheduler, + cloud_provider: ICloudInstanceProvider, + ray_cluster_resource_state: ClusterResourceState, + non_terminated_cloud_instances: Dict[CloudInstanceId, CloudInstance], + autoscaling_config: AutoscalingConfig, + _logger: Optional[logging.Logger] = None, + ): + """ + Step the reconciler to the next state by computing instance status transitions + that are needed and updating the instance manager's state. + + Specifically, we will: + 1. Shut down leak cloud instances + Leaked cloud instances that are not managed by the instance manager. + 2. Terminating instances with ray stopped or ray install failure. + 3. Scale down the cluster: + (* -> RAY_STOP_REQUESTED/TERMINATING) + b. Extra cloud due to max nodes config. + c. Cloud instances with outdated configs. + 4. Scale up the cluster: + (new QUEUED) + Create new instances based on the IResourceScheduler's decision for + scaling up. + 5. Request cloud provider to launch new instances. + (QUEUED -> REQUESTED) + 6. Install ray + (ALLOCATED -> RAY_INSTALLING) + When ray could be installed and launched. + 7. Handle any stuck instances with timeouts. + + Args: + instance_manager: The instance manager to reconcile. + scheduler: The resource scheduler to make scaling decisions. + ray_cluster_resource_state: The ray cluster's resource state. + non_terminated_cloud_instances: The non-terminated cloud instances from + the cloud provider. + autoscaling_config: The autoscaling config. + _logger: The logger (for testing). + + """ + + Reconciler._handle_stuck_instances( + instance_manager=instance_manager, + reconcile_config=autoscaling_config.get_instance_reconcile_config(), + _logger=_logger or logger, + ) + + Reconciler._scale_cluster( + autoscaling_state=autoscaling_state, + instance_manager=instance_manager, + ray_state=ray_cluster_resource_state, + scheduler=scheduler, + autoscaling_config=autoscaling_config, + ) + + Reconciler._handle_instances_launch( + instance_manager=instance_manager, autoscaling_config=autoscaling_config + ) + + Reconciler._terminate_instances(instance_manager=instance_manager) + if not autoscaling_config.disable_node_updaters(): + Reconciler._install_ray( + instance_manager=instance_manager, + non_terminated_cloud_instances=non_terminated_cloud_instances, + ) + + Reconciler._fill_autoscaling_state( + instance_manager=instance_manager, autoscaling_state=autoscaling_state + ) + + ####################################################### + # Utility methods for reconciling instance states. + ####################################################### + + @staticmethod + def _handle_cloud_instance_allocation( + instance_manager: InstanceManager, + non_terminated_cloud_instances: Dict[CloudInstanceId, CloudInstance], + cloud_provider_errors: List[CloudInstanceProviderError], + ): + im_instances, version = Reconciler._get_im_instances(instance_manager) + updates = {} + + # Compute intermediate states. + + instances_with_launch_requests: List[IMInstance] = [] + for instance in im_instances: + if instance.status != IMInstance.REQUESTED: + continue + + assert ( + instance.launch_request_id + ), "Instance in REQUESTED status should have launch_request_id set." + instances_with_launch_requests.append(instance) + + assigned_cloud_instance_ids: Set[CloudInstanceId] = { + instance.cloud_instance_id + for instance in im_instances + if instance.cloud_instance_id + and instance.status + not in [IMInstance.TERMINATED, IMInstance.ALLOCATION_FAILED] + } + launch_errors: Dict[str, LaunchNodeError] = { + error.request_id: error + for error in cloud_provider_errors + if isinstance(error, LaunchNodeError) + } + unassigned_cloud_instances_by_type: Dict[ + str, List[CloudInstance] + ] = defaultdict(list) + + for cloud_instance_id, cloud_instance in non_terminated_cloud_instances.items(): + if cloud_instance_id not in assigned_cloud_instance_ids: + unassigned_cloud_instances_by_type[cloud_instance.node_type].append( + cloud_instance + ) + + # Sort the request instance by the increasing request time. + instances_with_launch_requests.sort( + key=lambda instance: InstanceUtil.get_status_transition_times_ns( + instance, IMInstance.REQUESTED + ) + ) + + # For each instance, try to allocate or fail the allocation. + for instance in instances_with_launch_requests: + # Try allocate or fail with errors. + update_event = Reconciler._try_resolve_pending_allocation( + instance, unassigned_cloud_instances_by_type, launch_errors + ) + if not update_event: + continue + + updates[instance.instance_id] = update_event + + # Update the instance manager for the events. + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _try_resolve_pending_allocation( + im_instance: IMInstance, + unassigned_cloud_instances_by_type: Dict[str, List[CloudInstance]], + launch_errors: Dict[str, LaunchNodeError], + ) -> Optional[IMInstanceUpdateEvent]: + """ + Allocate, or fail the cloud instance allocation for the instance. + + Args: + im_instance: The instance to allocate or fail. + unassigned_cloud_instances_by_type: The unassigned cloud instances by type. + launch_errors: The launch errors from the cloud provider. + + Returns: + Instance update to ALLOCATED: if there's a matching unassigned cloud + instance with the same type. + Instance update to ALLOCATION_FAILED: if the instance allocation failed + with errors. + None: if there's no update. + + """ + unassigned_cloud_instance = None + + # Try to allocate an unassigned cloud instance. + # TODO(rickyx): We could also look at the launch request id + # on the cloud node and the im instance later once all node providers + # support request id. For now, we only look at the instance type. + if len(unassigned_cloud_instances_by_type.get(im_instance.instance_type, [])): + unassigned_cloud_instance = unassigned_cloud_instances_by_type[ + im_instance.instance_type + ].pop() + + if unassigned_cloud_instance: + return IMInstanceUpdateEvent( + instance_id=im_instance.instance_id, + new_instance_status=IMInstance.ALLOCATED, + cloud_instance_id=unassigned_cloud_instance.cloud_instance_id, + node_kind=unassigned_cloud_instance.node_kind, + instance_type=unassigned_cloud_instance.node_type, + details=( + "allocated unassigned cloud instance " + f"{unassigned_cloud_instance.cloud_instance_id}" + ), + ) + + # If there's a launch error, transition to ALLOCATION_FAILED. + launch_error = launch_errors.get(im_instance.launch_request_id) + if launch_error and launch_error.node_type == im_instance.instance_type: + return IMInstanceUpdateEvent( + instance_id=im_instance.instance_id, + new_instance_status=IMInstance.ALLOCATION_FAILED, + details=f"launch failed with {str(launch_error)}", + ) + # No update. + return None + + @staticmethod + def _handle_ray_stop_failed( + instance_manager: InstanceManager, + ray_stop_errors: List[RayStopError], + ray_nodes: List[NodeState], + ): + """ + The instance requested to stop ray, but failed to stop/drain the ray node. + E.g. connection errors, idle termination drain rejected by the node. + + We will transition the instance back to RAY_RUNNING. + + Args: + instance_manager: The instance manager to reconcile. + ray_stop_errors: The errors from RayStopper. + + """ + instances, version = Reconciler._get_im_instances(instance_manager) + updates = {} + + ray_stop_errors_by_instance_id = { + error.im_instance_id: error for error in ray_stop_errors + } + + ray_nodes_by_ray_node_id = {binary_to_hex(n.node_id): n for n in ray_nodes} + + ray_stop_requested_instances = { + instance.instance_id: instance + for instance in instances + if instance.status == IMInstance.RAY_STOP_REQUESTED + } + + for instance_id, instance in ray_stop_requested_instances.items(): + stop_error = ray_stop_errors_by_instance_id.get(instance_id) + if not stop_error: + continue + + assert instance.node_id + ray_node = ray_nodes_by_ray_node_id.get(instance.node_id) + assert ray_node is not None and ray_node.status in [ + NodeStatus.RUNNING, + NodeStatus.IDLE, + ], ( + "There should be a running ray node for instance with ray stop " + "requested failed." + ) + + updates[instance_id] = IMInstanceUpdateEvent( + instance_id=instance_id, + new_instance_status=IMInstance.RAY_RUNNING, + details="failed to stop/drain ray", + ray_node_id=instance.node_id, + ) + + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _handle_ray_install_failed( + instance_manager: InstanceManager, ray_install_errors: List[RayInstallError] + ): + + instances, version = Reconciler._get_im_instances(instance_manager) + updates = {} + + # Get all instances with RAY_INSTALLING status. + instances_with_ray_installing = { + instance.instance_id: instance + for instance in instances + if instance.status == IMInstance.RAY_INSTALLING + } + + install_errors = {error.im_instance_id: error for error in ray_install_errors} + + # For each instance with RAY_INSTALLING status, check if there's any + # install error. + for instance_id, instance in instances_with_ray_installing.items(): + install_error = install_errors.get(instance_id) + if install_error: + updates[instance_id] = IMInstanceUpdateEvent( + instance_id=instance_id, + new_instance_status=IMInstance.RAY_INSTALL_FAILED, + details=( + f"failed to install ray with errors: {install_error.details}" + ), + ) + + # Update the instance manager for the events. + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _handle_cloud_instance_terminated( + instance_manager: InstanceManager, + non_terminated_cloud_instances: Dict[CloudInstanceId, CloudInstance], + ): + """ + For any IM (instance manager) instance with a cloud node id, if the mapped + cloud instance is no longer running, transition the instance to TERMINATED. + + Args: + instance_manager: The instance manager to reconcile. + non_terminated_cloud_instances: The non-terminated cloud instances from + the cloud provider. + """ + updates = {} + instances, version = Reconciler._get_im_instances(instance_manager) + + non_terminated_instances_with_cloud_instance_assigned = { + instance.cloud_instance_id: instance + for instance in instances + if instance.cloud_instance_id and instance.status != IMInstance.TERMINATED + } + + for ( + cloud_instance_id, + instance, + ) in non_terminated_instances_with_cloud_instance_assigned.items(): + if cloud_instance_id in non_terminated_cloud_instances.keys(): + # The cloud instance is still running. + continue + + # The cloud instance is terminated. + updates[instance.instance_id] = IMInstanceUpdateEvent( + instance_id=instance.instance_id, + new_instance_status=IMInstance.TERMINATED, + details=f"cloud instance {cloud_instance_id} no longer found", + ) + + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _handle_cloud_instance_termination_errors( + instance_manager: InstanceManager, + cloud_provider_errors: List[CloudInstanceProviderError], + ): + """ + If any TERMINATING instances have termination errors, transition the instance to + TERMINATION_FAILED. + + We will retry the termination for the TERMINATION_FAILED instances in the next + reconciler step. + + Args: + instance_manager: The instance manager to reconcile. + cloud_provider_errors: The errors from the cloud provider. + + """ + instances, version = Reconciler._get_im_instances(instance_manager) + updates = {} + + termination_errors = { + error.cloud_instance_id: error + for error in cloud_provider_errors + if isinstance(error, TerminateNodeError) + } + + terminating_instances_by_cloud_instance_id = { + instance.cloud_instance_id: instance + for instance in instances + if instance.status == IMInstance.TERMINATING + } + + for cloud_instance_id, failure in termination_errors.items(): + instance = terminating_instances_by_cloud_instance_id.get(cloud_instance_id) + if not instance: + # The instance is no longer in TERMINATING status. + continue + + updates[instance.instance_id] = IMInstanceUpdateEvent( + instance_id=instance.instance_id, + new_instance_status=IMInstance.TERMINATION_FAILED, + details=f"termination failed: {str(failure)}", + ) + + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _get_im_instances( + instance_manager: InstanceManager, + ) -> Tuple[List[IMInstance], int]: + reply = instance_manager.get_instance_manager_state( + request=GetInstanceManagerStateRequest() + ) + assert reply.status.code == StatusCode.OK + im_state = reply.state + return im_state.instances, im_state.version + + @staticmethod + def _update_instance_manager( + instance_manager: InstanceManager, + version: int, + updates: Dict[str, IMInstanceUpdateEvent], + ) -> None: + if not updates: + return + + updates = list(updates.values()) or [] + + reply = instance_manager.update_instance_manager_state( + request=UpdateInstanceManagerStateRequest( + expected_version=version, + updates=updates, + ) + ) + # TODO: While it's possible that a version mismatch + # happens, or some other failures could happen. But given + # the current implementation: + # 1. There's only 1 writer (the reconciler) for updating the instance + # manager states, so there shouldn't be version mismatch. + # 2. Any failures in one reconciler step should be caught at a higher + # level and be retried in the next reconciler step. If the IM + # fails to be updated, we don't have sufficient info to handle it + # here. + assert ( + reply.status.code == StatusCode.OK + ), f"Failed to update instance manager: {reply}" + + @staticmethod + def _handle_ray_status_transition( + instance_manager: InstanceManager, + ray_nodes: List[NodeState], + autoscaling_config: AutoscalingConfig, + ): + """ + Handle the ray status transition for the instance manager. + + If a new ray node running on the instance, transition it to RAY_RUNNING. + If a ray node stopped, transition it to RAY_STOPPED. + If a ray node is draining, transition it to RAY_STOPPING. + + Args: + instance_manager: The instance manager to reconcile. + ray_nodes: The ray cluster's states of ray nodes. + """ + instances, version = Reconciler._get_im_instances(instance_manager) + updates = {} + + im_instances_by_cloud_instance_id = { + instance.cloud_instance_id: instance + for instance in instances + if instance.cloud_instance_id + and instance.status + not in [IMInstance.TERMINATED, IMInstance.ALLOCATION_FAILED] + } + im_instances_by_ray_node_id = { + instance.node_id: instance for instance in instances if instance.node_id + } + + for ray_node in ray_nodes: + im_instance = None + ray_node_id = binary_to_hex(ray_node.node_id) + if ray_node_id in im_instances_by_ray_node_id: + im_instance = im_instances_by_ray_node_id[ray_node_id] + else: + if autoscaling_config.provider == Provider.READ_ONLY: + # We will use the node id as the cloud instance id for read-only + # provider. + im_instance = im_instances_by_cloud_instance_id[ray_node_id] + elif ray_node.instance_id: + im_instance = im_instances_by_cloud_instance_id[ + ray_node.instance_id + ] + else: + # This should only happen to a ray node that's not managed by us. + logger.warning( + f"Ray node {ray_node_id} has no instance id. " + "This only happens to a ray node not managed by autoscaler. " + "If not, please file a bug at " + "https://github.com/ray-project/ray" + ) + continue + + assert im_instance is not None, ( + f"Ray node {ray_node_id} has no matching " + f"instance with cloud instance id={ray_node.instance_id}. We should " + "not see a ray node with cloud instance id not found in IM since " + "we have reconciled all cloud instances, and ray nodes by now." + ) + + reconciled_im_status = Reconciler._reconciled_im_status_from_ray_status( + ray_node.status, im_instance.status + ) + + if reconciled_im_status != im_instance.status: + updates[ray_node_id] = IMInstanceUpdateEvent( + instance_id=im_instance.instance_id, + new_instance_status=reconciled_im_status, + details=( + f"ray node {ray_node_id} is " + f"{NodeStatus.Name(ray_node.status)}" + ), + ray_node_id=ray_node_id, + ) + + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _reconciled_im_status_from_ray_status( + ray_status: NodeStatus, cur_im_status: IMInstance.InstanceStatus + ) -> "IMInstance.InstanceStatus": + """ + Reconcile the instance status from the ray node status. + Args: + ray_status: the current ray node status. + cur_im_status: the current IM instance status. + Returns: + The reconciled IM instance status + + Raises: + ValueError: If the ray status is unknown. + """ + reconciled_im_status = None + if ray_status in [NodeStatus.RUNNING, NodeStatus.IDLE]: + reconciled_im_status = IMInstance.RAY_RUNNING + elif ray_status == NodeStatus.DEAD: + reconciled_im_status = IMInstance.RAY_STOPPED + elif ray_status == NodeStatus.DRAINING: + reconciled_im_status = IMInstance.RAY_STOPPING + else: + raise ValueError(f"Unknown ray status: {ray_status}") + + if ( + cur_im_status == reconciled_im_status + or cur_im_status + in InstanceUtil.get_reachable_statuses(reconciled_im_status) + ): + # No need to reconcile if the instance is already in the reconciled status + # or has already transitioned beyond it. + return cur_im_status + + return reconciled_im_status + + @staticmethod + def _handle_instances_launch( + instance_manager: InstanceManager, autoscaling_config: AutoscalingConfig + ): + + instances, version = Reconciler._get_im_instances(instance_manager) + + queued_instances = [] + requested_instances = [] + running_instances = [] + + for instance in instances: + if instance.status == IMInstance.QUEUED: + queued_instances.append(instance) + elif instance.status == IMInstance.REQUESTED: + requested_instances.append(instance) + elif instance.status == IMInstance.RAY_RUNNING: + running_instances.append(instance) + + if not queued_instances: + # No QUEUED instances + return + + to_launch = Reconciler._compute_to_launch( + queued_instances, + requested_instances, + running_instances, + autoscaling_config.get_upscaling_speed(), + autoscaling_config.get_max_concurrent_launches(), + ) + + # Transition the instances to REQUESTED for instance launcher to + # launch them. + updates = {} + new_launch_request_id = str(uuid.uuid4()) + for instance_type, instances in to_launch.items(): + for instance in instances: + # Reuse launch request id for any QUEUED instances that have been + # requested before due to retry. + launch_request_id = ( + new_launch_request_id + if len(instance.launch_request_id) == 0 + else instance.launch_request_id + ) + updates[instance.instance_id] = IMInstanceUpdateEvent( + instance_id=instance.instance_id, + new_instance_status=IMInstance.REQUESTED, + launch_request_id=launch_request_id, + instance_type=instance_type, + details=( + f"requested to launch {instance_type} with request id " + f"{launch_request_id}" + ), + ) + + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _compute_to_launch( + queued_instances: List[IMInstance], + requested_instances: List[IMInstance], + running_instances: List[IMInstance], + upscaling_speed: float, + max_concurrent_launches: int, + ) -> Dict[NodeType, List[IMInstance]]: + def _group_by_type(instances): + instances_by_type = defaultdict(list) + for instance in instances: + instances_by_type[instance.instance_type].append(instance) + return instances_by_type + + # Sort the instances by the time they were queued. + def _sort_by_earliest_queued(instance: IMInstance) -> List[int]: + queue_times = InstanceUtil.get_status_transition_times_ns( + instance, IMInstance.QUEUED + ) + return sorted(queue_times) + + queued_instances_by_type = _group_by_type(queued_instances) + running_instances_by_type = _group_by_type(running_instances) + + total_num_requested_to_launch = len(requested_instances) + all_to_launch: Dict[NodeType : List[IMInstance]] = defaultdict(list) + + for ( + instance_type, + queued_instances_for_type, + ) in queued_instances_by_type.items(): + running_instances_for_type = running_instances_by_type.get( + instance_type, [] + ) + + # Enforce the max allowed pending nodes based on current running nodes + num_desired_to_upscale = max( + 1, + math.ceil(upscaling_speed * max(len(running_instances_for_type), 1)), + ) + + # Enforce global limit, at most we can launch `max_concurrent_launches` + num_to_launch = min( + max_concurrent_launches - total_num_requested_to_launch, + num_desired_to_upscale, + ) + + # Cap both ends 0 <= num_to_launch <= num_queued + num_to_launch = max(0, num_to_launch) + num_to_launch = min(len(queued_instances_for_type), num_to_launch) + + to_launch = sorted(queued_instances_for_type, key=_sort_by_earliest_queued)[ + :num_to_launch + ] + + all_to_launch[instance_type].extend(to_launch) + total_num_requested_to_launch += num_to_launch + + return all_to_launch + + @staticmethod + def _handle_stuck_instances( + instance_manager: InstanceManager, + reconcile_config: InstanceReconcileConfig, + _logger: logging.Logger, + ): + """ + Handle stuck instances with timeouts. + + Instances could be stuck in the following status and needs to be updated: + - REQUESTED: cloud provider is slow/fails to launch instances. + - ALLOCATED: ray fails to be started on the instance. + - RAY_INSTALLING: ray fails to be installed on the instance. + - TERMINATING: cloud provider is slow/fails to terminate instances. + + Instances could be in the following status which could be unbounded or + transient, and we don't have a timeout mechanism to handle them. We would + warn if they are stuck for too long: + - RAY_STOPPING: ray taking time to drain. + - QUEUED: cloud provider is slow to launch instances, resulting in long + queue. + + Reconciler should handle below statuses, if not, could be slow + reconcilation loop or a bug: + - RAY_INSTALL_FAILED + - RAY_STOPPED + - TERMINATION_FAILED + + + Args: + instance_manager: The instance manager to reconcile. + reconcile_config: The instance reconcile config. + _logger: The logger to log the warning messages. It's used for testing. + + """ + instances, version = Reconciler._get_im_instances(instance_manager) + + instances_by_status = defaultdict(list) + for instance in instances: + instances_by_status[instance.status].append(instance) + + im_updates = {} + + # Fail or retry the cloud instance allocation if it's stuck + # in the REQUESTED state. + for instance in instances_by_status[IMInstance.REQUESTED]: + update = Reconciler._handle_stuck_requested_instance( + instance, + reconcile_config.request_status_timeout_s, + reconcile_config.max_num_retry_request_to_allocate, + ) + if update: + im_updates[instance.instance_id] = update + + # Leaked ALLOCATED instances should be terminated. + # This usually happens when ray fails to be started on the instance, so + # it's unable to be RAY_RUNNING after a long time. + for instance in instances_by_status[IMInstance.ALLOCATED]: + assert ( + instance.cloud_instance_id + ), "cloud instance id should be set on ALLOCATED instance" + update = Reconciler._handle_stuck_instance( + instance, + reconcile_config.allocate_status_timeout_s, + new_status=IMInstance.TERMINATING, + cloud_instance_id=instance.cloud_instance_id, + ) + if update: + im_updates[instance.instance_id] = update + + # Fail the installation if it's stuck in RAY_INSTALLING for too long. + # If RAY_INSTALLING is stuck for too long, it's likely that the instance + # is not able to install ray, so we should also fail the installation. + for instance in instances_by_status[IMInstance.RAY_INSTALLING]: + update = Reconciler._handle_stuck_instance( + instance, + reconcile_config.ray_install_status_timeout_s, + new_status=IMInstance.RAY_INSTALL_FAILED, + ) + if update: + im_updates[instance.instance_id] = update + + # If we tried to terminate the instance, but it doesn't terminate (disappear + # from the cloud provider) after a long time, we fail the termination. + # This will trigger another attempt to terminate the instance. + for instance in instances_by_status[IMInstance.TERMINATING]: + update = Reconciler._handle_stuck_instance( + instance, + reconcile_config.terminating_status_timeout_s, + new_status=IMInstance.TERMINATION_FAILED, + ) + if update: + im_updates[instance.instance_id] = update + + # If we tried to stop ray on the instance, but it doesn't stop after a long + # time, we will transition it back to RAY_RUNNING as the stop/drain somehow + # failed. If it had succeed, we should have transitioned it to RAY_STOPPING + # or RAY_STOPPED. + for instance in instances_by_status[IMInstance.RAY_STOP_REQUESTED]: + update = Reconciler._handle_stuck_instance( + instance, + reconcile_config.ray_stop_requested_status_timeout_s, + new_status=IMInstance.RAY_RUNNING, + ray_node_id=instance.node_id, + ) + if update: + im_updates[instance.instance_id] = update + + # These statues could be unbounded or transient, and we don't have a timeout + # mechanism to handle them. We only warn if they are stuck for too long. + for status in [ + # Ray taking time to drain. We could also have a timeout when Drain protocol + # supports timeout. + IMInstance.RAY_STOPPING, + # These should just be transient, we will terminate instances with this + # status in the next reconciler step. + IMInstance.RAY_INSTALL_FAILED, + IMInstance.RAY_STOPPED, + IMInstance.TERMINATION_FAILED, + # Instances could be in the QUEUED status for a long time if the cloud + # provider is slow to launch instances. + IMInstance.QUEUED, + ]: + Reconciler._warn_stuck_instances( + instances_by_status[status], + status=status, + warn_interval_s=reconcile_config.transient_status_warn_interval_s, + logger=_logger, + ) + + Reconciler._update_instance_manager(instance_manager, version, im_updates) + + @staticmethod + def _warn_stuck_instances( + instances: List[IMInstance], + status: IMInstance.InstanceStatus, + warn_interval_s: int, + logger: logging.Logger, + ): + """Warn if any instance is stuck in a transient/unbounded status for too + long. + """ + for instance in instances: + status_times_ns = InstanceUtil.get_status_transition_times_ns( + instance, select_instance_status=status + ) + assert len(status_times_ns) >= 1 + status_time_ns = sorted(status_times_ns)[-1] + + if time.time_ns() - status_time_ns > warn_interval_s * 1e9: + logger.warning( + "Instance {}({}) is stuck in {} for {} seconds.".format( + instance.instance_id, + IMInstance.InstanceStatus.Name(instance.status), + IMInstance.InstanceStatus.Name(status), + (time.time_ns() - status_time_ns) // 1e9, + ) + ) + + @staticmethod + def _is_head_node_running(instance_manager: InstanceManager) -> bool: + """ + Check if the head node is running and ready. + + If we scale up the cluster before head node is running, + it would cause issues when launching the worker nodes. + + There are corner cases when the GCS is up (so the ray cluster resource + state is retrievable from the GCS), but the head node's raylet is not + running so the head node is missing from the reported nodes. This happens + when the head node is still starting up, or the raylet is not running + due to some issues, and this would yield false. + + Args: + instance_manager: The instance manager to reconcile. + + Returns: + True if the head node is running and ready, False otherwise. + """ + + im_instances, _ = Reconciler._get_im_instances(instance_manager) + + for instance in im_instances: + if instance.node_kind == NodeKind.HEAD: + if instance.status == IMInstance.RAY_RUNNING: + return True + return False + + @staticmethod + def _scale_cluster( + autoscaling_state: AutoscalingState, + instance_manager: InstanceManager, + ray_state: ClusterResourceState, + scheduler: IResourceScheduler, + autoscaling_config: AutoscalingConfig, + ) -> None: + """ + Scale the cluster based on the resource state and the resource scheduler's + decision: + + - It launches new instances if needed. + - It terminates extra ray nodes if they should be shut down (preemption + or idle termination) + + Args: + autoscaling_state: The autoscaling state to reconcile. + instance_manager: The instance manager to reconcile. + ray_state: The ray cluster's resource state. + scheduler: The resource scheduler to make scaling decisions. + autoscaling_config: The autoscaling config. + + """ + + # Get the current instance states. + im_instances, version = Reconciler._get_im_instances(instance_manager) + + im_instances_by_instance_id = { + i.instance_id: i for i in im_instances if i.instance_id + } + autoscaler_instances = [] + ray_nodes_by_id = { + binary_to_hex(node.node_id): node for node in ray_state.node_states + } + + for im_instance in im_instances: + ray_node = ray_nodes_by_id.get(im_instance.node_id) + autoscaler_instances.append( + AutoscalerInstance( + ray_node=ray_node, + im_instance=im_instance, + cloud_instance_id=( + im_instance.cloud_instance_id + if im_instance.cloud_instance_id + else None + ), + ) + ) + + # TODO(rickyx): We should probably name it as "Planner" or "Scaler" + # or "ClusterScaler" + sched_request = SchedulingRequest( + node_type_configs=autoscaling_config.get_node_type_configs(), + max_num_nodes=autoscaling_config.get_max_num_nodes(), + resource_requests=ray_state.pending_resource_requests, + gang_resource_requests=ray_state.pending_gang_resource_requests, + cluster_resource_constraints=ray_state.cluster_resource_constraints, + current_instances=autoscaler_instances, + idle_timeout_s=autoscaling_config.get_idle_timeout_s(), + disable_launch_config_check=( + autoscaling_config.disable_launch_config_check() + ), + ) + + # Ask scheduler for updates to the cluster shape. + reply = scheduler.schedule(sched_request) + + # Populate the autoscaling state. + autoscaling_state.infeasible_resource_requests.extend( + reply.infeasible_resource_requests + ) + autoscaling_state.infeasible_gang_resource_requests.extend( + reply.infeasible_gang_resource_requests + ) + autoscaling_state.infeasible_cluster_resource_constraints.extend( + reply.infeasible_cluster_resource_constraints + ) + + if not Reconciler._is_head_node_running(instance_manager): + # We shouldn't be scaling the cluster until the head node is ready. + # This could happen when the head node (i.e. the raylet) is still + # pending registration even though GCS is up. + # We will wait until the head node is running and ready to avoid + # scaling the cluster from min worker nodes constraint. + return + + if autoscaling_config.provider == Provider.READ_ONLY: + # We shouldn't be scaling the cluster if the provider is read-only. + return + + # Scale the clusters if needed. + to_launch = reply.to_launch + to_terminate = reply.to_terminate + updates = {} + # Add terminating instances. + for terminate_request in to_terminate: + instance_id = terminate_request.instance_id + if terminate_request.instance_status == IMInstance.ALLOCATED: + # The instance is not yet running, so we can't request to stop/drain Ray. + # Therefore, we can skip the RAY_STOP_REQUESTED state and directly terminate the node. + im_instance_to_terminate = im_instances_by_instance_id[instance_id] + updates[terminate_request.instance_id] = IMInstanceUpdateEvent( + instance_id=instance_id, + new_instance_status=IMInstance.TERMINATING, + cloud_instance_id=im_instance_to_terminate.cloud_instance_id, + termination_request=terminate_request, + details=f"terminating ray: {terminate_request.details}", + ) + else: + updates[terminate_request.instance_id] = IMInstanceUpdateEvent( + instance_id=instance_id, + new_instance_status=IMInstance.RAY_STOP_REQUESTED, + termination_request=terminate_request, + details=f"draining ray: {terminate_request.details}", + ) + + # Add new instances. + for launch_request in to_launch: + for _ in range(launch_request.count): + instance_id = InstanceUtil.random_instance_id() + updates[instance_id] = IMInstanceUpdateEvent( + instance_id=instance_id, + new_instance_status=IMInstance.QUEUED, + instance_type=launch_request.instance_type, + upsert=True, + details=( + f"queuing new instance of {launch_request.instance_type} " + "from scheduler" + ), + ) + + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _terminate_instances(instance_manager: InstanceManager): + """ + Terminate instances with the below statuses: + - RAY_STOPPED: ray was stopped on the cloud instance. + - RAY_INSTALL_FAILED: ray installation failed on the cloud instance, + we will not retry. + - TERMINATION_FAILED: cloud provider failed to terminate the instance + or timeout for termination happened, we will retry again. + + Args: + instance_manager: The instance manager to reconcile. + """ + + im_instances, version = Reconciler._get_im_instances(instance_manager) + updates = {} + for instance in im_instances: + if instance.status not in [ + IMInstance.RAY_STOPPED, + IMInstance.RAY_INSTALL_FAILED, + IMInstance.TERMINATION_FAILED, + ]: + continue + + # Terminate the instance. + updates[instance.instance_id] = IMInstanceUpdateEvent( + instance_id=instance.instance_id, + new_instance_status=IMInstance.TERMINATING, + cloud_instance_id=instance.cloud_instance_id, + details="terminating instance from " + f"{IMInstance.InstanceStatus.Name(instance.status)}", + ) + + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _install_ray( + instance_manager: InstanceManager, + non_terminated_cloud_instances: Dict[CloudInstanceId, CloudInstance], + ) -> None: + """ + Install ray on the allocated instances when it's ready (cloud instance + should be running) + + This is needed if ray installation needs to be performed by + the instance manager. + + Args: + instance_manager: The instance manager to reconcile. + """ + im_instances, version = Reconciler._get_im_instances(instance_manager) + updates = {} + for instance in im_instances: + if instance.status != IMInstance.ALLOCATED: + continue + + if instance.node_kind == NodeKind.HEAD: + # Skip head node. + continue + + cloud_instance = non_terminated_cloud_instances.get( + instance.cloud_instance_id + ) + + assert cloud_instance, ( + f"Cloud instance {instance.cloud_instance_id} is not found " + "in non_terminated_cloud_instances." + ) + + if not cloud_instance.is_running: + # It might still be pending (e.g. setting up ssh) + continue + + # Install ray on the running cloud instance + updates[instance.instance_id] = IMInstanceUpdateEvent( + instance_id=instance.instance_id, + new_instance_status=IMInstance.RAY_INSTALLING, + details="installing ray", + ) + + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _fill_autoscaling_state( + instance_manager: InstanceManager, + autoscaling_state: AutoscalingState, + ) -> None: + + # Use the IM instance version for the autoscaler_state_version + instances, version = Reconciler._get_im_instances(instance_manager) + autoscaling_state.autoscaler_state_version = version + + # Group instances by status + instances_by_status = defaultdict(list) + for instance in instances: + instances_by_status[instance.status].append(instance) + + # Pending instance requests + instances_by_launch_request = defaultdict(list) + queued_instances = [] + for instance in ( + instances_by_status[IMInstance.REQUESTED] + + instances_by_status[IMInstance.QUEUED] + ): + if instance.launch_request_id: + instances_by_launch_request[instance.launch_request_id].append(instance) + else: + queued_instances.append(instance) + + for _, instances in instances_by_launch_request.items(): + num_instances_by_type = defaultdict(int) + for instance in instances: + num_instances_by_type[instance.instance_type] += 1 + + # All instances with same request id should have the same + # request time. + request_update = InstanceUtil.get_last_status_transition( + instances[0], IMInstance.REQUESTED + ) + request_time_ns = request_update.timestamp_ns if request_update else 0 + + for instance_type, count in num_instances_by_type.items(): + autoscaling_state.pending_instance_requests.append( + PendingInstanceRequest( + ray_node_type_name=instance_type, + count=int(count), + request_ts=int(request_time_ns // 1e9), + ) + ) + + # Pending instances + for instance in ( + instances_by_status[IMInstance.ALLOCATED] + + instances_by_status[IMInstance.RAY_INSTALLING] + ): + + status_history = sorted( + instance.status_history, key=lambda x: x.timestamp_ns, reverse=True + ) + autoscaling_state.pending_instances.append( + PendingInstance( + instance_id=instance.instance_id, + ray_node_type_name=instance.instance_type, + details=status_history[0].details, + ) + ) + + # Failed instance requests + for instance in instances_by_status[IMInstance.ALLOCATION_FAILED]: + request_status_update = InstanceUtil.get_last_status_transition( + instance, IMInstance.REQUESTED + ) + failed_status_update = InstanceUtil.get_last_status_transition( + instance, IMInstance.ALLOCATION_FAILED + ) + failed_time = ( + failed_status_update.timestamp_ns if failed_status_update else 0 + ) + request_time = ( + request_status_update.timestamp_ns if request_status_update else 0 + ) + autoscaling_state.failed_instance_requests.append( + FailedInstanceRequest( + ray_node_type_name=instance.instance_type, + start_ts=int(request_time // 1e9), + failed_ts=int( + failed_time // 1e9, + ), + reason=failed_status_update.details, + count=1, + ) + ) + + @staticmethod + def _handle_stuck_requested_instance( + instance: IMInstance, timeout_s: int, max_num_retry_request_to_allocate: int + ) -> Optional[IMInstanceUpdateEvent]: + """ + Fail the cloud instance allocation if it's stuck in the REQUESTED state. + + Args: + instance: The instance to handle. + timeout_s: The timeout in seconds. + max_num_retry_request_to_allocate: The maximum number of times an instance + could be requested to allocate. + + Returns: + Instance update to ALLOCATION_FAILED: if the instance allocation failed + with errors. + None: if there's no update. + + """ + if not InstanceUtil.has_timeout(instance, timeout_s): + # Not timeout yet, be patient. + return None + + all_request_times_ns = sorted( + InstanceUtil.get_status_transition_times_ns( + instance, select_instance_status=IMInstance.REQUESTED + ) + ) + + # Fail the allocation if we have tried too many times. + if len(all_request_times_ns) > max_num_retry_request_to_allocate: + return IMInstanceUpdateEvent( + instance_id=instance.instance_id, + new_instance_status=IMInstance.ALLOCATION_FAILED, + details=( + "failed to allocate cloud instance after " + f"{len(all_request_times_ns)} attempts > " + f"max_num_retry_request_to_allocate={max_num_retry_request_to_allocate}" # noqa + ), + ) + + # Retry the allocation if we could by transitioning to QUEUED again. + return IMInstanceUpdateEvent( + instance_id=instance.instance_id, + new_instance_status=IMInstance.QUEUED, + details=f"queue again to launch after timeout={timeout_s}s", + ) + + @staticmethod + def _handle_stuck_instance( + instance: IMInstance, + timeout_s: int, + new_status: IMInstance.InstanceStatus, + **update_kwargs: Dict, + ) -> Optional[IMInstanceUpdateEvent]: + """ + Fail the instance if it's stuck in the status for too long. + + Args: + instance: The instance to handle. + timeout_s: The timeout in seconds. + new_status: The new status to transition to. + update_kwargs: The update kwargs for InstanceUpdateEvent + + Returns: + Instance update to the new status: if the instance is stuck in the status + for too long. + None: if there's no update. + + """ + if not InstanceUtil.has_timeout(instance, timeout_s): + # Not timeout yet, be patient. + return None + + return IMInstanceUpdateEvent( + instance_id=instance.instance_id, + new_instance_status=new_status, + details=f"timeout={timeout_s}s at status " + f"{IMInstance.InstanceStatus.Name(instance.status)}", + **update_kwargs, + ) + + @staticmethod + def _handle_extra_cloud_instances( + instance_manager: InstanceManager, + non_terminated_cloud_instances: Dict[CloudInstanceId, CloudInstance], + ray_nodes: List[NodeState], + ): + """ + For extra cloud instances (i.e. cloud instances that are non terminated as + returned by cloud provider, but not managed by the instance manager), we + will create new IM instances with ALLOCATED status. + + Such instances could either be: + 1. Leaked instances that are incorrectly started by the cloud instance + provider, and they would be terminated eventually if they fail to + transition to RAY_RUNNING by stuck instances reconciliation, or they + would join the ray cluster and be terminated when the cluster scales down. + 2. Instances that are started by the cloud instance provider intentionally + but not yet discovered by the instance manager. This could happen for + a. Head node that's started before the autoscaler. + b. Worker nodes that's started by the cloud provider upon users' + actions: i.e. KubeRay scaling up the cluster with ray cluster config + change. + 3. Ray nodes with cloud instance id not in the cloud provider. This could + happen if there's delay in the Ray's state (i.e. cloud instance already + terminated, but the ray node is still not dead yet). + + Args: + instance_manager: The instance manager to reconcile. + non_terminated_cloud_instances: The non-terminated cloud instances from + the cloud provider. + ray_nodes: The ray cluster's states of ray nodes. + """ + Reconciler._handle_extra_cloud_instances_from_ray_nodes( + instance_manager, ray_nodes + ) + Reconciler._handle_extra_cloud_instances_from_cloud_provider( + instance_manager, non_terminated_cloud_instances + ) + + @staticmethod + def _handle_extra_cloud_instances_from_cloud_provider( + instance_manager: InstanceManager, + non_terminated_cloud_instances: Dict[CloudInstanceId, CloudInstance], + ): + """ + For extra cloud instances that are not managed by the instance manager but + are running in the cloud provider, we will create new IM instances with + ALLOCATED status. + + Args: + instance_manager: The instance manager to reconcile. + non_terminated_cloud_instances: The non-terminated cloud instances from + the cloud provider. + """ + updates = {} + + instances, version = Reconciler._get_im_instances(instance_manager) + cloud_instance_ids_managed_by_im = { + instance.cloud_instance_id + for instance in instances + if instance.cloud_instance_id + and instance.status + not in [IMInstance.TERMINATED, IMInstance.ALLOCATION_FAILED] + } + + # Find the extra cloud instances that are not managed by the instance manager. + for cloud_instance_id, cloud_instance in non_terminated_cloud_instances.items(): + if cloud_instance_id in cloud_instance_ids_managed_by_im: + continue + updates[cloud_instance_id] = IMInstanceUpdateEvent( + instance_id=InstanceUtil.random_instance_id(), # Assign a new id. + cloud_instance_id=cloud_instance_id, + new_instance_status=IMInstance.ALLOCATED, + node_kind=cloud_instance.node_kind, + instance_type=cloud_instance.node_type, + details=( + "allocated unmanaged cloud instance :" + f"{cloud_instance.cloud_instance_id} " + f"({NodeKind.Name(cloud_instance.node_kind)}) from cloud provider" + ), + upsert=True, + ) + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _handle_extra_cloud_instances_from_ray_nodes( + instance_manager: InstanceManager, ray_nodes: List[NodeState] + ): + """ + For extra cloud instances reported by Ray but not managed by the instance + manager, we will create new IM instances with ALLOCATED status. + + Args: + instance_manager: The instance manager to reconcile. + ray_nodes: The ray cluster's states of ray nodes. + """ + updates = {} + + instances, version = Reconciler._get_im_instances(instance_manager) + cloud_instance_ids_managed_by_im = { + instance.cloud_instance_id + for instance in instances + if instance.cloud_instance_id + and not instance.node_id + and instance.status + not in [IMInstance.TERMINATED, IMInstance.ALLOCATION_FAILED] + } + ray_node_ids_managed_by_im = { + instance.node_id for instance in instances if instance.node_id + } + + for ray_node in ray_nodes: + if not ray_node.instance_id: + continue + + ray_node_id = binary_to_hex(ray_node.node_id) + if ray_node_id in ray_node_ids_managed_by_im: + continue + + cloud_instance_id = ray_node.instance_id + if cloud_instance_id in cloud_instance_ids_managed_by_im: + continue + + is_head = is_head_node(ray_node) + updates[ray_node_id] = IMInstanceUpdateEvent( + instance_id=InstanceUtil.random_instance_id(), # Assign a new id. + cloud_instance_id=cloud_instance_id, + new_instance_status=IMInstance.ALLOCATED, + node_kind=NodeKind.HEAD if is_head else NodeKind.WORKER, + ray_node_id=ray_node_id, + instance_type=ray_node.ray_node_type_name, + details=( + "allocated unmanaged worker cloud instance from ray node: " + f"{ray_node_id}" + ), + upsert=True, + ) + + Reconciler._update_instance_manager(instance_manager, version, updates) + + @staticmethod + def _report_metrics( + instance_manager: InstanceManager, + autoscaling_config: AutoscalingConfig, + metrics_reporter: Optional[AutoscalerMetricsReporter] = None, + ): + if not metrics_reporter: + return + + instances, _ = Reconciler._get_im_instances(instance_manager) + node_type_configs = autoscaling_config.get_node_type_configs() + + metrics_reporter.report_instances(instances, node_type_configs) + metrics_reporter.report_resources(instances, node_type_configs) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/storage.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/storage.py new file mode 100644 index 0000000000000000000000000000000000000000..40447bf796962de488a8f11add7f3f0786dace3a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/storage.py @@ -0,0 +1,180 @@ +import copy +from abc import ABCMeta, abstractmethod +from collections import defaultdict, namedtuple +from threading import Lock +from typing import Dict, List, Optional, Tuple + +StoreStatus = namedtuple("StoreStatus", ["success", "version"]) +VersionedValue = namedtuple("VersionedValue", ["value", "version"]) + + +class Storage(metaclass=ABCMeta): + """Interface for a storage backend that stores the state of nodes in the cluster. + + The storage is thread-safe. + + The storage is versioned, which means that each successful stage change to the + storage will bump the version number. The version number can be used to + implement optimistic concurrency control. + + Each entry in the storage table is also versioned. The version number of an entry + is the last version number when the entry is updated. + """ + + @abstractmethod + def batch_update( + self, + table: str, + mutation: Optional[Dict[str, str]] = None, + deletion: Optional[List[str]] = None, + expected_storage_version: Optional[int] = None, + ) -> StoreStatus: + """Batch update the storage table. This method is atomic. + + Args: + table: The name of the table. + mutation: A dictionary of key-value pairs to be updated. + deletion: A list of keys to be deleted. + expected_storage_version: The expected storage version. The + update will fail if the version does not match the + current storage version. + + Returns: + StoreStatus: A tuple of (success, version). If the update is + successful, returns (True, new_version). + Otherwise, returns (False, current_version). + """ + raise NotImplementedError("batch_update() has to be implemented") + + @abstractmethod + def update( + self, + table: str, + key: str, + value: str, + expected_entry_version: Optional[int] = None, + insert_only: bool = False, + ) -> StoreStatus: + """Update a single entry in the storage table. + + Args: + table: The name of the table. + key: The key of the entry. + value: The value of the entry. + expected_entry_version: The expected version of the entry. + The update will fail if the version does not match the current + version of the entry. + insert_only: If True, the update will + fail if the entry already exists. + Returns: + StoreStatus: A tuple of (success, version). If the update is + successful, returns (True, new_version). Otherwise, + returns (False, current_version). + """ + raise NotImplementedError("update() has to be implemented") + + @abstractmethod + def get_all(self, table: str) -> Tuple[Dict[str, Tuple[str, int]], int]: + raise NotImplementedError("get_all() has to be implemented") + + @abstractmethod + def get( + self, table: str, keys: List[str] + ) -> Tuple[Dict[str, Tuple[str, int]], int]: + """Get a list of entries from the storage table. + + Args: + table: The name of the table. + keys: A list of keys to be retrieved. If the list is empty, + all entries in the table will be returned. + + Returns: + Tuple[Dict[str, VersionedValue], int]: A tuple of + (entries, storage_version). The entries is a dictionary of + (key, (value, entry_version)) pairs. The entry_version is the + version of the entry when it was last updated. The + storage_version is the current storage version. + """ + raise NotImplementedError("get() has to be implemented") + + @abstractmethod + def get_version(self) -> int: + """Get the current storage version. + + Returns: + int: The current storage version. + """ + raise NotImplementedError("get_version() has to be implemented") + + +class InMemoryStorage(Storage): + """An in-memory implementation of the Storage interface. This implementation + is not durable""" + + def __init__(self): + self._version = 0 + self._tables = defaultdict(dict) + self._lock = Lock() + + def batch_update( + self, + table: str, + mutation: Dict[str, str] = None, + deletion: List[str] = None, + expected_version: Optional[int] = None, + ) -> StoreStatus: + mutation = mutation if mutation else {} + deletion = deletion if deletion else [] + with self._lock: + if expected_version is not None and expected_version != self._version: + return StoreStatus(False, self._version) + self._version += 1 + key_value_pairs_with_version = { + key: VersionedValue(value, self._version) + for key, value in mutation.items() + } + self._tables[table].update(key_value_pairs_with_version) + for deleted_key in deletion: + self._tables[table].pop(deleted_key, None) + return StoreStatus(True, self._version) + + def update( + self, + table: str, + key: str, + value: str, + expected_entry_version: Optional[int] = None, + expected_storage_version: Optional[int] = None, + insert_only: bool = False, + ) -> StoreStatus: + with self._lock: + if ( + expected_storage_version is not None + and expected_storage_version != self._version + ): + return StoreStatus(False, self._version) + if insert_only and key in self._tables[table]: + return StoreStatus(False, self._version) + _, version = self._tables[table].get(key, (None, -1)) + if expected_entry_version is not None and expected_entry_version != version: + return StoreStatus(False, self._version) + self._version += 1 + self._tables[table][key] = VersionedValue(value, self._version) + return StoreStatus(True, self._version) + + def get_all(self, table: str) -> Tuple[Dict[str, VersionedValue], int]: + with self._lock: + return (copy.deepcopy(self._tables[table]), self._version) + + def get(self, table: str, keys: List[str]) -> Tuple[Dict[str, VersionedValue], int]: + if not keys: + return self.get_all(table) + with self._lock: + result = {} + for key in keys: + if key in self._tables.get(table, {}): + result[key] = self._tables[table][key] + return StoreStatus(result, self._version) + + def get_version(self) -> int: + return self._version diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f9be46c40dfa7951cea35edf86c631b30317faf8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/cloud_instance_updater.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/cloud_instance_updater.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..36b032b8cabfb61a920519c1134a1c808f87b56e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/cloud_instance_updater.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/ray_stopper.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/ray_stopper.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..26068cca5fe0334b044e074f77ac83808470e6af Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/ray_stopper.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/threaded_ray_installer.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/threaded_ray_installer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..400e18e9f80c4b9958c31bf571a40c82d3ef06a8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/__pycache__/threaded_ray_installer.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/cloud_instance_updater.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/cloud_instance_updater.py new file mode 100644 index 0000000000000000000000000000000000000000..747525439d2d1c157d6d276ec942744ba50a8fb5 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/cloud_instance_updater.py @@ -0,0 +1,93 @@ +import logging +import uuid +from collections import defaultdict +from typing import List + +from ray.autoscaler.v2.instance_manager.instance_manager import ( + InstanceUpdatedSubscriber, +) +from ray.autoscaler.v2.instance_manager.node_provider import ICloudInstanceProvider +from ray.core.generated.instance_manager_pb2 import Instance, InstanceUpdateEvent + +logger = logging.getLogger(__name__) + + +class CloudInstanceUpdater(InstanceUpdatedSubscriber): + """CloudInstanceUpdater is responsible for launching + new instances and terminating cloud instances + + It requests the cloud instance provider to launch new instances when + there are new instance requests (with REQUESTED status change). + + It requests the cloud instance provider to terminate instances when + there are new instance terminations (with TERMINATING status change). + + The cloud instance APIs are async and non-blocking. + """ + + def __init__( + self, + cloud_provider: ICloudInstanceProvider, + ) -> None: + self._cloud_provider = cloud_provider + + def notify(self, events: List[InstanceUpdateEvent]) -> None: + new_requests = [ + event for event in events if event.new_instance_status == Instance.REQUESTED + ] + new_terminations = [ + event + for event in events + if event.new_instance_status == Instance.TERMINATING + ] + self._launch_new_instances(new_requests) + self._terminate_instances(new_terminations) + + def _terminate_instances(self, new_terminations: List[InstanceUpdateEvent]): + """ + Terminate cloud instances through cloud provider. + + Args: + new_terminations: List of new instance terminations. + """ + if not new_terminations: + logger.debug("No instances to terminate.") + return + + # Terminate the instances. + cloud_instance_ids = [event.cloud_instance_id for event in new_terminations] + + # This is an async call. + self._cloud_provider.terminate( + ids=cloud_instance_ids, request_id=str(uuid.uuid4()) + ) + + def _launch_new_instances(self, new_requests: List[InstanceUpdateEvent]): + """ + Launches new instances by requesting the cloud provider. + + Args: + new_requests: List of new instance requests. + + """ + if not new_requests: + logger.debug("No instances to launch.") + return + + # Group new requests by launch request id. + requests_by_launch_request_id = defaultdict(list) + + for event in new_requests: + assert ( + event.launch_request_id + ), "Launch request id should have been set by the reconciler" + requests_by_launch_request_id[event.launch_request_id].append(event) + + for launch_request_id, events in requests_by_launch_request_id.items(): + request_shape = defaultdict(int) + for event in events: + request_shape[event.instance_type] += 1 + # Make requests to the cloud provider. + self._cloud_provider.launch( + shape=request_shape, request_id=launch_request_id + ) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/ray_stopper.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/ray_stopper.py new file mode 100644 index 0000000000000000000000000000000000000000..75b35b373a91c8f4f98914fc9b8573ea88334ee6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/ray_stopper.py @@ -0,0 +1,154 @@ +import logging +from concurrent.futures import ThreadPoolExecutor +from dataclasses import dataclass +from queue import Queue +from typing import List + +from ray._common.utils import hex_to_binary +from ray._raylet import GcsClient +from ray.autoscaler.v2.instance_manager.instance_manager import ( + InstanceUpdatedSubscriber, +) +from ray.core.generated.autoscaler_pb2 import DrainNodeReason +from ray.core.generated.instance_manager_pb2 import ( + Instance, + InstanceUpdateEvent, + TerminationRequest, +) + +logger = logging.getLogger(__name__) + + +@dataclass(frozen=True) +class RayStopError: + # Instance manager's instance id. + im_instance_id: str + + +class RayStopper(InstanceUpdatedSubscriber): + """RayStopper is responsible for stopping ray on instances. + + It will drain the ray node if it's for idle termination. + For other terminations, it will stop the ray node. (e.g. scale down, etc.) + + If any failures happen when stopping/draining the node, we will not retry + and rely on the reconciler to handle the failure. + + TODO: we could also surface the errors back to the reconciler for + quicker failure detection. + + """ + + def __init__(self, gcs_client: GcsClient, error_queue: Queue) -> None: + self._gcs_client = gcs_client + self._error_queue = error_queue + self._executor = ThreadPoolExecutor(max_workers=1) + + def notify(self, events: List[InstanceUpdateEvent]) -> None: + for event in events: + if event.new_instance_status == Instance.RAY_STOP_REQUESTED: + fut = self._executor.submit(self._stop_or_drain_ray, event) + + def _log_on_error(fut): + try: + fut.result() + except Exception: + logger.exception("Error stopping/drain ray.") + + fut.add_done_callback(_log_on_error) + + def _stop_or_drain_ray(self, event: InstanceUpdateEvent) -> None: + """ + Stops or drains the ray node based on the termination request. + """ + assert event.HasField("termination_request"), "Termination request is required." + termination_request = event.termination_request + ray_node_id = termination_request.ray_node_id + instance_id = event.instance_id + + if termination_request.cause == TerminationRequest.Cause.IDLE: + reason = DrainNodeReason.DRAIN_NODE_REASON_IDLE_TERMINATION + reason_str = "Termination of node that's idle for {} seconds.".format( + termination_request.idle_duration_ms / 1000 + ) + self._drain_ray_node( + self._gcs_client, + self._error_queue, + ray_node_id, + instance_id, + reason, + reason_str, + ) + return + + # If it's not an idle termination, we stop the ray node. + self._stop_ray_node( + self._gcs_client, self._error_queue, ray_node_id, instance_id + ) + + @staticmethod + def _drain_ray_node( + gcs_client: GcsClient, + error_queue: Queue, + ray_node_id: str, + instance_id: str, + reason: DrainNodeReason, + reason_str: str, + ): + """ + Drains the ray node. + + Args: + gcs_client: The gcs client to use. + ray_node_id: The ray node id to drain. + reason: The reason to drain the node. + reason_str: The reason message to drain the node. + """ + try: + accepted, reject_msg_str = gcs_client.drain_node( + node_id=ray_node_id, + reason=reason, + reason_message=reason_str, + # TODO: we could probably add a deadline here that's derived + # from the stuck instance reconciliation configs. + deadline_timestamp_ms=0, + ) + logger.info( + f"Drained ray on {ray_node_id}(success={accepted}, " + f"msg={reject_msg_str})" + ) + if not accepted: + error_queue.put_nowait(RayStopError(im_instance_id=instance_id)) + except Exception: + logger.exception(f"Error draining ray on {ray_node_id}") + error_queue.put_nowait(RayStopError(im_instance_id=instance_id)) + + @staticmethod + def _stop_ray_node( + gcs_client: GcsClient, + error_queue: Queue, + ray_node_id: str, + instance_id: str, + ): + """ + Stops the ray node. + + Args: + gcs_client: The gcs client to use. + ray_node_id: The ray node id to stop. + """ + try: + drained = gcs_client.drain_nodes(node_ids=[hex_to_binary(ray_node_id)]) + success = len(drained) > 0 + logger.info( + f"Stopping ray on {ray_node_id}(instance={instance_id}): " + f"success={success})" + ) + + if not success: + error_queue.put_nowait(RayStopError(im_instance_id=instance_id)) + except Exception: + logger.exception( + f"Error stopping ray on {ray_node_id}(instance={instance_id})" + ) + error_queue.put_nowait(RayStopError(im_instance_id=instance_id)) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/threaded_ray_installer.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/threaded_ray_installer.py new file mode 100644 index 0000000000000000000000000000000000000000..d364ccea07e0f96f8deee93b2d49c84cadffa4e4 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/instance_manager/subscribers/threaded_ray_installer.py @@ -0,0 +1,95 @@ +import dataclasses +import logging +import time +from concurrent.futures import ThreadPoolExecutor +from typing import List +from queue import Queue + +from ray.autoscaler.v2.instance_manager.instance_manager import ( + InstanceUpdatedSubscriber, +) +from ray.autoscaler.v2.instance_manager.instance_storage import InstanceStorage +from ray.autoscaler.v2.instance_manager.ray_installer import RayInstaller +from ray.core.generated.instance_manager_pb2 import ( + NodeKind, + Instance, + InstanceUpdateEvent, +) + +logger = logging.getLogger(__name__) + + +@dataclasses.dataclass(frozen=True) +class RayInstallError: + # Instance manager's instance id. + im_instance_id: str + # Error details. + details: str + + +class ThreadedRayInstaller(InstanceUpdatedSubscriber): + """ThreadedRayInstaller is responsible for install ray on new nodes.""" + + def __init__( + self, + head_node_ip: str, + instance_storage: InstanceStorage, + ray_installer: RayInstaller, + error_queue: Queue, + max_install_attempts: int = 3, + install_retry_interval: int = 10, + max_concurrent_installs: int = 50, + ) -> None: + self._head_node_ip = head_node_ip + self._instance_storage = instance_storage + self._ray_installer = ray_installer + self._max_concurrent_installs = max_concurrent_installs + self._max_install_attempts = max_install_attempts + self._install_retry_interval = install_retry_interval + self._error_queue = error_queue + self._ray_installation_executor = ThreadPoolExecutor( + max_workers=self._max_concurrent_installs + ) + + def notify(self, events: List[InstanceUpdateEvent]) -> None: + for event in events: + if event.new_instance_status == Instance.RAY_INSTALLING: + self._install_ray_on_new_nodes(event.instance_id) + + def _install_ray_on_new_nodes(self, instance_id: str) -> None: + allocated_instance, _ = self._instance_storage.get_instances( + instance_ids={instance_id}, + status_filter={Instance.RAY_INSTALLING}, + ) + for instance in allocated_instance.values(): + assert instance.node_kind == NodeKind.WORKER + self._ray_installation_executor.submit( + self._install_ray_on_single_node, instance + ) + + def _install_ray_on_single_node(self, instance: Instance) -> None: + assert instance.status == Instance.RAY_INSTALLING + + # install with exponential backoff + backoff_factor = 1 + last_exception = None + for _ in range(self._max_install_attempts): + try: + self._ray_installer.install_ray(instance, self._head_node_ip) + return + except Exception as e: + logger.info( + f"Ray installation failed on instance {instance.cloud_instance_id}: {e}" + ) + last_exception = e + + logger.warning("Failed to install ray, retrying...") + time.sleep(self._install_retry_interval * backoff_factor) + backoff_factor *= 2 + + self._error_queue.put_nowait( + RayInstallError( + im_instance_id=instance.instance_id, + details=str(last_exception), + ) + ) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/metrics_reporter.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/metrics_reporter.py new file mode 100644 index 0000000000000000000000000000000000000000..4fbe6e10f1db419ed2ee73949fde94129d55fee9 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/metrics_reporter.py @@ -0,0 +1,100 @@ +from collections import defaultdict +from typing import Dict, List + +from ray.autoscaler._private.prom_metrics import AutoscalerPrometheusMetrics +from ray.autoscaler.v2.instance_manager.common import InstanceUtil +from ray.autoscaler.v2.instance_manager.config import NodeTypeConfig +from ray.autoscaler.v2.schema import NodeType +from ray.core.generated.instance_manager_pb2 import Instance as IMInstance + + +class AutoscalerMetricsReporter: + def __init__(self, prom_metrics: AutoscalerPrometheusMetrics) -> None: + self._prom_metrics = prom_metrics + + def report_instances( + self, + instances: List[IMInstance], + node_type_configs: Dict[NodeType, NodeTypeConfig], + ): + """ + Record autoscaler metrics for: + - pending_nodes: Nodes that are launching/pending ray start + - active_nodes: Active nodes (nodes running ray) + - recently_failed_nodes: Nodes that are being terminated. + - stopped_nodes: Nodes that are terminated. + """ + # map of instance type to a dict of status to count. + status_count_by_type: Dict[NodeType : Dict[str, int]] = {} + # initialize the status count by type. + for instance_type in node_type_configs.keys(): + status_count_by_type[instance_type] = { + "pending": 0, + "running": 0, + "terminating": 0, + "terminated": 0, + } + + for instance in instances: + if InstanceUtil.is_ray_pending(instance.status): + status_count_by_type[instance.instance_type]["pending"] += 1 + elif InstanceUtil.is_ray_running(instance.status): + status_count_by_type[instance.instance_type]["running"] += 1 + elif instance.status == IMInstance.TERMINATING: + status_count_by_type[instance.instance_type]["terminating"] += 1 + elif instance.status == IMInstance.TERMINATED: + status_count_by_type[instance.instance_type]["terminated"] += 1 + + for instance_type, status_count in status_count_by_type.items(): + self._prom_metrics.pending_nodes.labels( + SessionName=self._prom_metrics.session_name, NodeType=instance_type + ).set(status_count["pending"]) + + self._prom_metrics.active_nodes.labels( + SessionName=self._prom_metrics.session_name, NodeType=instance_type + ).set(status_count["running"]) + + self._prom_metrics.recently_failed_nodes.labels( + SessionName=self._prom_metrics.session_name, NodeType=instance_type + ).set(status_count["terminating"]) + + self._prom_metrics.stopped_nodes.inc(status_count["terminated"]) + + def report_resources( + self, + instances: List[IMInstance], + node_type_configs: Dict[NodeType, NodeTypeConfig], + ): + """ + Record autoscaler metrics for: + - pending_resources: Pending resources + - cluster_resources: Cluster resources (resources running on the cluster) + """ + # pending resources. + pending_resources = defaultdict(float) + cluster_resources = defaultdict(float) + + def _add_resources(resource_map, node_type_configs, node_type, count): + node_resources = node_type_configs[node_type].resources + for resource_name, resource_value in node_resources.items(): + resource_map[resource_name] += resource_value * count + + for instance in instances: + if InstanceUtil.is_ray_pending(instance.status): + _add_resources( + pending_resources, node_type_configs, instance.instance_type, 1 + ) + elif InstanceUtil.is_ray_running(instance.status): + _add_resources( + cluster_resources, node_type_configs, instance.instance_type, 1 + ) + + for resource_name, resource_value in pending_resources.items(): + self._prom_metrics.pending_resources.labels( + SessionName=self._prom_metrics.session_name, resource=resource_name + ).set(resource_value) + + for resource_name, resource_value in cluster_resources.items(): + self._prom_metrics.cluster_resources.labels( + SessionName=self._prom_metrics.session_name, resource=resource_name + ).set(resource_value) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/monitor.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/monitor.py new file mode 100644 index 0000000000000000000000000000000000000000..e771d6e7e404d3cf204d26aa95701d4c236c655a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/monitor.py @@ -0,0 +1,336 @@ +"""Autoscaler monitoring loop daemon. + +See autoscaler._private/monitor.py for the legacy implementation. All the legacy flags +are supported here, but the new implementation uses the new autoscaler v2. +""" + +import argparse +import logging +import os +import sys +import time +from typing import Optional + +import ray +import ray._private.ray_constants as ray_constants +from ray._common.ray_constants import ( + LOGGING_ROTATE_BYTES, + LOGGING_ROTATE_BACKUP_COUNT, +) +from ray._private.event.event_logger import get_event_logger +from ray._private.ray_logging import setup_component_logger +from ray._common.usage.usage_lib import record_extra_usage_tag +from ray._private.worker import SCRIPT_MODE +from ray._raylet import GcsClient +from ray._common.network_utils import parse_address, build_address +from ray.autoscaler._private.constants import ( + AUTOSCALER_METRIC_PORT, + AUTOSCALER_UPDATE_INTERVAL_S, +) +from ray.autoscaler._private.prom_metrics import AutoscalerPrometheusMetrics +from ray.autoscaler.v2.autoscaler import Autoscaler +from ray.autoscaler.v2.event_logger import AutoscalerEventLogger +from ray.autoscaler.v2.instance_manager.config import ( + FileConfigReader, + IConfigReader, + ReadOnlyProviderConfigReader, +) +from ray.autoscaler.v2.metrics_reporter import AutoscalerMetricsReporter +from ray.core.generated.autoscaler_pb2 import AutoscalingState +from ray.core.generated.event_pb2 import Event as RayEvent +from ray.core.generated.usage_pb2 import TagKey +from ray._private import logging_utils + +try: + import prometheus_client +except ImportError: + prometheus_client = None + + +logger = logging.getLogger(__name__) + + +class AutoscalerMonitor: + """Autoscaling monitor. + + This process periodically collects stats from the GCS and triggers + autoscaler updates. + + TODO: + We should also handle autoscaler failures properly in the future. + Right now, we don't restart autoscaler if it fails (internal reconciliation + however, should not fail the autoscaler process). + With the Reconciler able to handle extra cloud instances, we could in fact + recover the autoscaler process from reconciliation. + """ + + def __init__( + self, + address: str, + config_reader: IConfigReader, + log_dir: Optional[str] = None, + monitor_ip: Optional[str] = None, + ): + # Record v2 usage (we do this as early as possible to capture usage) + record_autoscaler_v2_usage(GcsClient(address)) + + self.gcs_address = address + worker = ray._private.worker.global_worker + # TODO: eventually plumb ClusterID through to here + self.gcs_client = GcsClient(address=self.gcs_address) + + if monitor_ip: + monitor_addr = build_address(monitor_ip, AUTOSCALER_METRIC_PORT) + self.gcs_client.internal_kv_put( + b"AutoscalerMetricsAddress", monitor_addr.encode(), True, None + ) + self._session_name = self._get_session_name(self.gcs_client) + logger.info(f"session_name: {self._session_name}") + worker.set_mode(SCRIPT_MODE) + head_node_ip = parse_address(self.gcs_address)[0] + + self.autoscaler = None + if log_dir: + try: + ray_event_logger = get_event_logger( + RayEvent.SourceType.AUTOSCALER, log_dir + ) + self.event_logger = AutoscalerEventLogger(ray_event_logger) + except Exception: + self.event_logger = None + else: + self.event_logger = None + + prom_metrics = AutoscalerPrometheusMetrics(session_name=self._session_name) + self.metric_reporter = AutoscalerMetricsReporter(prom_metrics) + + if monitor_ip and prometheus_client: + # If monitor_ip wasn't passed in, then don't attempt to start the + # metric server to keep behavior identical to before metrics were + # introduced + try: + logger.info( + "Starting autoscaler metrics server on port {}".format( + AUTOSCALER_METRIC_PORT + ) + ) + kwargs = {"addr": "127.0.0.1"} if head_node_ip == "127.0.0.1" else {} + prometheus_client.start_http_server( + port=AUTOSCALER_METRIC_PORT, + registry=prom_metrics.registry, + **kwargs, + ) + except Exception: + logger.exception( + "An exception occurred while starting the metrics server." + ) + elif not prometheus_client: + logger.warning( + "`prometheus_client` not found, so metrics will not be exported." + ) + + self.autoscaler = Autoscaler( + session_name=self._session_name, + config_reader=config_reader, + gcs_client=self.gcs_client, + event_logger=self.event_logger, + metrics_reporter=self.metric_reporter, + ) + + @staticmethod + def _get_session_name(gcs_client: GcsClient) -> Optional[str]: + """Obtain the session name from the GCS. + + If the GCS doesn't respond, session name is considered None. + In this case, the metrics reported from the monitor won't have + the correct session name. + """ + session_name = gcs_client.internal_kv_get( + b"session_name", + ray_constants.KV_NAMESPACE_SESSION, + timeout=10, + ) + + if session_name: + session_name = session_name.decode() + + return session_name + + @staticmethod + def _report_autoscaling_state( + gcs_client: GcsClient, autoscaling_state: AutoscalingState + ): + """Report the autoscaling state to the GCS.""" + try: + gcs_client.report_autoscaling_state(autoscaling_state.SerializeToString()) + except Exception: + logger.exception("Error reporting autoscaling state to GCS.") + + def _run(self): + """Run the monitor loop.""" + + while True: + autoscaling_state = self.autoscaler.update_autoscaling_state() + if autoscaling_state: + # report autoscaling state + self._report_autoscaling_state(self.gcs_client, autoscaling_state) + else: + logger.warning("No autoscaling state to report.") + + # Wait for a autoscaler update interval before processing the next + # round of messages. + time.sleep(AUTOSCALER_UPDATE_INTERVAL_S) + + def run(self): + try: + self._run() + except Exception: + logger.exception("Error in monitor loop") + raise + + +def record_autoscaler_v2_usage(gcs_client: GcsClient) -> None: + """ + Record usage for autoscaler v2. + """ + try: + record_extra_usage_tag(TagKey.AUTOSCALER_VERSION, "v2", gcs_client) + except Exception: + logger.exception("Error recording usage for autoscaler v2.") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description=("Parse GCS server for the monitor to connect to.") + ) + parser.add_argument( + "--gcs-address", required=False, type=str, help="The address (ip:port) of GCS." + ) + parser.add_argument( + "--autoscaling-config", + required=False, + type=str, + help="the path to the autoscaling config file", + ) + parser.add_argument( + "--logging-level", + required=False, + type=str, + default=ray_constants.LOGGER_LEVEL, + choices=ray_constants.LOGGER_LEVEL_CHOICES, + help=ray_constants.LOGGER_LEVEL_HELP, + ) + parser.add_argument( + "--logging-format", + required=False, + type=str, + default=ray_constants.LOGGER_FORMAT, + help=ray_constants.LOGGER_FORMAT_HELP, + ) + parser.add_argument( + "--logging-filename", + required=False, + type=str, + default=ray_constants.MONITOR_LOG_FILE_NAME, + help="Specify the name of log file, " + "log to stdout if set empty, default is " + f'"{ray_constants.MONITOR_LOG_FILE_NAME}"', + ) + parser.add_argument( + "--logs-dir", + required=True, + type=str, + help="Specify the path of the temporary directory used by Ray processes.", + ) + parser.add_argument( + "--logging-rotate-bytes", + required=False, + type=int, + default=LOGGING_ROTATE_BYTES, + help="Specify the max bytes for rotating " + "log file, default is " + f"{LOGGING_ROTATE_BYTES} bytes.", + ) + parser.add_argument( + "--logging-rotate-backup-count", + required=False, + type=int, + default=LOGGING_ROTATE_BACKUP_COUNT, + help="Specify the backup count of rotated log file, default is " + f"{LOGGING_ROTATE_BACKUP_COUNT}.", + ) + parser.add_argument( + "--monitor-ip", + required=False, + type=str, + default=None, + help="The IP address of the machine hosting the monitor process.", + ) + parser.add_argument( + "--stdout-filepath", + required=False, + type=str, + default="", + help="The filepath to dump monitor stdout.", + ) + parser.add_argument( + "--stderr-filepath", + required=False, + type=str, + default="", + help="The filepath to dump monitor stderr.", + ) + + args = parser.parse_args() + + # Disable log rotation for windows platform. + logging_rotation_bytes = args.logging_rotate_bytes if sys.platform != "win32" else 0 + logging_rotation_backup_count = ( + args.logging_rotate_backup_count if sys.platform != "win32" else 1 + ) + + setup_component_logger( + logging_level=args.logging_level, + logging_format=args.logging_format, + log_dir=args.logs_dir, + filename=args.logging_filename, + max_bytes=logging_rotation_bytes, + backup_count=logging_rotation_backup_count, + ) + + # Setup stdout/stderr redirect files if redirection enabled. + logging_utils.redirect_stdout_stderr_if_needed( + args.stdout_filepath, + args.stderr_filepath, + logging_rotation_bytes, + logging_rotation_backup_count, + ) + + logger.info( + f"Starting autoscaler v2 monitor using ray installation: {ray.__file__}" + ) + logger.info(f"Ray version: {ray.__version__}") + logger.info(f"Ray commit: {ray.__commit__}") + logger.info(f"AutoscalerMonitor started with command: {sys.argv}") + + gcs_address = args.gcs_address + if gcs_address is None: + raise ValueError("--gcs-address must be set!") + + if not args.autoscaling_config: + logger.info("No autoscaling config provided: use read only node provider.") + config_reader = ReadOnlyProviderConfigReader(gcs_address) + else: + autoscaling_config = os.path.expanduser(args.autoscaling_config) + config_reader = FileConfigReader( + config_file=autoscaling_config, skip_content_hash=True + ) + + monitor = AutoscalerMonitor( + gcs_address, + config_reader, + log_dir=args.logs_dir, + monitor_ip=args.monitor_ip, + ) + + monitor.run() diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/scheduler.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/scheduler.py new file mode 100644 index 0000000000000000000000000000000000000000..641baa2c81a9cc744d3ab7ff15e8ea5d27cbb3ea --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/scheduler.py @@ -0,0 +1,1725 @@ +import copy +import logging +import time +import uuid +from abc import ABC, abstractmethod +from collections import defaultdict +from dataclasses import dataclass, field +from enum import Enum +from typing import Dict, List, Optional, Tuple + +from ray._private.protobuf_compat import message_to_dict +from ray.autoscaler._private.constants import AUTOSCALER_CONSERVE_GPU_NODES +from ray.autoscaler._private.resource_demand_scheduler import ( + UtilizationScore, + _fits, + _inplace_subtract, +) +from ray.autoscaler.v2.event_logger import AutoscalerEventLogger +from ray.autoscaler.v2.instance_manager.common import InstanceUtil +from ray.autoscaler.v2.instance_manager.config import NodeTypeConfig +from ray.autoscaler.v2.schema import AutoscalerInstance, NodeType +from ray.autoscaler.v2.utils import ProtobufUtil, ResourceRequestUtil +from ray.core.generated.common_pb2 import LabelSelectorOperator +from ray.core.generated.autoscaler_pb2 import ( + ClusterResourceConstraint, + GangResourceRequest, + ResourceRequest, + ResourceRequestByCount, +) +from ray.core.generated.instance_manager_pb2 import ( + Instance, + LaunchRequest, + NodeKind, + TerminationRequest, +) + +# ============= Resource Scheduling Service API ======================= +# +# ResourceSchedulerService is a service that schedules resource bundles +# to nodes. It's used by the autoscaler to schedule resource bundles +# to determine the desired cluster size to satisfy the current resource +# demands. +# +logger = logging.getLogger(__name__) + + +@dataclass +class SchedulingRequest: + # If outdated node check through launch config is disabled. + disable_launch_config_check: bool + # Available node type configs + node_type_configs: Dict[NodeType, NodeTypeConfig] = field(default_factory=dict) + # Max number of worker nodes. + max_num_nodes: Optional[int] = None + # Idle timeout in seconds. + idle_timeout_s: Optional[float] = None + # TODO: This prob could be refactored into the ClusterStatus data class later. + # The current ray resource requests. + resource_requests: List[ResourceRequestByCount] = field(default_factory=list) + # The Gang resource requests. + gang_resource_requests: List[GangResourceRequest] = field(default_factory=list) + # cluster resource constraints. + cluster_resource_constraints: List[ClusterResourceConstraint] = field( + default_factory=list + ) + # The current instances. + current_instances: List[AutoscalerInstance] = field(default_factory=list) + + +@dataclass +class SchedulingReply: + # Instances to launch. + to_launch: List[LaunchRequest] = field(default_factory=list) + # To terminate. + to_terminate: List[TerminationRequest] = field(default_factory=list) + # The infeasible resource bundles. + infeasible_resource_requests: List[ResourceRequest] = field(default_factory=list) + # The infeasible gang resource bundles. + infeasible_gang_resource_requests: List[GangResourceRequest] = field( + default_factory=list + ) + # The infeasible cluster resource constraints. + infeasible_cluster_resource_constraints: List[ClusterResourceConstraint] = field( + default_factory=list + ) + + +class IResourceScheduler(ABC): + """ + Interface for a resource scheduler. + + Implements the `instance_manager.proto ResourceSchedulerService` interface. + """ + + @abstractmethod + def schedule(self, request: SchedulingRequest) -> SchedulingReply: + """ + Given the resource requests and the current cluster state, calculate the + target cluster shape by trying to schedule the resource requests on the + nodes. + """ + pass + + +class SchedulingNodeStatus(Enum): + """ + The status of a scheduling node (`SchedulingNode`) + """ + + # The node is added by the ResourceDemandScheduler. + TO_LAUNCH = "TO_LAUNCH" + # The node is pending, i.e. there's already an autoscaler instance being launched + # The node is schedulable. It could be running ray or pending to run ray. Either + # Way, it should be able to accept new resource requests/resource constraints. + SCHEDULABLE = "SCHEDULABLE" + # The node is to be terminated by the ResourceDemandScheduler + TO_TERMINATE = "TO_TERMINATE" + + +class ResourceRequestSource(Enum): + """ + The source of the resource request. + """ + + # The resource request is from demand, e.g. ray tasks/actors, + # placement groups, etc. + PENDING_DEMAND = "PENDING_DEMAND" + # The resource request is from the cluster resource constraints, i.e. + # from ray.autoscaler.sdk.request_resources(). + CLUSTER_RESOURCE_CONSTRAINT = "CLUSTER_RESOURCE_CONSTRAINT" + + +@dataclass +class SchedulingNode: + """ + A abstraction of a node that can be scheduled on by the resource scheduler. + + A scheduling node is expected to be used as: + + node = SchedulingNode.new(instance, node_configs) + remaining, score = node.try_schedule(requests) + + .... do something with the score .... + + NOTE: + One could also extend the scheduling behavior by overriding `try_schedule` + """ + + # Node type name. + node_type: NodeType + # Status + status: SchedulingNodeStatus + # Resource requests scheduled on this nodes for different sources. + sched_requests: Dict[ResourceRequestSource, List[ResourceRequest]] = field( + default_factory=lambda: defaultdict(list) + ) + # Available resources for different sources of requests. + available_resources_for_sched: Dict[ + ResourceRequestSource, Dict[str, float] + ] = field(default_factory=dict) + # The node's current resource capacity. + total_resources: Dict[str, float] = field(default_factory=dict) + # Node's labels, including static or dynamic labels. + labels: Dict[str, str] = field(default_factory=dict) + # Observability descriptive message for why the node was launched in the + # first place. + launch_reason: Optional[str] = None + # Termination request, none when the node is not being terminated. + termination_request: Optional[TerminationRequest] = None + # The instance id of the IM(Instance Manager) instance. None if the node + # is not yet in IM. + im_instance_id: Optional[str] = None + # The instance status of the IM(Instance Manager) instance. None if the in-flight node + # has not yet been assigned to an IM instance. + im_instance_status: Optional[Instance.InstanceStatus.ValueType] = None + # The ray node id of the ray node. None if the node is not included in + # ray cluster's GCS report yet (not running ray yet). + ray_node_id: Optional[str] = None + # Idle duration in ms. Default not idle. + idle_duration_ms: int = 0 + # Launch config hash. + launch_config_hash: Optional[str] = None + # node kind. + node_kind: NodeKind = NodeKind.WORKER + + def __init__( + self, + node_type: NodeType, + total_resources: Dict[str, float], + available_resources: Dict[str, float], + labels: Dict[str, str], + status: SchedulingNodeStatus, + im_instance_id: str = "", + im_instance_status: Optional[Instance.InstanceStatus.ValueType] = None, + ray_node_id: str = "", + idle_duration_ms: int = 0, + launch_config_hash: str = "", + node_kind: NodeKind = NodeKind.WORKER, + termination_request: Optional[TerminationRequest] = None, + ): + self.node_type = node_type + self.total_resources = total_resources + self.available_resources_for_sched = { + ResourceRequestSource.PENDING_DEMAND: dict(available_resources), + ResourceRequestSource.CLUSTER_RESOURCE_CONSTRAINT: dict(total_resources), + } + self.sched_requests = { + ResourceRequestSource.PENDING_DEMAND: [], + ResourceRequestSource.CLUSTER_RESOURCE_CONSTRAINT: [], + } + self.labels = labels + self.status = status + self.im_instance_id = im_instance_id + self.im_instance_status = im_instance_status + self.ray_node_id = ray_node_id + self.idle_duration_ms = idle_duration_ms + self.launch_config_hash = launch_config_hash + self.node_kind = node_kind + self.termination_request = termination_request + + def get_available_resources(self, resource_request_source: ResourceRequestSource): + """Get the available resources for the given resource request source.""" + return self.available_resources_for_sched[resource_request_source] + + def get_sched_requests(self, resource_request_source: ResourceRequestSource): + """Get the resource requests for the given resource request source.""" + return self.sched_requests[resource_request_source] + + def add_sched_request( + self, + request: ResourceRequest, + resource_request_source: ResourceRequestSource, + ): + """ + Add the resource requests to the node. + + Args: + request: The resource request to be added. + resource_request_source: The source of the resource request. + """ + self.sched_requests[resource_request_source].append(request) + + @staticmethod + def new( + instance: AutoscalerInstance, + node_type_configs: Dict[NodeType, NodeTypeConfig], + disable_launch_config_check: bool, + ) -> Optional["SchedulingNode"]: + """ + Create a new scheduling node from an autoscaler instance. + + It creates: + - None if the instance is not schedulable by IM. + - A schedulable node if the instance is running ray or pending to run ray, + so it should be considered in the scheduling process. + + Args: + instance: The instance. + node_type_configs: The node type configs. + disable_launch_config_check: If outdated node check through launch config is + disabled. + + """ + if not SchedulingNode.is_schedulable(instance): + return None + + if instance.im_instance.status == Instance.RAY_RUNNING: + assert instance.ray_node is not None, ( + "ray node should not be None " + f"when the instance is running ray: instance={instance}" + ) + # An running ray node + return SchedulingNode( + node_type=instance.im_instance.instance_type, + total_resources=dict(instance.ray_node.total_resources), + # Available resources for scheduling requests of different + # sources. + available_resources=dict(instance.ray_node.available_resources), + labels={ + **(instance.ray_node.labels or {}), + **(instance.ray_node.dynamic_labels or {}), + }, + status=SchedulingNodeStatus.SCHEDULABLE, + im_instance_id=instance.im_instance.instance_id, + im_instance_status=instance.im_instance.status, + ray_node_id=instance.im_instance.node_id, + idle_duration_ms=instance.ray_node.idle_duration_ms, + launch_config_hash=instance.im_instance.launch_config_hash, + node_kind=instance.im_instance.node_kind, + ) + + # This is an instance pending to run ray. Initialize a schedulable node + # from the node type config. + node_config = node_type_configs.get(instance.im_instance.instance_type, None) + if node_config is None: + if disable_launch_config_check: + # We are not terminating outdated nodes. + logger.info( + f"Node config for {instance.im_instance.instance_type} is missing, " + "but we are not terminating the outdated node because " + "`disable_launch_config_check` is True in " + "the autoscaler's provider config." + ) + return None + + # Configs might have been updated, and no more + # node_type_configs for this node type. We should terminate it. + return SchedulingNode( + node_type=instance.im_instance.instance_type, + total_resources={}, + available_resources={}, + labels={}, + status=SchedulingNodeStatus.TO_TERMINATE, + im_instance_id=instance.im_instance.instance_id, + im_instance_status=instance.im_instance.status, + termination_request=TerminationRequest( + id=str(uuid.uuid4()), + instance_id=instance.im_instance.instance_id, + instance_status=instance.im_instance.status, + cause=TerminationRequest.Cause.OUTDATED, + instance_type=instance.im_instance.instance_type, + ), + node_kind=NodeKind.WORKER, + ) + + return SchedulingNode.from_node_config( + node_config, + SchedulingNodeStatus.SCHEDULABLE, + node_kind=instance.im_instance.node_kind, + im_instance_id=instance.im_instance.instance_id, + im_instance_status=instance.im_instance.status, + ) + + @staticmethod + def is_schedulable(instance: AutoscalerInstance) -> bool: + """ + Check if the instance is schedulable by IM. + + Args: + instance: The instance. + + Returns: + True if the instance is schedulable by IM. + """ + if instance.im_instance is None: + # We will skip any instances that are not yet in IM which + # could be + # 1. an out-of-band ray node + # 2. an cloud instance running ray not yet discovered + # by the IM's Reconciler + # 3. an cloud instance already terminated but ray state + # still lagging behind. + # + # In all of these cases, the instance is not schedulable or + # shouldn't be managed by IM, so we don't consider them. + return False + + # These are the statuses where there's a running ray node or + # could eventually run ray. + if InstanceUtil.is_ray_running_reachable(instance.im_instance.status): + return True + + return False + + @staticmethod + def from_node_config( + node_config: NodeTypeConfig, + status: SchedulingNodeStatus, + node_kind: NodeKind, + im_instance_id: Optional[str] = None, + im_instance_status: Optional[str] = None, + ) -> "SchedulingNode": + """ + Create a scheduling node from a node config. + + Args: + node_config: The node config. + status: The status of the node. + node_kind: The node kind. + im_instance_id: The instance id of the im instance. + im_instance_status: The instance status of the im instance. + node_kind: The node kind. + """ + return SchedulingNode( + node_type=node_config.name, + total_resources=dict(node_config.resources), + available_resources=dict(node_config.resources), + labels=dict(node_config.labels), + status=status, + im_instance_id=im_instance_id, + im_instance_status=im_instance_status, + node_kind=node_kind, + ) + + def __post_init__(self): + assert self.node_type, "node_type should be set" + + def try_schedule( + self, + requests: List[ResourceRequest], + resource_request_source: ResourceRequestSource, + ) -> Tuple[List[ResourceRequest], UtilizationScore]: + """ + Try to schedule the resource requests on this node. + + This modifies the node's available resources if the requests are schedulable. + The requests are scheduled one by one in the sorted order, and no + backtracking is done. + + Args: + requests: The resource requests to be scheduled. + resource_request_source: The source of the resource request, i.e. + pending demands from ray actors/tasks or cluster resource constraints. + + Returns: + A tuple of: + - list of remaining requests that cannot be scheduled on this node. + - the utilization score for this node with respect to the current + resource requests being scheduled. + """ + # Track the resource requests that cannot be scheduled on this node. + unschedulable_requests = [] + + # Sort the requests and try schedule them one by one. + for r in requests: + if not self._try_schedule_one(r, resource_request_source): + unschedulable_requests.append(r) + + score = self._compute_score(resource_request_source) + + return unschedulable_requests, score + + def _compute_score( + self, resource_request_source: ResourceRequestSource + ) -> UtilizationScore: + """ + Compute the utilization score for this node with respect to the current resource + request being scheduled. + + A "higher" score means that this node is more suitable for scheduling the + current scheduled resource requests. + + The score is a tuple of 5 values: + 1. Whether this node has labels matching the current resource request's + label_selector requirements: + 0: if this node does not satisfy any label selector requirements or + no label selectors are provided. + len(label_selectors)-i: a score based on the priority of the label + selector in the resource request that this node satisfies. + 2. Whether this node is a GPU node and the current resource request has + GPU requirements: + 0: if this node is a GPU node and the current resource request + placed onto the node has no GPU requirements. + 1: if this node is not a GPU node or the current resource request + placed onto the node has GPU requirements. + 3. The number of resource types being scheduled. + 4. The minimum utilization rate across all resource types. + 5. The average utilization rate across all resource types. + + NOTE: + This function is adapted from _resource_based_utilization_scorer from + autoscaler v1. + + TODO(rickyx,jjyao): We should also consider node labels for + scoring. For example, if a node has a label that matches the affinity + label of the resource request, we should give it a higher score. + + TODO(rickyx): add pluggable scoring functions here. + + Returns: + A utilization score for this node. + """ + + sched_requests = self.get_sched_requests(resource_request_source) + available_resources = self.get_available_resources(resource_request_source) + + # Compute the number of resource types being scheduled. + num_matching_resource_types = 0 + sched_resource_types = set() + for req in sched_requests: + for resource_name, v in req.resources_bundle.items(): + if v > 0: + sched_resource_types.add(resource_name) + + for sched_resource_type in sched_resource_types: + if sched_resource_type in self.total_resources: + num_matching_resource_types += 1 + + # Compute the utilization rate for each resource type + util_by_resources = [] + for k, v in self.total_resources.items(): + if v == 0: + # Skip any zero values. + continue + if k in available_resources: + util = (v - available_resources.get(k, 0)) / v + assert util >= 0 and util <= 1, f"Invalid utilization: {util}" + util_by_resources.append(v * (util**3)) + + # Prefer not to launch a GPU node if there aren't any GPU requirements in the + # resource bundle. + gpu_ok = True + if AUTOSCALER_CONSERVE_GPU_NODES: + # TODO: we should also generalize this optimization for accelerators. + # https://github.com/ray-project/ray/issues/43079 + is_gpu_node = self.total_resources.get("GPU", 0) > 0 + any_gpu_requests = any("GPU" in r.resources_bundle for r in sched_requests) + if is_gpu_node and not any_gpu_requests: + gpu_ok = False + + # Check if node satisfies label requirements. + matches_labels = self._satisfies_label_constraints(sched_requests) + + # Prioritize avoiding gpu nodes for non-gpu workloads first, + # then prioritize matching multiple resource types, + # then prioritize using all resources, + # then prioritize overall balance of multiple resources. + return ( + matches_labels, + gpu_ok, + num_matching_resource_types, + min(util_by_resources) if util_by_resources else 0, + float(sum(util_by_resources)) / len(util_by_resources) + if util_by_resources + else 0, + ) + + def _satisfies_label_constraints( + self, sched_requests: List[ResourceRequest] + ) -> int: + """Returns a higher value based on the priority of the label selector this node + satisfies (first returns highest score, decreasing sequentially for fallback), 0 otherwise.""" + for req in sched_requests: + num_selectors = len(req.label_selectors) + for i, selector in enumerate(req.label_selectors): + all_constraints_pass = True + for constraint in selector.label_constraints: + key = constraint.label_key + values = set(constraint.label_values) + op = constraint.operator + node_val = self.labels.get(key) + + if op == LabelSelectorOperator.LABEL_OPERATOR_IN: + if node_val not in values: + all_constraints_pass = False + break + elif op == LabelSelectorOperator.LABEL_OPERATOR_NOT_IN: + if node_val in values: + all_constraints_pass = False + break + else: + all_constraints_pass = False + break + + if all_constraints_pass: + return num_selectors - i + return 0 + + def _try_schedule_one( + self, request: ResourceRequest, resource_request_source: ResourceRequestSource + ) -> bool: + """ + Try to schedule one resource request on this node. The request could be from + various sources, specified by `resource_request_source`. + + Args: + request: The resource request to be scheduled. + resource_request_source: The source of the resource request, i.e. + pending demands from ray actors/tasks or cluster resource constraints. + + Returns: + True if the resource request is scheduled on this node. + """ + + # Enforce label selector constraints + if request.label_selectors: + if self._satisfies_label_constraints([request]) == 0: + return False # Node doesn't satisfy any label selector in request. + + # Check if there's placement constraints that are not satisfied. + for constraint in request.placement_constraints: + if constraint.HasField("anti_affinity"): + anti_affinity = constraint.anti_affinity + if ( + anti_affinity.label_name in self.labels + and anti_affinity.label_value + == self.labels[anti_affinity.label_name] + ): + # The node already has a label that matches the anti-affinity + return False + + # We don't need to check for affinity constraints here since + # we have already combined resource requests with the affinity + # constraints into the same request at `combine_requests_with_affinity`. + pass + + available_resources_dict = self.get_available_resources(resource_request_source) + + # Check if there's enough resources to schedule the request. + if not _fits(available_resources_dict, dict(request.resources_bundle)): + return False + + # Schedule the request, update resources + _inplace_subtract(available_resources_dict, dict(request.resources_bundle)) + + # Add the request to the node. + self.add_sched_request(request, resource_request_source) + + # Update the dynamic labels if there's any + for constraint in request.placement_constraints: + # We don't need to check for affinity constraints here since + # we have already combined resource requests with the affinity + # constraints into the same request at `combine_requests_with_affinity`. + # We don't need node labels for enforcing affinity. + if constraint.HasField("anti_affinity"): + anti_affinity = constraint.anti_affinity + self._add_label(anti_affinity.label_name, anti_affinity.label_value) + + return True + + def _add_label(self, label_name: str, label_value: str): + """ + Add a label to the node. + This assumes a label key can only have one value. + """ + assert ( + self.labels.get(label_name) is None + or self.labels[label_name] == label_value + ), ( + f"Label {label_name} already exists with value " + f"{self.labels[label_name]}, cannot set to " + f"{label_value}" + ) + self.labels[label_name] = label_value + + def __repr__(self) -> str: + return ( + "SchedulingNode(node_type={node_type}, " + "node_kind={node_kind}, " + "instance_id={instance_id}," + "instance_status={instance_status}," + "ray_node_id={ray_node_id}," + "idle_duration_ms={idle_duration_ms}," + "termination_request={termination_request}," + "status={status}, " + "total_resources={total_resources}, " + "available_resources_for_demand={available_resources_for_demand}, " + "available_resources_for_cluster_resource_constraints=" + "{available_resources_for_cluster_resource_constraints}," + "labels={labels}, launch_reason={launch_reason}), " + "sched_requests_for_demand={sched_requests_for_demand}), " + "sched_requests_for_cluster_resource_constraints=" + "{sched_requests_for_cluster_resources_constraint})" + ).format( + node_type=self.node_type, + node_kind=self.node_kind, + instance_id=self.im_instance_id, + instance_status=self.im_instance_status, + ray_node_id=self.ray_node_id, + idle_duration_ms=self.idle_duration_ms, + termination_request=str(message_to_dict(self.termination_request)) + if self.termination_request + else None, + status=self.status, + total_resources=self.total_resources, + available_resources_for_demand=self.available_resources_for_sched[ + ResourceRequestSource.PENDING_DEMAND + ], + available_resources_for_cluster_resource_constraints=self.available_resources_for_sched[ # noqa + ResourceRequestSource.CLUSTER_RESOURCE_CONSTRAINT + ], + labels=self.labels, + launch_reason=self.launch_reason, + sched_requests_for_demand="|".join( + str(message_to_dict(r)) + for r in self.sched_requests[ResourceRequestSource.PENDING_DEMAND] + ), + sched_requests_for_cluster_resources_constraint="|".join( + str(message_to_dict(r)) + for r in self.sched_requests[ + ResourceRequestSource.CLUSTER_RESOURCE_CONSTRAINT + ] + ), + ) + + +class ResourceDemandScheduler(IResourceScheduler): + """ + A resource demand scheduler that schedules resource requests based on the + following rules: + 1. Enforce the minimal count of nodes for each worker node type. + 2. Enforce the cluster resource constraints. + 3. Schedule the gang resource requests. + 4. Schedule the tasks/actor resource requests + """ + + def __init__(self, event_logger: Optional[AutoscalerEventLogger] = None): + self._event_logger = event_logger + + @dataclass + class ScheduleContext: + """ + Encapsulates the context for processing one scheduling request. + + This exposes functions to read and write the scheduling nodes, to prevent + accidental modification of the internal state. + """ + + # The node type configs for this scheduling request. + _node_type_configs: Dict[NodeType, NodeTypeConfig] + # If outdated node check through launch config is disabled. + _disable_launch_config_check: bool + # The max number of nodes for the entire cluster. + _max_num_nodes: Optional[int] = None + # The idle timeout in seconds. + _idle_timeout_s: Optional[float] = None + # The current schedulable nodes (including pending nodes and pending requests). + _nodes: List[SchedulingNode] = field(default_factory=list) + # The number of nodes by node types available for launching based on the max + # number of workers in the config. This takes into account any pending/running + # nodes. + _node_type_available: Dict[NodeType, int] = field(default_factory=dict) + + def __init__( + self, + nodes: List[SchedulingNode], + node_type_configs: Dict[NodeType, NodeTypeConfig], + disable_launch_config_check: bool, + max_num_nodes: Optional[int] = None, + idle_timeout_s: Optional[float] = None, + ): + self._nodes = nodes + self._node_type_configs = node_type_configs + self._node_type_available = self._compute_available_node_types( + nodes, node_type_configs + ) + self._max_num_nodes = max_num_nodes + self._idle_timeout_s = idle_timeout_s + self._disable_launch_config_check = disable_launch_config_check + + @classmethod + def from_schedule_request( + cls, req: SchedulingRequest + ) -> "ResourceDemandScheduler.ScheduleContext": + """ + Create a schedule context from a schedule request. + It will populate the context with the existing nodes and the available node + types from the config. + + Args: + req: The scheduling request. The caller should make sure the + request is valid. + """ + + nodes = [] + node_type_configs = req.node_type_configs + + # Initialize the scheduling nodes. + for instance in req.current_instances: + node = SchedulingNode.new( + instance, node_type_configs, req.disable_launch_config_check + ) + if node: + nodes.append(node) + + return cls( + nodes=nodes, + node_type_configs=node_type_configs, + disable_launch_config_check=req.disable_launch_config_check, + max_num_nodes=req.max_num_nodes, + idle_timeout_s=req.idle_timeout_s, + ) + + @staticmethod + def _compute_available_node_types( + nodes: List[SchedulingNode], + node_type_configs: Dict[NodeType, NodeTypeConfig], + ) -> Dict[NodeType, int]: + """ + Compute the number of nodes by node types available for launching based on + the max number of workers in the config. + Args: + nodes: The current existing nodes. + node_type_configs: The node type configs. + Returns: + A dict of node types and the number of nodes available for launching. + """ + node_type_available: Dict[NodeType, int] = defaultdict(int) + node_type_existing: Dict[NodeType, int] = defaultdict(int) + for node in nodes: + node_type_existing[node.node_type] += 1 + + for ( + node_type, + node_type_config, + ) in node_type_configs.items(): + node_type_available[ + node_type + ] = node_type_config.max_worker_nodes - node_type_existing.get( + node_type, 0 + ) + + return node_type_available + + def get_nodes(self) -> List[SchedulingNode]: + """ + Get the current nodes with filter. + + Returns: + A list of nodes. + """ + nodes = copy.deepcopy(self._nodes) + return nodes + + def get_node_type_available(self) -> Dict[NodeType, int]: + return copy.deepcopy(self._node_type_available) + + def get_cluster_shape(self) -> Dict[NodeType, int]: + cluster_shape = defaultdict(int) + for node in self._nodes: + if node.status == SchedulingNodeStatus.TO_TERMINATE: + # Skip the nodes that are to be terminated. + continue + + cluster_shape[node.node_type] += 1 + return cluster_shape + + def get_idle_timeout_s(self) -> Optional[float]: + return self._idle_timeout_s + + def update(self, new_nodes: List[SchedulingNode]) -> None: + """ + Update the context with the new nodes. + """ + self._nodes = new_nodes + + # Update the available node types. + self._node_type_available = self._compute_available_node_types( + self._nodes, self._node_type_configs + ) + + def get_max_num_nodes(self) -> Optional[int]: + """ + Get the max number of nodes for the entire cluster. + """ + return self._max_num_nodes + + def get_node_type_configs(self) -> Dict[NodeType, NodeTypeConfig]: + return self._node_type_configs + + def __str__(self) -> str: + return "ScheduleContext({} nodes, node_type_available={})".format( + len(self._nodes), dict(self._node_type_available) + ) + + def get_launch_requests(self) -> List[LaunchRequest]: + """ + Get the launch requests for the nodes that are to be launched. + """ + launch_by_type = defaultdict(int) + for node in self._nodes: + if node.status == SchedulingNodeStatus.TO_LAUNCH: + launch_by_type[node.node_type] += 1 + + launch_requests = [] + for instance_type, count in launch_by_type.items(): + launch_requests.append( + LaunchRequest( + instance_type=instance_type, + count=count, + id=str(uuid.uuid4()), + request_ts_ms=time.time_ns() // 1000, + ) + ) + return launch_requests + + def get_terminate_requests( + self, + ) -> List[TerminationRequest]: + """ + Get the terminate requests for the nodes that are to be terminated. + """ + return [ + node.termination_request + for node in self._nodes + if node.termination_request is not None + ] + + def schedule(self, request: SchedulingRequest) -> SchedulingReply: + logger.debug( + "Scheduling for request: resource_request={}, gang_resource_request={}, " + "cluster_constraint={}".format( + ResourceRequestUtil.to_dict_list(request.resource_requests), + ProtobufUtil.to_dict_list(request.gang_resource_requests), + ProtobufUtil.to_dict_list(request.cluster_resource_constraints), + ) + ) + + ctx = ResourceDemandScheduler.ScheduleContext.from_schedule_request(request) + + # Enforce outdate nodes. + ResourceDemandScheduler._terminate_outdated_nodes(ctx) + + # Enforce the minimal count of nodes for each worker node type. + ResourceDemandScheduler._enforce_min_workers_per_type(ctx) + + # Enforce the max worker nodes count. + ResourceDemandScheduler._enforce_max_workers_per_type(ctx) + + # Enforce the max worker nodes count globally. + ResourceDemandScheduler._enforce_max_workers_global(ctx) + + # Enforce the cluster resource constraints. + infeasible_constraints = ResourceDemandScheduler._enforce_resource_constraints( + ctx, request.cluster_resource_constraints + ) + + # Schedule the gang resource requests. + infeasible_gang_requests = ( + ResourceDemandScheduler._sched_gang_resource_requests( + ctx, request.gang_resource_requests + ) + ) + + # Schedule the tasks/actor resource requests + infeasible_requests = ResourceDemandScheduler._sched_resource_requests( + ctx, + ResourceRequestUtil.ungroup_by_count(request.resource_requests), + ) + + # Shutdown any idle nodes that's not needed (e.g. no resource constraints. + # not needed by min_worker count, etc.) + ResourceDemandScheduler._enforce_idle_termination(ctx) + + # Compute the number of nodes to launch. + reply = SchedulingReply( + infeasible_resource_requests=infeasible_requests, + infeasible_gang_resource_requests=infeasible_gang_requests, + infeasible_cluster_resource_constraints=infeasible_constraints, + to_launch=ctx.get_launch_requests(), + to_terminate=ctx.get_terminate_requests(), + ) + + if self._event_logger is not None: + try: + self._event_logger.log_cluster_scheduling_update( + launch_requests=reply.to_launch, + terminate_requests=reply.to_terminate, + infeasible_requests=infeasible_requests, + infeasible_gang_requests=infeasible_gang_requests, + infeasible_cluster_resource_constraints=infeasible_constraints, + cluster_shape=ctx.get_cluster_shape(), + node_type_configs=ctx.get_node_type_configs(), + ) + except Exception: + logger.exception("Failed to emit event logs.") + + return reply + + @staticmethod + def _enforce_max_workers_per_type( + ctx: "ResourceDemandScheduler.ScheduleContext", + ) -> None: + """ + Enforce the max number of workers for each node type. + """ + + # Get all the nodes by type + all_nodes = ctx.get_nodes() + + non_terminating_nodes_by_type = defaultdict(list) + terminating_nodes = [] + for node in all_nodes: + if node.status == SchedulingNodeStatus.TO_TERMINATE: + terminating_nodes.append(node) + else: + non_terminating_nodes_by_type[node.node_type].append(node) + + # Step 1. Enforce the max number of workers for each node type. + for node_type in non_terminating_nodes_by_type.keys(): + non_terminate_nodes_of_type = non_terminating_nodes_by_type[node_type] + node_config = ctx.get_node_type_configs()[node_type] + num_max_nodes_per_type = node_config.max_worker_nodes + num_extra_nodes = len(non_terminate_nodes_of_type) - num_max_nodes_per_type + + if num_extra_nodes <= 0: + # No extra nodes for this type, continue. + continue + + # Terminate the nodes + ( + to_terminate, + remained_nodes, + ) = ResourceDemandScheduler._select_nodes_to_terminate( + non_terminate_nodes_of_type, + num_extra_nodes, + TerminationRequest.Cause.MAX_NUM_NODE_PER_TYPE, + max_num_nodes_per_type=num_max_nodes_per_type, + ) + + non_terminating_nodes_by_type[node_type] = remained_nodes + terminating_nodes.extend(to_terminate) + + non_terminating_nodes = [] + for nodes in non_terminating_nodes_by_type.values(): + non_terminating_nodes.extend(nodes) + + # Update the context + assert len(all_nodes) == len( + terminating_nodes + non_terminating_nodes + ), "The number of nodes should be the same after enforcing max nodes per type." + + ctx.update(terminating_nodes + non_terminating_nodes) + + if terminating_nodes: + logger.debug( + f"Terminating {len(terminating_nodes)} " + "nodes for per node type max num node's constraints." + ) + + @staticmethod + def _enforce_max_workers_global( + ctx: "ResourceDemandScheduler.ScheduleContext", + ) -> None: + """ + Enforce the max number of workers for the entire cluster. + """ + all_nodes = ctx.get_nodes() + + terminating_nodes = [] + non_terminating_nodes = [] + + for node in all_nodes: + if node.status == SchedulingNodeStatus.TO_TERMINATE: + terminating_nodes.append(node) + else: + non_terminating_nodes.append(node) + + num_max_nodes = ctx.get_max_num_nodes() + + num_to_terminate = ( + max(len(non_terminating_nodes) - num_max_nodes, 0) if num_max_nodes else 0 + ) + + if num_to_terminate <= 0: + # No extra nodes needed to terminate. + return + + # Terminate the nodes + ( + to_terminate_nodes, + non_terminating_nodes, + ) = ResourceDemandScheduler._select_nodes_to_terminate( + non_terminating_nodes, + num_to_terminate, + TerminationRequest.Cause.MAX_NUM_NODES, + max_num_nodes=num_max_nodes, + ) + + assert len(to_terminate_nodes) == num_to_terminate, ( + "Terminating {} nodes, failed to terminate {} nodes to " + "satisfy max_num_nodes={}".format( + len(to_terminate_nodes), + num_to_terminate - len(to_terminate_nodes), + num_max_nodes, + ) + ) + + # Update the context + terminating_nodes.extend(to_terminate_nodes) + assert len(all_nodes) == len( + terminating_nodes + non_terminating_nodes + ), "The number of nodes should be the same after enforcing max nodes." + + all_nodes = terminating_nodes + non_terminating_nodes + ctx.update(all_nodes) + + @staticmethod + def _select_nodes_to_terminate( + nodes: List[SchedulingNode], + num_to_terminate: int, + cause: TerminationRequest.Cause, + max_num_nodes: Optional[int] = None, + max_num_nodes_per_type: Optional[int] = None, + ) -> Tuple[List[SchedulingNode], List[SchedulingNode]]: + """ + Select 'num_to_terminate' of nodes to be terminated + from the 'nodes' list. It should never select a head node. + + Args: + nodes: The nodes to be terminated. + num_to_terminate: The number of nodes to be terminated. + cause: The cause of the termination. Should be one of + TerminationRequest.Cause.MAX_NUM_NODES or + TerminationRequest.Cause.MAX_NUM_NODE_PER_TYPE. + + max_num_nodes: The max number of nodes for the entire cluster only + used when the cause is TerminationRequest.Cause.MAX_NUM_NODES. + max_num_nodes_per_type: The max number of nodes for each node type. + Only used when the cause is + TerminationRequest.Cause.MAX_NUM_NODE_PER_TYPE. + + Returns: + A tuple of: + - The terminated nodes. + - The remained nodes. + """ + + # Sort the nodes for termination. + nodes.sort(key=ResourceDemandScheduler._sort_nodes_for_termination) + + # Remove the head node from the list. + head_node = None + for i, node in enumerate(nodes): + if node.node_kind == NodeKind.HEAD: + # Remove the head node from the list. + head_node = nodes.pop(i) + break + + terminated_nodes, remained_nodes = ( + nodes[:num_to_terminate], + # The head could be None if there's no head node being reported yet + # from the ray cluster. + nodes[num_to_terminate:] + ([head_node] if head_node else []), + ) + + assert cause in [ + TerminationRequest.Cause.MAX_NUM_NODES, + TerminationRequest.Cause.MAX_NUM_NODE_PER_TYPE, + ], "Other termination causes don't have to select nodes for termination." + + for node in terminated_nodes: + node.status = SchedulingNodeStatus.TO_TERMINATE + node.termination_request = TerminationRequest( + id=str(uuid.uuid4()), + instance_id=node.im_instance_id, + ray_node_id=node.ray_node_id, + cause=cause, + instance_type=node.node_type, + instance_status=node.im_instance_status, + details=( + f"Terminating node due to {TerminationRequest.Cause.Name(cause)}: " + f"max_num_nodes={max_num_nodes}, " + f"max_num_nodes_per_type={max_num_nodes_per_type}" + ), + ) + if cause == TerminationRequest.Cause.MAX_NUM_NODES: + node.termination_request.max_num_nodes = max_num_nodes + elif cause == TerminationRequest.Cause.MAX_NUM_NODE_PER_TYPE: + node.termination_request.max_num_nodes_per_type = max_num_nodes_per_type + else: + raise ValueError("Unknown termination cause: {}".format(cause)) + + return terminated_nodes, remained_nodes + + @staticmethod + def _sort_nodes_for_termination(node: SchedulingNode) -> Tuple: + """ + Sort the nodes for termination increasingly by: + + 1. First if ray hasn't been started yet + 2. Then if the nodes are idle + 3. Then with lower resources util nodes first. + + Such that nodes sorted earlier will be terminated first. + """ + + running_ray = len(node.ray_node_id) > 0 + # Reverse the idle duration such that the nodes with the largest idle duration + # will be terminated first. + idle_dur = -1 * node.idle_duration_ms + available_resources = node.get_available_resources( + ResourceRequestSource.PENDING_DEMAND + ) + + utils_per_resources = {} + for resource, total in node.total_resources.items(): + if total <= 0: + continue + utils_per_resources[resource] = ( + total - available_resources.get(resource, 0) + ) / total + + avg_util = ( + sum(utils_per_resources.values()) / len(utils_per_resources) + if utils_per_resources + else 0 + ) + + return (running_ray, idle_dur, avg_util) + + @staticmethod + def _enforce_min_workers_per_type( + ctx: "ResourceDemandScheduler.ScheduleContext", + ) -> None: + """ + Enforce the minimal count of nodes for each worker node type. + """ + + # Count the existing nodes by type + count_by_node_type = ctx.get_cluster_shape() + + new_nodes = [] + # Launch new nodes to satisfy min count for each node type. + for ( + node_type, + node_type_config, + ) in ctx.get_node_type_configs().items(): + cur_count = count_by_node_type.get(node_type, 0) + min_count = node_type_config.min_worker_nodes + if cur_count < min_count: + logger.info( + f"Adding {min_count - cur_count} nodes to satisfy min count for " + f"node type: {node_type}." + ) + new_nodes.extend( + [ + SchedulingNode.from_node_config( + copy.deepcopy(node_type_config), + status=SchedulingNodeStatus.TO_LAUNCH, + node_kind=NodeKind.WORKER, + ) + ] + * (min_count - cur_count) + ) + # NOTE: we assume the aggregated number of min workers across all node types + # should not exceed any globally enforced max_num_nodes + + # Add the new nodes to the existing nodes and update the context. + ctx.update(new_nodes + ctx.get_nodes()) + + @staticmethod + def _enforce_resource_constraints( + ctx: "ResourceDemandScheduler.ScheduleContext", + constraints: List[ClusterResourceConstraint], + ) -> List[ClusterResourceConstraint]: + """ + Enforce the cluster resource constraints. + + Args: + ctx: The schedule context. + constraints: The cluster resource constraints. + + Returns: + A list of infeasible constraints. + + Notes: + It's different from the other scheduling functions since it doesn't actually + schedule any resource requests. Instead, it asks if the cluster could be + upscale to a certain shape to fulfill the constraints. + """ + + # NOTE: we currently only have 1 constraint from a cluster, but + # we may have multiple in the future. + assert len(constraints) <= 1, "Max 1 cluster resource constraint is supported." + if len(constraints) == 0: + # No cluster resource constraints - nothing needs to be done. + return [] + + constraint = constraints[0] + # Flatten the requests for iterating through. + requests = ResourceRequestUtil.ungroup_by_count(constraint.resource_requests) + + # Pass the empty nodes to schedule. + scheduled_nodes, infeasible = ResourceDemandScheduler._try_schedule( + ctx, + requests, + resource_request_source=ResourceRequestSource.CLUSTER_RESOURCE_CONSTRAINT, + ) + + if infeasible: + # Unable to satisfy the constraint. + return [constraint] + + ctx.update(scheduled_nodes) + return [] + + @staticmethod + def _sched_resource_requests( + ctx: "ResourceDemandScheduler.ScheduleContext", + requests: List[ResourceRequest], + ) -> List[ResourceRequest]: + """ + Schedule the resource requests. + + Args: + ctx: The schedule context. + requests_by_count: The resource requests. + + Returns: + A list of infeasible resource requests. + """ + nodes, infeasible = ResourceDemandScheduler._try_schedule( + ctx, requests, resource_request_source=ResourceRequestSource.PENDING_DEMAND + ) + + # Regardless if there's feasible, we will update the context for schedule nodes. + ctx.update(nodes) + + return infeasible + + @staticmethod + def _sched_gang_resource_requests( + ctx: "ResourceDemandScheduler.ScheduleContext", + gang_requests: List[GangResourceRequest], + ) -> List[GangResourceRequest]: + """ + Schedule the gang resource requests. + + These requests should be scheduled atomically, i.e. either all of the resources + requests in a gang request are scheduled or none of them are scheduled. + + For now, the gang resource requests represent Ray's placement groups, while it + could be more general in the future: + - For STRICT_PACK placement group requests, we combine them into a single + request and try to schedule them together. + - For STRICT_SPREAD placement groups requests, they should be scheduled on + different nodes by leveraging on the node labels that are associated with + the placement group. + If there are requests from rescheduling placement groups due to node + failures, these requests should not be scheduled on nodes with requests + from the same placement group. + + + Args: + ctx: The schedule context. + gang_requests: The gang resource requests. + + Returns: + A list of infeasible gang resource requests. + """ + + def _sort_gang_resource_requests(req: GangResourceRequest) -> Tuple: + """ + Key function for sorting the gang resource request by: + 1. the number of placement constraints in the gang request. + 2. the number of resource requests in the gang request. + """ + total_placement_constraints = 0 + for resource_request in req.requests: + total_placement_constraints += len( + resource_request.placement_constraints + ) + + return (total_placement_constraints, len(req.requests)) + + infeasible_gang_requests = [] + # Try fulfilling the gang requests one by one. + for gang_req in sorted( + gang_requests, key=_sort_gang_resource_requests, reverse=True + ): + requests = gang_req.requests + # Try to combine requests with affinity constraints into the same request. + requests = ResourceRequestUtil.combine_requests_with_affinity(requests) + + nodes, infeasible = ResourceDemandScheduler._try_schedule( + ctx, requests, ResourceRequestSource.PENDING_DEMAND + ) + + if infeasible: + # Unable to satisfy the constraint. We will skip the gang request. + # Don't update the context. + infeasible_gang_requests.append(gang_req) + continue + + # We are able to satisfy the constraint and thus update the context. + ctx.update(nodes) + + return infeasible_gang_requests + + @staticmethod + def _try_schedule( + ctx: "ResourceDemandScheduler.ScheduleContext", + requests_to_sched: List[ResourceRequest], + resource_request_source: ResourceRequestSource, + ) -> Tuple[List[SchedulingNode], List[ResourceRequest]]: + """ + Try to schedule the resource requests on the current context. + + It tries to schedule the requests on the existing nodes first, and + then try to schedule the requests on new nodes if possible. + + Args: + requests_to_sched: The resource requests to be scheduled. + ctx: The current scheduling context. + resource_request_source: The source of the resource request, i.e. + pending demands from ray actors/tasks or cluster resource + constraints. + + Returns: + - List of scheduled nodes to that have part or all of the requests + scheduled. + - List of infeasible requests remained that cannot be scheduled. + """ + # First sort the requests. + def _sort_resource_request(req: ResourceRequest) -> Tuple: + """ + Sort the resource requests by: + 1. The length of its placement constraints. + 2. The length of its first label selector constraints (if any). + 3. The number of resources it requests. + 4. The values of resources it requests. + 5. lexicographically for each resource (for stable ordering) + + This is a legacy sorting function for the autoscaler's binpacking + algo - we do this so that we could have a deterministic scheduling + results with reasonable fragmentation. + """ + label_constraint_len = ( + len(req.label_selectors[0].label_constraints) + if req.label_selectors + else 0 + ) + return ( + len(req.placement_constraints), + label_constraint_len, + len(req.resources_bundle.values()), + sum(req.resources_bundle.values()), + sorted(req.resources_bundle.items()), + ) + + requests_to_sched = sorted( + requests_to_sched, key=_sort_resource_request, reverse=True + ) + + existing_nodes = ctx.get_nodes() + node_type_available = ctx.get_node_type_available() + + # A list of nodes that are either: + # 1. existing nodes in the cluster. or + # 2. new nodes that are launched to satisfy the resource requests. + target_nodes = [] + + # Try scheduling resource requests with existing nodes first. + while len(requests_to_sched) > 0 and len(existing_nodes) > 0: + ( + best_node, + requests_to_sched, + existing_nodes, + ) = ResourceDemandScheduler._sched_best_node( + requests_to_sched, existing_nodes, resource_request_source + ) + if best_node is None: + # No existing nodes can schedule any more requests. + break + + target_nodes.append(best_node) + + # If there's any existing nodes left, we will add to the target nodes + target_nodes.extend(existing_nodes) + + # Try scheduling resource requests with new nodes. + node_pools = [ + SchedulingNode.from_node_config( + ctx.get_node_type_configs()[node_type], + status=SchedulingNodeStatus.TO_LAUNCH, + node_kind=NodeKind.WORKER, + ) + for node_type, num_available in node_type_available.items() + if num_available > 0 + ] + while len(requests_to_sched) > 0 and len(node_pools) > 0: + # Max number of nodes reached. + max_num_nodes = ctx.get_max_num_nodes() + if max_num_nodes is not None and len(target_nodes) >= max_num_nodes: + logger.debug( + "Max number of nodes reached: {}, " + "cannot launch more nodes.".format(max_num_nodes) + ) + break + + ( + best_node, + requests_to_sched, + node_pools, + ) = ResourceDemandScheduler._sched_best_node( + requests_to_sched, node_pools, resource_request_source + ) + if best_node is None: + break + + target_nodes.append(best_node) + # Update the node pool if a node with the same node type of the + # added node can be launched. + node_type_available[best_node.node_type] -= 1 + if node_type_available[best_node.node_type] > 0: + node_pools.append( + SchedulingNode.from_node_config( + ctx.get_node_type_configs()[best_node.node_type], + status=SchedulingNodeStatus.TO_LAUNCH, + node_kind=NodeKind.WORKER, + ) + ) + + return target_nodes, requests_to_sched + + @staticmethod + def _sched_best_node( + requests: List[ResourceRequest], + nodes: List[SchedulingNode], + resource_request_source: ResourceRequestSource, + ) -> Tuple[SchedulingNode, List[ResourceRequest], List[SchedulingNode]]: + """ + Schedule the requests on the best node. + A simple greedy algorithm is used to schedule the requests: + 1. Try to schedule the requests on each node. + 2. Sort the nodes by a score + 3. Return the node with the highest score. + + The highest score node is updated with the scheduled requests, and the node is + removed from the node list. + + Args: + requests: The resource requests to be scheduled. + nodes: The node candidates to be scheduled on. The nodes will be updated + after the scheduling attempt, i.e. the node that is scheduled will be + removed from the list. + resource_request_source: The source of the resource request, i.e. + pending demands from ray actors/tasks or cluster resource constraints. + + Returns: + best_node: The best node to schedule the requests. + infeasible: The infeasible requests that cannot be scheduled on the best + node. + nodes: Remaining nodes after the best node is removed. + """ + results = [] + + # A temporary data class to store the scheduling result. + @dataclass + class ScheduleResult: + # The node candidate after a scheduling attempt. + node: SchedulingNode + # The infeasible resource requests that are not scheduled. + infeasible_requests: List[ResourceRequest] + # The index of the node in the original node list. + idx: int + # the score of the scheduling node to compare with others. + score: UtilizationScore + + nodes_copy = copy.deepcopy(nodes) + + # Iterate through each node and modify the node's available resources + # if the requests are schedulable. + for idx, node in enumerate(nodes_copy): + remaining, score = node.try_schedule(requests, resource_request_source) + + if len(remaining) == len(requests): + # The node cannot schedule any of the requests. + continue + + results.append(ScheduleResult(node, remaining, idx, score)) + + # No nodes can schedule any of the requests. + if len(results) == 0: + logger.debug( + "No nodes can schedule the requests: {}, for nodes: {}".format( + ResourceRequestUtil.to_dict_list(requests), nodes + ) + ) + return None, requests, nodes + + # Sort the results by score. + results = sorted(results, key=lambda r: r.score, reverse=True) + best_result = results[0] + + # Remove the best node from the nodes. + nodes.pop(best_result.idx) + logger.debug( + "Best node: {}, score: {}, remaining requests: {}".format( + best_result.node, + best_result.score, + ResourceRequestUtil.to_dict_list(best_result.infeasible_requests), + ) + ) + return best_result.node, best_result.infeasible_requests, nodes + + @staticmethod + def _terminate_outdated_nodes( + ctx: "ResourceDemandScheduler.ScheduleContext", + ) -> None: + """ + Terminate the nodes that are outdated, i.e. the node type config has been + updated or the node's launch config hash is outdated. + + Args: + ctx: The schedule context. + """ + nodes = ctx.get_nodes() + + if ctx._disable_launch_config_check: + # Outdated nodes check through launch config check is disabled. + return + + for node in nodes: + if node.status != SchedulingNodeStatus.SCHEDULABLE: + # We don't need to care about the non-running nodes. + continue + + if node.node_kind == NodeKind.HEAD: + # We should not be terminating the head node even if it's outdated. + logger.warning( + f"Head node {node.im_instance_id}(ray={node.ray_node_id}) is " + "outdated with node config changes. " + "Please check the node's config or restart the cluster or restart " + "the head node. Autoscaler is not able to shutdown the outdated " + "head node" + ) + continue + node_type = node.node_type + node_type_config = ctx.get_node_type_configs().get(node_type) + if node_type_config is None or ( + node_type_config.launch_config_hash + and node_type_config.launch_config_hash != node.launch_config_hash + ): + # The node type config has been updated, and the node's launch config + # hash is outdated. + node.status = SchedulingNodeStatus.TO_TERMINATE + node.termination_request = TerminationRequest( + id=str(time.time_ns()), + instance_id=node.im_instance_id, + ray_node_id=node.ray_node_id, + instance_type=node.node_type, + instance_status=node.im_instance_status, + cause=TerminationRequest.Cause.OUTDATED, + details=f"node from {node.node_type} has outdated config", + ) + + ctx.update(nodes) + + @staticmethod + def _enforce_idle_termination( + ctx: "ResourceDemandScheduler.ScheduleContext", + ) -> None: + """ + Enforce the idle termination for the nodes that are not needed by the cluster + resource constraints and idle for too long. + + Args: + ctx: The schedule context. + """ + count_by_node_type = ctx.get_cluster_shape() + node_type_configs = ctx.get_node_type_configs() + terminate_nodes_by_type: Dict[NodeType, int] = defaultdict(int) + + nodes = ctx.get_nodes() + s_to_ms = 1000 + for node in nodes: + if node.status != SchedulingNodeStatus.SCHEDULABLE: + # We don't need to care about the non-running nodes. + continue + + if node.node_kind == NodeKind.HEAD: + # The head node is not subject to idle termination. + continue + + idle_timeout_s = ctx.get_idle_timeout_s() + # Override the scheduler idle_timeout_s if set for this node_type. + node_type = node.node_type + if node_type in node_type_configs: + if node_type_configs[node_type].idle_timeout_s is not None: + idle_timeout_s = node_type_configs[node_type].idle_timeout_s + if idle_timeout_s is None: + # No idle timeout is set, skip the idle termination. + continue + + if node.idle_duration_ms <= idle_timeout_s * s_to_ms: + # The node is not idle for too long, skip it. + continue + + if node.sched_requests[ResourceRequestSource.PENDING_DEMAND]: + # The node is needed by the pending requests. + # Skip it. + logger.debug( + "Node {} (idle for {} secs) is needed by the pending requests, " + "skip idle termination.".format( + node.ray_node_id, node.idle_duration_ms / s_to_ms + ) + ) + continue + + if node.sched_requests[ResourceRequestSource.CLUSTER_RESOURCE_CONSTRAINT]: + # The node is needed by the resource constraints. + # Skip it. + logger.debug( + "Node {} (idle for {} secs) is needed by the cluster resource " + "constraints, skip idle termination.".format( + node.ray_node_id, node.idle_duration_ms / s_to_ms + ) + ) + continue + + # Honor the min_worker_nodes setting for the node type. + min_count = 0 + if node_type in node_type_configs: + min_count = node_type_configs[node_type].min_worker_nodes + if ( + count_by_node_type.get(node_type, 0) + - terminate_nodes_by_type[node_type] + <= min_count + ): + logger.info( + "Node {} (idle for {} secs) belongs to node_type {} and is " + "required by min_worker_nodes, skipping idle termination.".format( + node.ray_node_id, node.idle_duration_ms / s_to_ms, node_type + ) + ) + continue + + terminate_nodes_by_type[node.node_type] += 1 + # The node is idle for too long, terminate it. + node.status = SchedulingNodeStatus.TO_TERMINATE + node.termination_request = TerminationRequest( + id=str(uuid.uuid4()), + instance_id=node.im_instance_id, + ray_node_id=node.ray_node_id, + cause=TerminationRequest.Cause.IDLE, + instance_type=node.node_type, + instance_status=node.im_instance_status, + idle_duration_ms=node.idle_duration_ms, + details=f"idle for {node.idle_duration_ms/s_to_ms} secs > " + f"timeout={idle_timeout_s} secs", + ) + + ctx.update(nodes) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/schema.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/schema.py new file mode 100644 index 0000000000000000000000000000000000000000..47c722c87cbad71f66a2186baada4af1858b17e6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/schema.py @@ -0,0 +1,353 @@ +import re +from dataclasses import dataclass, field +from enum import Enum +from typing import Dict, List, Optional, Tuple + +from ray.autoscaler.v2.instance_manager.common import InstanceUtil +from ray.core.generated.autoscaler_pb2 import NodeState, NodeStatus +from ray.core.generated.instance_manager_pb2 import Instance + +# TODO(rickyx): once we have graceful shutdown, we could populate +# the failure detail with the actual termination message. As of now, +# we will use a more generic message to include cases such as: +# (idle termination, node death, crash, preemption, etc) +NODE_DEATH_CAUSE_RAYLET_DIED = "NodeTerminated" + + +# e.g., cpu_4_ondemand. +NodeType = str + + +@dataclass +class ResourceUsage: + # Resource name. + resource_name: str = "" + # Total resource. + total: float = 0.0 + # Resource used. + used: float = 0.0 + + +@dataclass +class NodeUsage: + # The node resource usage. + usage: List[ResourceUsage] + # How long the node has been idle. + idle_time_ms: int + + +@dataclass +class NodeInfo: + # The instance type name, e.g. p3.2xlarge + instance_type_name: str + # ray node type name. + ray_node_type_name: str + # Cloud instance id. + instance_id: str + # Ip address of the node when alive. + ip_address: str + # The status of the node. Optional for pending nodes. + node_status: Optional[str] = None + # ray node id in hex. None if still pending. + node_id: Optional[str] = None + # Resource usage breakdown if node is running. + resource_usage: Optional[NodeUsage] = None + # Failure detail if the node failed. + failure_detail: Optional[str] = None + # Descriptive details. + details: Optional[str] = None + # Activity on the node. + node_activity: Optional[List[str]] = None + # Ray node labels. + labels: Optional[Dict[str, str]] = None + + def total_resources(self) -> Dict[str, float]: + if self.resource_usage is None: + return {} + return {r.resource_name: r.total for r in self.resource_usage.usage} + + def available_resources(self) -> Dict[str, float]: + if self.resource_usage is None: + return {} + return {r.resource_name: r.total - r.used for r in self.resource_usage.usage} + + def used_resources(self) -> Dict[str, float]: + if self.resource_usage is None: + return {} + return {r.resource_name: r.used for r in self.resource_usage.usage} + + +@dataclass +class LaunchRequest: + class Status(Enum): + FAILED = "FAILED" + PENDING = "PENDING" + + # The instance type name, e.g. p3.2xlarge + instance_type_name: str + # ray node type name. + ray_node_type_name: str + # count. + count: int + # State: (e.g. PENDING, FAILED) + state: Status + # When the launch request was made in unix timestamp in secs. + request_ts_s: int + # When the launch request failed unix timestamp in secs if failed. + failed_ts_s: Optional[int] = None + # Request details, e.g. error reason if the launch request failed. + details: Optional[str] = None + + +@dataclass +class ResourceRequestByCount: + # Bundles in the demand. + bundle: Dict[str, float] + # Number of bundles with the same shape. + count: int + + def __str__(self) -> str: + return f"[{self.count} {self.bundle}]" + + +@dataclass +class ResourceDemand: + # The bundles in the demand with shape and count info. + bundles_by_count: List[ResourceRequestByCount] + + +@dataclass +class PlacementGroupResourceDemand(ResourceDemand): + # Details string (parsed into below information) + details: str + # Placement group's id. + pg_id: Optional[str] = None + # Strategy, e.g. STRICT_SPREAD + strategy: Optional[str] = None + # Placement group's state, e.g. PENDING + state: Optional[str] = None + + def __post_init__(self): + if not self.details: + return + + # Details in the format of :|, parse + # it into the above fields. + pattern = r"^.*:.*\|.*$" + match = re.match(pattern, self.details) + if not match: + return + + pg_id, details = self.details.split(":") + strategy, state = details.split("|") + self.pg_id = pg_id + self.strategy = strategy + self.state = state + + +@dataclass +class RayTaskActorDemand(ResourceDemand): + pass + + +@dataclass +class ClusterConstraintDemand(ResourceDemand): + pass + + +@dataclass +class ResourceDemandSummary: + # Placement group demand. + placement_group_demand: List[PlacementGroupResourceDemand] = field( + default_factory=list + ) + # Ray task actor demand. + ray_task_actor_demand: List[RayTaskActorDemand] = field(default_factory=list) + # Cluster constraint demand. + cluster_constraint_demand: List[ClusterConstraintDemand] = field( + default_factory=list + ) + + +@dataclass +class Stats: + # How long it took to get the GCS request. + # This is required when initializing the Stats since it should be calculated before + # the request was made. + gcs_request_time_s: float + # How long it took to get all live instances from node provider. + none_terminated_node_request_time_s: Optional[float] = None + # How long for autoscaler to process the scaling decision. + autoscaler_iteration_time_s: Optional[float] = None + # The last seen autoscaler state version from Ray. + autoscaler_version: Optional[str] = None + # The last seen cluster state resource version. + cluster_resource_state_version: Optional[str] = None + # Request made time unix timestamp: when the data was pulled from GCS. + request_ts_s: Optional[int] = None + + +@dataclass +class ClusterStatus: + # Healthy nodes information (non-idle) + active_nodes: List[NodeInfo] = field(default_factory=list) + # Idle node information + idle_nodes: List[NodeInfo] = field(default_factory=list) + # Pending launches. + pending_launches: List[LaunchRequest] = field(default_factory=list) + # Failed launches. + failed_launches: List[LaunchRequest] = field(default_factory=list) + # Pending nodes. + pending_nodes: List[NodeInfo] = field(default_factory=list) + # Failures + failed_nodes: List[NodeInfo] = field(default_factory=list) + # Resource usage summary for entire cluster. + cluster_resource_usage: List[ResourceUsage] = field(default_factory=list) + # Demand summary. + resource_demands: ResourceDemandSummary = field( + default_factory=ResourceDemandSummary + ) + # Query metics + stats: Stats = field(default_factory=Stats) + + def total_resources(self) -> Dict[str, float]: + return {r.resource_name: r.total for r in self.cluster_resource_usage} + + def available_resources(self) -> Dict[str, float]: + return {r.resource_name: r.total - r.used for r in self.cluster_resource_usage} + + # TODO(rickyx): we don't show infeasible requests as of now. + # (They will just be pending forever as part of the demands) + # We should show them properly in the future. + + +@dataclass +class AutoscalerInstance: + """ + AutoscalerInstance represents an instance that's managed by the autoscaler. + This includes two states: + 1. the instance manager state: information of the underlying cloud instance. + 2. the ray node state, e.g. resources, ray node status. + + The two states are linked by the cloud instance id, which should be set + when the ray node is started. + """ + + # The cloud instance id. It could be None if the instance hasn't been assigned + # a cloud instance id, e.g. the instance is still in QUEUED or REQUESTED status. + cloud_instance_id: Optional[str] = None + + # The ray node state status. It could be None when no ray node is running + # or has run on the cloud instance: for example, ray is still being installed + # or the instance manager hasn't had a cloud instance assigned (e.g. QUEUED, + # REQUESTED). + ray_node: Optional[NodeState] = None + + # The instance manager instance state. It would be None when the ray_node is not + # None. + # It could be None iff: + # 1. There's a ray node, but the instance manager hasn't discovered the + # cloud instance that's running this ray process yet. This could happen since + # the instance manager only discovers instances periodically. + # + # 2. There was a ray node running on the cloud instance, which was already stopped + # and removed from the instance manager state. But the ray state is still lagging + # behind. + # + # 3. There is a ray node that's unmanaged by the instance manager. + # + im_instance: Optional[Instance] = None + + # | cloud_instance_id | ray_node | im_instance | + # |-------------------|----------|-------------| + # | None | None | None | Not possible. + # | None | None | not None | OK. An instance hasn't had ray running on it yet. # noqa E501 + # | None | Not None | None | OK. Possible if the ray node is not started by autoscaler. # noqa E501 + # | None | Not None | not None | Not possible - no way to link im instance with ray node. # noqa E501 + # | not None | None | None | Not possible since cloud instance id is either part of im state or ray node. # noqa E501 + # | not None | None | not None | OK. e.g. An instance that's not running ray yet. # noqa E501 + # | not None | Not None | None | OK. See scenario 1, 2, 3 above. + # | not None | Not None | not None | OK. An instance that's running ray. + def validate(self) -> Tuple[bool, str]: + """Validate the autoscaler instance state. + + Returns: + A tuple of (valid, error_msg) where: + - valid is whether the state is valid + - error_msg is the error message for the validation results. + """ + + state_combinations = { + # (cloud_instance_id is None, ray_node is None, im_instance is None): (valid, error_msg) # noqa E501 + (True, True, True): (False, "Not possible"), + (True, True, False): (True, ""), + (True, False, True): ( + True, + "There's a ray node w/o cloud instance id, must be started not " + "by autoscaler", + ), + (True, False, False): ( + False, + "Not possible - no way to link im instance with ray node", + ), + (False, True, True): ( + False, + "Not possible since cloud instance id is either part of " + "im state or ray node", + ), + (False, True, False): (True, ""), + (False, False, True): (True, ""), + (False, False, False): (True, ""), + } + + valid, error_msg = state_combinations[ + ( + self.cloud_instance_id is None, + self.ray_node is None, + self.im_instance is None, + ) + ] + if not valid: + return valid, error_msg + + if self.im_instance is not None and self.ray_node is None: + # We don't see a ray node, but tracking an im instance. + if self.cloud_instance_id is None: + if InstanceUtil.is_cloud_instance_allocated(self.im_instance.status): + return ( + False, + "instance should be in a status where cloud instance " + "is not allocated.", + ) + else: + if not InstanceUtil.is_cloud_instance_allocated( + self.im_instance.status + ): + return ( + False, + "instance should be in a status where cloud instance is " + "allocated.", + ) + + if self.ray_node is not None: + if self.cloud_instance_id != self.ray_node.instance_id: + return False, "cloud instance id doesn't match." + + if self.im_instance is not None and self.cloud_instance_id is not None: + if self.cloud_instance_id != self.im_instance.cloud_instance_id: + return False, "cloud instance id doesn't match." + + return True, "" + + def is_ray_running(self) -> bool: + """Whether the ray node is running.""" + return self.ray_node is not None and self.ray_node.status in [ + NodeStatus.RUNNING, + NodeStatus.IDLE, + ] + + def is_ray_stop(self) -> bool: + """Whether the ray node is stopped.""" + return self.ray_node is None or self.ray_node.status in [ + NodeStatus.DEAD, + ] diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/sdk.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/sdk.py new file mode 100644 index 0000000000000000000000000000000000000000..72b707e4bb92c3992431d35f5c30abb73b9b4123 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/sdk.py @@ -0,0 +1,96 @@ +import time +from collections import defaultdict +from typing import List + +from ray._raylet import GcsClient +from ray.autoscaler.v2.schema import ClusterStatus, Stats +from ray.autoscaler.v2.utils import ClusterStatusParser +from ray.core.generated.autoscaler_pb2 import ( + ClusterResourceState, + GetClusterResourceStateReply, + GetClusterStatusReply, +) + +DEFAULT_RPC_TIMEOUT_S = 10 + + +def request_cluster_resources( + gcs_address: str, to_request: List[dict], timeout: int = DEFAULT_RPC_TIMEOUT_S +): + """Request resources from the autoscaler. + + This will add a cluster resource constraint to GCS. GCS will asynchronously + pass the constraint to the autoscaler, and the autoscaler will try to provision the + requested minimal bundles in `to_request`. + + If the cluster already has `to_request` resources, this will be an no-op. + Future requests submitted through this API will overwrite the previous requests. + + Args: + gcs_address: The GCS address to query. + to_request: A list of resource bundles to request the cluster to have. + Each bundle is a dict of resource name to resource quantity, e.g: + [{"CPU": 1}, {"GPU": 1}]. + timeout: Timeout in seconds for the request to be timeout + + """ + assert len(gcs_address) > 0, "GCS address is not specified." + + # Aggregate bundle by shape. + resource_requests_by_count = defaultdict(int) + for request in to_request: + bundle = frozenset(request.items()) + resource_requests_by_count[bundle] += 1 + + bundles = [] + counts = [] + for bundle, count in resource_requests_by_count.items(): + bundles.append(dict(bundle)) + counts.append(count) + + GcsClient(gcs_address).request_cluster_resource_constraint( + bundles, counts, timeout_s=timeout + ) + + +def get_cluster_status( + gcs_address: str, timeout: int = DEFAULT_RPC_TIMEOUT_S +) -> ClusterStatus: + """ + Get the cluster status from the autoscaler. + + Args: + gcs_address: The GCS address to query. + timeout: Timeout in seconds for the request to be timeout + + Returns: + A ClusterStatus object. + """ + assert len(gcs_address) > 0, "GCS address is not specified." + req_time = time.time() + str_reply = GcsClient(gcs_address).get_cluster_status(timeout_s=timeout) + reply_time = time.time() + reply = GetClusterStatusReply() + reply.ParseFromString(str_reply) + + # TODO(rickyx): To be more accurate, we could add a timestamp field from the reply. + return ClusterStatusParser.from_get_cluster_status_reply( + reply, + stats=Stats(gcs_request_time_s=reply_time - req_time, request_ts_s=req_time), + ) + + +def get_cluster_resource_state(gcs_client: GcsClient) -> ClusterResourceState: + """ + Get the cluster resource state from GCS. + Args: + gcs_client: The GCS client to query. + Returns: + A ClusterResourceState object + Raises: + Exception: If the request times out or failed. + """ + str_reply = gcs_client.get_cluster_resource_state() + reply = GetClusterResourceStateReply() + reply.ParseFromString(str_reply) + return reply.cluster_resource_state diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/utils.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..d3128e961c637e548a23b9c8a5e29318be04538f --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/v2/utils.py @@ -0,0 +1,1092 @@ +from collections import Counter, defaultdict +from copy import deepcopy +from datetime import datetime +from enum import Enum +from itertools import chain +from typing import Any, Dict, List, Optional, Tuple + +import ray +from ray._common.utils import binary_to_hex +from ray._raylet import GcsClient +from ray.autoscaler._private import constants +from ray.autoscaler._private.util import ( + format_pg, + format_resource_demand_summary, + parse_usage, +) +from ray.autoscaler.v2.schema import ( + NODE_DEATH_CAUSE_RAYLET_DIED, + ClusterConstraintDemand, + ClusterStatus, + LaunchRequest, + NodeInfo, + NodeUsage, + PlacementGroupResourceDemand, + RayTaskActorDemand, + ResourceDemand, + ResourceDemandSummary, + ResourceRequestByCount, + ResourceUsage, + Stats, +) +from ray.core.generated.autoscaler_pb2 import ( + AffinityConstraint, + AntiAffinityConstraint, + AutoscalingState, + ClusterResourceState, + GetClusterStatusReply, + NodeState, + NodeStatus, + PlacementConstraint, + ResourceRequest, +) +from ray.core.generated.autoscaler_pb2 import ( + ResourceRequestByCount as ResourceRequestByCountProto, +) +from ray.core.generated.common_pb2 import ( + LabelSelectorConstraint, + LabelSelector, +) +from ray.experimental.internal_kv import internal_kv_get_gcs_client + + +def _count_by(data: Any, key: str) -> Dict[str, int]: + """ + Count the number of items by the given keys. + Args: + data: the data to be counted + keys: the keys to count by + Returns: + counts: the counts + """ + counts = defaultdict(int) + for item in data: + key_name = getattr(item, key) + counts[key_name] += 1 + return counts + + +class ProtobufUtil: + """ + A utility class for protobuf objects. + """ + + @staticmethod + def to_dict(proto): + """ + Convert a protobuf object to a dict. + + This is a slow conversion, and should only be used for debugging or + latency insensitve code. + + Args: + proto: the protobuf object + Returns: + dict: the dict + """ + from ray._private.protobuf_compat import message_to_dict + + return message_to_dict( + proto, + preserving_proto_field_name=True, + always_print_fields_with_no_presence=True, + ) + + @staticmethod + def to_dict_list(protos): + """ + Convert a list of protobuf objects to a list of dicts. + + Args: + protos: the list of protobuf objects + Returns: + dict_list: the list of dicts + """ + return [ProtobufUtil.to_dict(proto) for proto in protos] + + +class ResourceRequestUtil(ProtobufUtil): + """ + A utility class for resource requests, autoscaler.proto.ResourceRequest + """ + + class PlacementConstraintType(Enum): + """ + The affinity type for the resource request. + """ + + ANTI_AFFINITY = "ANTI_AFFINITY" + AFFINITY = "AFFINITY" + + @staticmethod + def group_by_count( + requests: List[ResourceRequest], + ) -> List[ResourceRequestByCountProto]: + """ + Aggregate resource requests by shape. + Args: + requests: the list of resource requests + Returns: + resource_requests_by_count: the aggregated resource requests by count + """ + resource_requests_by_count = defaultdict(int) + for request in requests: + serialized_request = request.SerializeToString() + resource_requests_by_count[serialized_request] += 1 + + results = [] + for serialized_request, count in resource_requests_by_count.items(): + request = ResourceRequest() + request.ParseFromString(serialized_request) + results.append(ResourceRequestByCountProto(request=request, count=count)) + + return results + + @staticmethod + def ungroup_by_count( + requests_by_count: List[ResourceRequestByCountProto], + ) -> List[ResourceRequest]: + """ + Flatten the resource requests by count to resource requests. + Args: + requests_by_count: the resource requests by count + Returns: + requests: the flattened resource requests + """ + reqs = [] + for r in requests_by_count: + reqs += [r.request] * r.count + + return reqs + + @staticmethod + def to_resource_map( + request: ResourceRequest, + ) -> Dict[str, float]: + """ + Convert the resource request by count to resource map. + Args: + request: the resource request + Returns: + resource_map: the resource map + """ + resource_map = defaultdict(float) + for k, v in request.resources_bundle.items(): + resource_map[k] += v + return dict(resource_map) + + @staticmethod + def to_resource_maps( + requests: List[ResourceRequest], + ) -> List[Dict[str, float]]: + """ + Convert the resource requests by count to resource map. + Args: + requests: the resource requests + Returns: + resource_maps: list of resource map + """ + return [ResourceRequestUtil.to_resource_map(r) for r in requests] + + @staticmethod + def make( + resources_map: Dict[str, float], + constraints: Optional[List[Tuple[PlacementConstraintType, str, str]]] = None, + label_selectors: Optional[List[List[Tuple[str, int, List[str]]]]] = None, + ) -> ResourceRequest: + """ + Make a resource request from the given resources map. + Args: + resources_map: Mapping of resource names to quantities. + constraints: Placement constraints. Each tuple is (constraint_type, + label_key, label_value), where `constraint_type` is a + PlacementConstraintType (AFFINITY or ANTI_AFFINITY). + label_selectors: Optional list of label selectors. Each selector is + a list of (label_key, operator_enum, label_values) tuples. + Returns: + request: the ResourceRequest object + """ + request = ResourceRequest() + for resource_name, quantity in resources_map.items(): + request.resources_bundle[resource_name] = quantity + + if constraints is not None: + for constraint_type, label, value in constraints: + if ( + constraint_type + == ResourceRequestUtil.PlacementConstraintType.AFFINITY + ): + request.placement_constraints.append( + PlacementConstraint( + affinity=AffinityConstraint( + label_name=label, label_value=value + ) + ) + ) + elif ( + constraint_type + == ResourceRequestUtil.PlacementConstraintType.ANTI_AFFINITY + ): + request.placement_constraints.append( + PlacementConstraint( + anti_affinity=AntiAffinityConstraint( + label_name=label, label_value=value + ) + ) + ) + else: + raise ValueError(f"Unknown constraint type: {constraint_type}") + + if label_selectors is not None: + for selector in label_selectors: + selector_proto = LabelSelector() + for label_key, operator_enum, label_values in selector: + selector_proto.label_constraints.append( + LabelSelectorConstraint( + label_key=label_key, + operator=operator_enum, + label_values=label_values, + ) + ) + request.label_selectors.append(selector_proto) + + return request + + @staticmethod + def combine_requests_with_affinity( + resource_requests: List[ResourceRequest], + ) -> List[ResourceRequest]: + """ + Combine the resource requests with affinity constraints + into the same request. This is so that requests with affinity + constraints could be considered and placed together. + + It merges the resource requests with the same affinity constraints + into one request, and dedup the placement constraints. + + This assumes following: + 1. There's only at most 1 placement constraint, either an affinity + constraint OR an anti-affinity constraint. + + Args: + resource_requests: The list of resource requests to be combined. + Returns: + A list of combined resource requests. + """ + + # Map of set of serialized affinity constraint to the list of resource requests + requests_by_affinity: Dict[ + Tuple[str, str, Tuple], List[ResourceRequest] + ] = defaultdict(list) + combined_requests: List[ResourceRequest] = [] + + for request in resource_requests: + assert len(request.placement_constraints) <= 1, ( + "There should be at most 1 placement constraint, " + "either an affinity constraint OR an anti-affinity constraint." + ) + + if len(request.placement_constraints) == 0: + # No affinity constraints, just add to the combined requests. + combined_requests.append(request) + continue + + constraint = request.placement_constraints[0] + + if constraint.HasField("affinity"): + # Combine requests with affinity and label selectors. + affinity = constraint.affinity + key = ( + affinity.label_name, + affinity.label_value, + ResourceRequestUtil._label_selector_key(request.label_selectors), + ) + requests_by_affinity[key].append(request) + elif constraint.HasField("anti_affinity"): + # We don't need to combine requests with anti-affinity constraints. + combined_requests.append(request) + + for ( + affinity_label_name, + affinity_label_value, + label_selector_key, + ), requests in requests_by_affinity.items(): + combined_request = ResourceRequest() + + # Merge the resource bundles with the same affinity constraint. + for request in requests: + for k, v in request.resources_bundle.items(): + combined_request.resources_bundle[k] = ( + combined_request.resources_bundle.get(k, 0) + v + ) + + # Add the placement constraint to the combined request. + affinity_constraint = AffinityConstraint( + label_name=affinity_label_name, label_value=affinity_label_value + ) + combined_request.placement_constraints.append( + PlacementConstraint(affinity=affinity_constraint) + ) + + combined_request.label_selectors.extend(requests[0].label_selectors) + + combined_requests.append(combined_request) + + return combined_requests + + def _label_selector_key( + label_selectors: List[LabelSelector], + ) -> Tuple: + """ + Convert label selectors into a hashable form for grouping. + This is used for gang requests with identical label_selectors. + """ + result = [] + for selector in label_selectors: + constraints = [] + for constraint in selector.label_constraints: + constraints.append( + ( + constraint.label_key, + constraint.operator, + tuple(sorted(constraint.label_values)), + ) + ) + result.append(tuple(constraints)) + return tuple(result) + + +class ClusterStatusFormatter: + """ + A formatter to format the ClusterStatus into a string. + + """ + + @classmethod + def format(cls, data: ClusterStatus, verbose: bool = False) -> str: + header, separator_len = cls._header_info(data, verbose) + separator = "-" * separator_len + + # Parse ClusterStatus information to reportable format + available_node_report = cls._available_node_report(data) + idle_node_report = cls._idle_node_report(data) + pending_report = cls._pending_node_report(data) + failure_report = cls._failed_node_report(data, verbose) + cluster_usage_report = cls._cluster_usage_report(data, verbose) + constraints_report = cls._constraint_report( + data.resource_demands.cluster_constraint_demand + ) + demand_report = cls._demand_report(data) + node_usage_report = ( + "" + if not verbose + else cls._node_usage_report(data.active_nodes, data.idle_nodes) + ) + + # Format Cluster Status reports into one output + formatted_output_lines = [ + header, + "Node status", + separator, + "Active:", + available_node_report, + "Idle:", + idle_node_report, + "Pending:", + pending_report, + failure_report, + "", + "Resources", + separator, + "Total Usage:", + cluster_usage_report, + "Total Constraints:", + constraints_report, + "Total Demands:", + demand_report, + node_usage_report, + ] + + formatted_output = "\n".join(formatted_output_lines) + + return formatted_output.strip() + + @staticmethod + def _node_usage_report( + active_nodes: List[NodeInfo], idle_nodes: List[NodeInfo] + ) -> str: + """[Example]: + Node: raycluster-autoscaler-small-group-worker-n8hrw (small-group) + Id: cc22041297e5fc153b5357e41f184c8000869e8de97252cc0291fd17 + Usage: + 1.0/1.0 CPU + 0B/953.67MiB memory + 0B/251.76MiB object_store_memory + Activity: + Resource: CPU currently in use. + Busy workers on node. + """ + node_id_to_usage: Dict[str, Dict[str, Tuple[float, float]]] = {} + node_id_to_type: Dict[str, str] = {} + node_id_to_idle_time: Dict[str, int] = {} + node_id_to_instance_id: Dict[str, str] = {} + node_id_to_activities: Dict[str, List[str]] = {} + + # Populate mappings for node types, idle times, instance ids, and activities + for node in chain(active_nodes, idle_nodes): + node_id_to_usage[node.node_id] = { + u.resource_name: (u.used, u.total) for u in node.resource_usage.usage + } + node_id_to_type[node.node_id] = node.ray_node_type_name + node_id_to_idle_time[node.node_id] = node.resource_usage.idle_time_ms + node_id_to_instance_id[node.node_id] = node.instance_id + node_id_to_activities[node.node_id] = node.node_activity + + node_usage_report_lines = [] + for node_id, usage in node_id_to_usage.items(): + node_usage_report_lines.append("") # Add a blank line between nodes + + node_type_line = f"Node: {node_id_to_instance_id[node_id]}" + if node_id in node_id_to_type: + node_type = node_id_to_type[node_id] + node_type_line += f" ({node_type})" + node_usage_report_lines.append(node_type_line) + node_usage_report_lines.append(f" Id: {node_id}") + + if node_id_to_idle_time.get(node_id, 0) > 0: + node_usage_report_lines.append( + f" Idle: {node_id_to_idle_time[node_id]} ms" + ) + + node_usage_report_lines.append(" Usage:") + for line in parse_usage(usage, verbose=True): + node_usage_report_lines.append(f" {line}") + + activities = node_id_to_activities.get(node_id, []) + node_usage_report_lines.append(" Activity:") + if activities is None or len(activities) == 0: + node_usage_report_lines.append(" (no activity)") + else: + for activity in activities: + node_usage_report_lines.append(f" {activity}") + + # Join the list into a single string with new lines + return "\n".join(node_usage_report_lines) + + @staticmethod + def _header_info(data: ClusterStatus, verbose: bool) -> (str, int): + # Get the request timestamp or default to the current time + time = ( + datetime.fromtimestamp(data.stats.request_ts_s) + if data.stats.request_ts_s + else datetime.now() + ) + + # Gather the time statistics + gcs_request_time = data.stats.gcs_request_time_s + non_terminated_nodes_time = data.stats.none_terminated_node_request_time_s + autoscaler_update_time = data.stats.autoscaler_iteration_time_s + + # Create the header with autoscaler status + header = "=" * 8 + f" Autoscaler status: {time} " + "=" * 8 + separator_len = len(header) + + # Add verbose details if required + if verbose: + details = [] + if gcs_request_time: + details.append(f"GCS request time: {gcs_request_time:3f}s") + if non_terminated_nodes_time: + details.append( + f"Node Provider non_terminated_nodes time: {non_terminated_nodes_time:3f}s" + ) + if autoscaler_update_time: + details.append( + f"Autoscaler iteration time: {autoscaler_update_time:3f}s" + ) + + if details: + header += "\n" + "\n".join(details) + "\n" + + return header, separator_len + + @staticmethod + def _available_node_report(data: ClusterStatus) -> str: + active_nodes = _count_by(data.active_nodes, "ray_node_type_name") + + # Build the available node report + if not active_nodes: + return " (no active nodes)" + return "\n".join( + f" {count} {node_type}" for node_type, count in active_nodes.items() + ) + + @staticmethod + def _idle_node_report(data: ClusterStatus) -> str: + idle_nodes = _count_by(data.idle_nodes, "ray_node_type_name") + + # Build the idle node report + if not idle_nodes: + return " (no idle nodes)" + return "\n".join( + f" {count} {node_type}" for node_type, count in idle_nodes.items() + ) + + @staticmethod + def _failed_node_report(data: ClusterStatus, verbose: bool) -> str: + failure_lines = [] + + # Process failed launches + if data.failed_launches: + sorted_failed_launches = sorted( + data.failed_launches, + key=lambda launch: launch.request_ts_s, + reverse=True, + ) + + for failed_launch in sorted_failed_launches: + node_type = failed_launch.ray_node_type_name + category = "LaunchFailed" + description = failed_launch.details + attempted_time = datetime.fromtimestamp(failed_launch.request_ts_s) + formatted_time = f"{attempted_time.hour:02d}:{attempted_time.minute:02d}:{attempted_time.second:02d}" + + line = f" {node_type}: {category} (latest_attempt: {formatted_time})" + if verbose: + line += f" - {description}" + + failure_lines.append(line) + + # Process failed nodes + for node in data.failed_nodes: + failure_lines.append( + f" {node.ray_node_type_name}: NodeTerminated (instance_id: {node.instance_id})" + ) + + # Limit the number of failures displayed + failure_lines = failure_lines[: constants.AUTOSCALER_MAX_FAILURES_DISPLAYED] + + # Build the failure report + failure_report = "Recent failures:\n" + failure_report += ( + "\n".join(failure_lines) if failure_lines else " (no failures)" + ) + + return failure_report + + @staticmethod + def _pending_node_report(data: ClusterStatus) -> str: + # Prepare pending launch lines + pending_lines = [ + f" {node_type}, {count} launching" + for node_type, count in _count_by( + data.pending_launches, "ray_node_type_name" + ).items() + ] + + # Prepare pending node lines + pending_lines.extend( + f" {ip}: {node_type}, {status.lower()}" + for ip, node_type, status in ( + (node.instance_id, node.ray_node_type_name, node.details) + for node in data.pending_nodes + ) + ) + + # Construct the pending report + if pending_lines: + return "\n".join(pending_lines) + return " (no pending nodes)" + + @staticmethod + def _constraint_report( + cluster_constraint_demand: List[ClusterConstraintDemand], + ) -> str: + """Returns a formatted string describing the resource constraints from request_resources(). + + Args: + data: ClusterStatus object containing resource demand information. + + Returns: + String containing the formatted constraints report, either listing each constraint + and count or indicating no constraints exist. + + Example: + >>> cluster_constraint_demand = [ + ... ClusterConstraintDemand(bundles_by_count=[ + ... ResourceRequestByCount(bundle={"CPU": 4}, count=2), + ... ResourceRequestByCount(bundle={"GPU": 1}, count=1) + ... ]) + ... ] + >>> ClusterStatusFormatter._constraint_report(cluster_constraint_demand) + " {'CPU': 4}: 2 from request_resources()\\n {'GPU': 1}: 1 from request_resources()" + """ + constraint_lines = [] + request_demand = [ + (bc.bundle, bc.count) + for constraint_demand in cluster_constraint_demand + for bc in constraint_demand.bundles_by_count + ] + for bundle, count in request_demand: + constraint_lines.append(f" {bundle}: {count} from request_resources()") + if constraint_lines: + return "\n".join(constraint_lines) + return " (no request_resources() constraints)" + + @staticmethod + def _demand_report(data: ClusterStatus) -> str: + # Process resource demands + resource_demands = [ + (bundle.bundle, bundle.count) + for demand in data.resource_demands.ray_task_actor_demand + for bundle in demand.bundles_by_count + ] + demand_lines = [] + if resource_demands: + demand_lines.extend(format_resource_demand_summary(resource_demands)) + + # Process placement group demands + pg_demand_strs = [ + f"{pg_demand.strategy}|{pg_demand.state}" + for pg_demand in data.resource_demands.placement_group_demand + ] + pg_demand_str_to_demand = { + f"{pg_demand.strategy}|{pg_demand.state}": pg_demand + for pg_demand in data.resource_demands.placement_group_demand + } + pg_freqs = Counter(pg_demand_strs) + + pg_demand = [ + ( + { + "strategy": pg_demand_str_to_demand[pg_str].strategy, + "bundles": [ + (bundle.bundle, bundle.count) + for bundle in pg_demand_str_to_demand[pg_str].bundles_by_count + ], + }, + freq, + ) + for pg_str, freq in pg_freqs.items() + ] + + for pg, count in pg_demand: + pg_str = format_pg(pg) + demand_lines.append(f" {pg_str}: {count}+ pending placement groups") + + # Generate demand report + if demand_lines: + return "\n".join(demand_lines) + return " (no resource demands)" + + @staticmethod + def _cluster_usage_report(data: ClusterStatus, verbose: bool) -> str: + # Build usage dictionary + usage = { + u.resource_name: (u.used, u.total) for u in data.cluster_resource_usage + } + + # Parse usage lines + usage_lines = parse_usage(usage, verbose) + + # Generate usage report + usage_report = [f" {line}" for line in usage_lines] + [""] + + return "\n".join(usage_report) + + +class ClusterStatusParser: + @classmethod + def from_get_cluster_status_reply( + cls, proto: GetClusterStatusReply, stats: Stats + ) -> ClusterStatus: + # parse nodes info + active_nodes, idle_nodes, failed_nodes = cls._parse_nodes( + proto.cluster_resource_state + ) + + # parse pending nodes info + pending_nodes = cls._parse_pending(proto.autoscaling_state) + + # parse launch requests + pending_launches, failed_launches = cls._parse_launch_requests( + proto.autoscaling_state + ) + + # parse cluster resource usage + cluster_resource_usage = cls._parse_cluster_resource_usage( + proto.cluster_resource_state + ) + + # parse resource demands + resource_demands = cls._parse_resource_demands(proto.cluster_resource_state) + + # parse stats + stats = cls._parse_stats(proto, stats) + + return ClusterStatus( + active_nodes=active_nodes, + idle_nodes=idle_nodes, + pending_launches=pending_launches, + failed_launches=failed_launches, + pending_nodes=pending_nodes, + failed_nodes=failed_nodes, + cluster_resource_usage=cluster_resource_usage, + resource_demands=resource_demands, + stats=stats, + ) + + @classmethod + def _parse_stats(cls, reply: GetClusterStatusReply, stats: Stats) -> Stats: + """ + Parse the stats from the get cluster status reply. + Args: + reply: the get cluster status reply + stats: the stats + Returns: + stats: the parsed stats + """ + stats = deepcopy(stats) + + stats.gcs_request_time_s = stats.gcs_request_time_s + # TODO(rickyx): Populate other autoscaler stats once available. + stats.autoscaler_version = str(reply.autoscaling_state.autoscaler_state_version) + stats.cluster_resource_state_version = str( + reply.cluster_resource_state.cluster_resource_state_version + ) + + return stats + + @classmethod + def _parse_resource_demands( + cls, state: ClusterResourceState + ) -> List[ResourceDemand]: + """ + Parse the resource demands from the cluster resource state. + Args: + state: the cluster resource state + Returns: + resource_demands: the resource demands + """ + task_actor_demand = [] + pg_demand = [] + constraint_demand = [] + + for request_count in state.pending_resource_requests: + # TODO(rickyx): constraints? + demand = RayTaskActorDemand( + bundles_by_count=[ + ResourceRequestByCount( + request_count.request.resources_bundle, request_count.count + ) + ], + ) + task_actor_demand.append(demand) + + for gang_request in state.pending_gang_resource_requests: + demand = PlacementGroupResourceDemand( + bundles_by_count=cls._aggregate_resource_requests_by_shape( + gang_request.requests + ), + details=gang_request.details, + ) + pg_demand.append(demand) + + for constraint_request in state.cluster_resource_constraints: + demand = ClusterConstraintDemand( + bundles_by_count=[ + ResourceRequestByCount( + bundle=dict(r.request.resources_bundle.items()), count=r.count + ) + for r in constraint_request.resource_requests + ] + ) + constraint_demand.append(demand) + + return ResourceDemandSummary( + ray_task_actor_demand=task_actor_demand, + placement_group_demand=pg_demand, + cluster_constraint_demand=constraint_demand, + ) + + @classmethod + def _aggregate_resource_requests_by_shape( + cls, + requests: List[ResourceRequest], + ) -> List[ResourceRequestByCount]: + """ + Aggregate resource requests by shape. + Args: + requests: the list of resource requests + Returns: + resource_requests_by_count: the aggregated resource requests by count + """ + + resource_requests_by_count = defaultdict(int) + for request in requests: + bundle = frozenset(request.resources_bundle.items()) + resource_requests_by_count[bundle] += 1 + + return [ + ResourceRequestByCount(dict(bundle), count) + for bundle, count in resource_requests_by_count.items() + ] + + @classmethod + def _parse_node_resource_usage( + cls, node_state: NodeState, usage: Dict[str, ResourceUsage] + ) -> Dict[str, ResourceUsage]: + """ + Parse the node resource usage from the node state. + Args: + node_state: the node state + usage: the usage dict to be updated. This is a dict of + {resource_name: ResourceUsage} + Returns: + usage: the updated usage dict + """ + # Tuple of {resource_name : (used, total)} + d = defaultdict(lambda: [0.0, 0.0]) + for resource_name, resource_total in node_state.total_resources.items(): + d[resource_name][1] += resource_total + # Will be subtracted from available later. + d[resource_name][0] += resource_total + + for ( + resource_name, + resource_available, + ) in node_state.available_resources.items(): + d[resource_name][0] -= resource_available + + # Merge with the passed in usage. + for k, (used, total) in d.items(): + usage[k].resource_name = k + usage[k].used += used + usage[k].total += total + + return usage + + @classmethod + def _parse_cluster_resource_usage( + cls, + state: ClusterResourceState, + ) -> List[ResourceUsage]: + """ + Parse the cluster resource usage from the cluster resource state. + Args: + state: the cluster resource state + Returns: + cluster_resource_usage: the cluster resource usage + """ + + cluster_resource_usage = defaultdict(ResourceUsage) + + for node_state in state.node_states: + if node_state.status != NodeStatus.DEAD: + cluster_resource_usage = cls._parse_node_resource_usage( + node_state, cluster_resource_usage + ) + + return list(cluster_resource_usage.values()) + + @classmethod + def _parse_nodes( + cls, + state: ClusterResourceState, + ) -> Tuple[List[NodeInfo], List[NodeInfo]]: + """ + Parse the node info from the cluster resource state. + Args: + state: the cluster resource state + Returns: + active_nodes: the list of non-idle nodes + idle_nodes: the list of idle nodes + dead_nodes: the list of dead nodes + """ + active_nodes = [] + dead_nodes = [] + idle_nodes = [] + for node_state in state.node_states: + # Basic node info. + node_id = binary_to_hex(node_state.node_id) + if len(node_state.ray_node_type_name) == 0: + # We don't have a node type name, but this is needed for showing + # healthy nodes. This happens when we don't use cluster launcher. + # but start ray manually. We will use node id as node type name. + ray_node_type_name = f"node_{node_id}" + else: + ray_node_type_name = node_state.ray_node_type_name + + # Parse the resource usage if it's not dead + node_resource_usage = None + failure_detail = None + if node_state.status == NodeStatus.DEAD: + # TODO(rickyx): Technically we could get a more verbose + # failure detail from GCS, but existing ray status treats + # all ray failures as raylet death. + failure_detail = NODE_DEATH_CAUSE_RAYLET_DIED + else: + usage = defaultdict(ResourceUsage) + usage = cls._parse_node_resource_usage(node_state, usage) + node_resource_usage = NodeUsage( + usage=list(usage.values()), + idle_time_ms=node_state.idle_duration_ms + if node_state.status == NodeStatus.IDLE + else 0, + ) + + node_info = NodeInfo( + instance_type_name=node_state.instance_type_name, + node_status=NodeStatus.Name(node_state.status), + node_id=binary_to_hex(node_state.node_id), + ip_address=node_state.node_ip_address, + ray_node_type_name=ray_node_type_name, + instance_id=node_state.instance_id, + resource_usage=node_resource_usage, + failure_detail=failure_detail, + node_activity=node_state.node_activity, + labels=dict(node_state.labels), + ) + + if node_state.status == NodeStatus.DEAD: + dead_nodes.append(node_info) + elif node_state.status == NodeStatus.IDLE: + idle_nodes.append(node_info) + else: + active_nodes.append(node_info) + + return active_nodes, idle_nodes, dead_nodes + + @classmethod + def _parse_launch_requests( + cls, state: AutoscalingState + ) -> Tuple[List[LaunchRequest], List[LaunchRequest]]: + """ + Parse the launch requests from the autoscaling state. + Args: + state: the autoscaling state, empty if there's no autoscaling state + being reported. + Returns: + pending_launches: the list of pending launches + failed_launches: the list of failed launches + """ + pending_launches = [] + for pending_request in state.pending_instance_requests: + launch = LaunchRequest( + instance_type_name=pending_request.instance_type_name, + ray_node_type_name=pending_request.ray_node_type_name, + count=pending_request.count, + state=LaunchRequest.Status.PENDING, + request_ts_s=pending_request.request_ts, + ) + + pending_launches.append(launch) + + failed_launches = [] + for failed_request in state.failed_instance_requests: + launch = LaunchRequest( + instance_type_name=failed_request.instance_type_name, + ray_node_type_name=failed_request.ray_node_type_name, + count=failed_request.count, + state=LaunchRequest.Status.FAILED, + request_ts_s=failed_request.start_ts, + details=failed_request.reason, + failed_ts_s=failed_request.failed_ts, + ) + + failed_launches.append(launch) + + return pending_launches, failed_launches + + @classmethod + def _parse_pending(cls, state: AutoscalingState) -> List[NodeInfo]: + """ + Parse the pending requests/nodes from the autoscaling state. + Args: + state: the autoscaling state, empty if there's no autoscaling state + being reported. + Returns: + pending_nodes: the list of pending nodes + """ + pending_nodes = [] + for pending_node in state.pending_instances: + pending_nodes.append( + NodeInfo( + instance_type_name=pending_node.instance_type_name, + ray_node_type_name=pending_node.ray_node_type_name, + details=pending_node.details, + instance_id=pending_node.instance_id, + ip_address=pending_node.ip_address, + ) + ) + + return pending_nodes + + +cached_is_autoscaler_v2 = None + + +def is_autoscaler_v2( + fetch_from_server: bool = False, gcs_client: Optional[GcsClient] = None +) -> bool: + """ + Check if the autoscaler is v2 from reading GCS internal KV. + + If the method is called multiple times, the result will be cached in the module. + + Args: + fetch_from_server: If True, fetch the value from the GCS server, otherwise + use the cached value. + gcs_client: The GCS client to use. If not provided, the default GCS + client will be used. + + Returns: + is_v2: True if the autoscaler is v2, False otherwise. + + Raises: + Exception: if GCS address could not be resolved (e.g. ray.init() not called) + """ + # If env var is set to enable autoscaler v2, we should always return True. + if ray._config.enable_autoscaler_v2() and not fetch_from_server: + # TODO(rickyx): Once we migrate completely to v2, we should remove this. + # While this short-circuit may allow client-server inconsistency + # (e.g. client running v1, while server running v2), it's currently + # not possible with existing use-cases. + return True + + global cached_is_autoscaler_v2 + if cached_is_autoscaler_v2 is not None and not fetch_from_server: + return cached_is_autoscaler_v2 + + if gcs_client is None: + gcs_client = internal_kv_get_gcs_client() + + assert gcs_client, ( + "GCS client is not available. Please initialize the global GCS client " + "first by calling ray.init() or explicitly calls to _initialize_internal_kv()." + ) + + # See src/ray/common/constants.h for the definition of this key. + cached_is_autoscaler_v2 = ( + gcs_client.internal_kv_get( + ray._raylet.GCS_AUTOSCALER_V2_ENABLED_KEY.encode(), + namespace=ray._raylet.GCS_AUTOSCALER_STATE_NAMESPACE.encode(), + ) + == b"1" + ) + + return cached_is_autoscaler_v2 + + +def is_head_node(node_state: NodeState) -> bool: + """ + Check if the node is a head node from the node state. + + Args: + node_state: the node state + Returns: + is_head: True if the node is a head node, False otherwise. + """ + # TODO: we should include this bit of information in the future. + # NOTE: we could use labels in the future to determine if it's a head node. + return "node:__internal_head__" in dict(node_state.total_resources) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/vsphere/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/vsphere/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/vsphere/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/vsphere/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..380bf6b0b4900aac17dc03e02bf31b2899dc2d9e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/vsphere/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/vsphere/defaults.yaml b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/vsphere/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1270a111586645380cea6da1afbccec18db0a0f7 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/autoscaler/vsphere/defaults.yaml @@ -0,0 +1,123 @@ +# An unique identifier for the head node and workers of this cluster. +cluster_name: ray-cluster + +# The maximum number of workers nodes to launch in addition to the head +# node. +max_workers: 5 + +# The autoscaler will scale up the cluster faster with higher upscaling speed. +# E.g., if the task requires adding more nodes then autoscaler will gradually +# scale up the cluster in chunks of upscaling_speed*currently_running_nodes. +# This number should be > 0. +upscaling_speed: 1.0 + +# This executes all commands on all nodes in the docker container, +# and opens all the necessary ports to support the Ray cluster. +# Empty string means disabled. +docker: + image: "rayproject/ray-ml:latest" + # image: rayproject/ray:latest # use this one if you don't need ML dependencies, it's faster to pull + container_name: "ray_container" + # If true, pulls latest version of image. Otherwise, `docker run` will only pull the image + # if no cached version is present. + pull_before_run: True + run_options: # Extra options to pass into "docker run" + - --ulimit nofile=65536:65536 + +# If a node is idle for this many minutes, it will be removed. +idle_timeout_minutes: 5 + +# Cloud-provider specific configuration. +provider: + type: vsphere + +# How Ray will authenticate with newly launched nodes. +auth: + ssh_user: ray +# By default Ray creates a new private keypair, but you can also use your own. +# If you do so, make sure to also set "KeyName" in the head and worker node +# configurations below. + ssh_private_key: ~/ray-bootstrap-key.pem + +# Tell the autoscaler the allowed node types and the resources they provide. +# The key is the name of the node type, which is just for debugging purposes. +# The node config specifies the launch config and physical instance type. +available_node_types: + ray.head.default: + # You can override the resources here. Adding GPU to the head node is not recommended. + # resources: { "CPU": 2, "Memory": 4096} + resources: {} + worker: + # The minimum number of nodes of this type to launch. + # This number should be >= 0. + min_workers: 1 + max_workers: 3 + # You can override the resources here. For GPU, currently only NVIDIA GPU is supported. If no ESXi host can + # fulfill the requirement, the Ray node creation will fail. The number of created nodes may not meet the desired + # minimum number. The vSphere node provider will not distinguish the GPU type. It will just count the quantity: + # mount the first k random available NVIDIA GPU to the VM, if the user set {"GPU": k}. + # resources: {"CPU": 2, "Memory": 4096, "GPU": 1} + resources: {} + worker_2: + # The minimum number of nodes of this type to launch. + # This number should be >= 0. + min_workers: 1 + max_workers: 2 + # You can override the resources here. For GPU, currently only NVIDIA GPU is supported. If no ESXi host can + # fulfill the requirement, the Ray node creation will fail. The number of created nodes may not meet the desired + # minimum number. The vSphere node provider will not distinguish the GPU type. It will just count the quantity: + # mount the first k random available NVIDIA GPU to the VM, if the user set {"GPU": k}. + # resources: {"CPU": 2, "Memory": 4096, "GPU": 1} + resources: {} + +# Specify the node type of the head node (as configured above). +head_node_type: ray.head.default + +# Files or directories to copy to the head and worker nodes. The format is a +# dictionary from REMOTE_PATH: LOCAL_PATH, e.g. +file_mounts: { +# "/path1/on/remote/machine": "/path1/on/local/machine", +# "/path2/on/remote/machine": "/path2/on/local/machine", +} + +# Files or directories to copy from the head node to the worker nodes. The format is a +# list of paths. The same path on the head node will be copied to the worker node. +# This behavior is a subset of the file_mounts behavior. In the vast majority of cases +# you should just use file_mounts. Only use this if you know what you're doing! +cluster_synced_files: [] + +# Whether changes to directories in file_mounts or cluster_synced_files in the head node +# should sync to the worker node continuously +file_mounts_sync_continuously: False + +# Patterns for files to exclude when running rsync up or rsync down +rsync_exclude: [] + +# Pattern files to use for filtering out files when running rsync up or rsync down. The file is searched for +# in the source directory and recursively through all subdirectories. For example, if .gitignore is provided +# as a value, the behavior will match git's behavior for finding and using .gitignore files. +rsync_filter: [] + +# List of commands that will be run before `setup_commands`. If docker is +# enabled, these commands will run outside the container and before docker +# is setup. +initialization_commands: [] + +# List of shell commands to run to set up nodes. +setup_commands: [] + +# Custom commands that will be run on the head node after common setup. +head_setup_commands: [] + +# Custom commands that will be run on worker nodes after common setup. +worker_setup_commands: [] + +# Command to start ray on the head node. You don't need to change this. +head_start_ray_commands: + - ray stop + - ulimit -n 65536; ray start --head --port=6379 --autoscaling-config=~/ray_bootstrap_config.yaml --dashboard-host=0.0.0.0 + +# Command to start ray on worker nodes. You don't need to change this. +worker_start_ray_commands: + - ray stop + - ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6a729f74f9bde3912f72339103c174fed557d2f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/cloudpickle.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/cloudpickle.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ced53bd52374691db68a9ef562ee31bb28fc877b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/cloudpickle.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/cloudpickle_fast.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/cloudpickle_fast.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5f1e0a0d2669afc32d8211cfaafe75926b9186fa Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/cloudpickle_fast.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/compat.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6080392b89192ccd2078a2b6ee865900eafbdb1 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/compat.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/py_pickle.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/py_pickle.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0144fe21e79171c6e74c6a735d47a20d3556c225 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/cloudpickle/__pycache__/py_pickle.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ace010d158357f7b25bc4e4eefda184dc626e057 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/autoscaler_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/autoscaler_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b62aa1ab67ff12baddcd4e39d7940c6f0b6d022e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/autoscaler_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/autoscaler_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/autoscaler_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8a04affd2019e9fac78f0900cb2fa55a25760ac9 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/autoscaler_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/common_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/common_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ee9062b6663725b7d313475dbde5f0650264fb47 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/common_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/common_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/common_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82bf74fdfaae82e7090a415e962c47f219920735 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/common_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/core_worker_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/core_worker_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..feebda2062b9af3743227660e22e0d82279a523f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/core_worker_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/core_worker_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/core_worker_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a429857d50c07b646b0cd2ea974821ef16607868 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/core_worker_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/dependency_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/dependency_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bfa8e3561a005175b1f097f172b16d1788409085 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/dependency_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/dependency_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/dependency_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c95dbcaf70d85a7c8707c2eb47402c7b45230dfd Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/dependency_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/event_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/event_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fe7b7ffa527c377488d8306cc3276187e2e7795c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/event_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/event_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/event_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..da47811ebf21c5087452c50e35e412f41b65f18e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/event_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_actor_task_definition_event_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_actor_task_definition_event_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..08f2ae65f77fcd42e87f07c3ae5f77d31536f0d6 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_actor_task_definition_event_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_actor_task_definition_event_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_actor_task_definition_event_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a029c4e7f265db29e36f076a648e75ad4d9ee411 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_actor_task_definition_event_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_base_event_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_base_event_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f131436190daf3da1431bbe166a1b7fe1b1b550c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_base_event_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_base_event_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_base_event_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1b7cdcde83af50077c6dbc4bfa48a475e421aaf6 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_base_event_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_event_aggregator_service_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_event_aggregator_service_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..84d4977b8b6a74db0a2baa4351429aad43789c88 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_event_aggregator_service_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_event_aggregator_service_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_event_aggregator_service_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8d4104bee67f4af5e6b0f360a11ff89ef8d58310 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_event_aggregator_service_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_definition_event_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_definition_event_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2a27ac9e232193ea5e30435efe97001e14c541b1 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_definition_event_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_definition_event_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_definition_event_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0d4729ba9274c97f9fa0deabeecbdee1dcbc77df Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_definition_event_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_execution_event_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_execution_event_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f52ec3a855ec96b56bc41cd841ae81505c291011 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_execution_event_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_execution_event_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_execution_event_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dc2f2ff97f4aaf7b4f6bf64c60e622a5f8b6159c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_execution_event_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_profile_events_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_profile_events_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..035fda2cf2e03af05f35ed1517259c8972c58c11 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_profile_events_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_profile_events_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_profile_events_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d2d4f46ccf40eb584e3b19ab4f9b959460be3e23 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/events_task_profile_events_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_actor_data_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_actor_data_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..328064e218dee87fe08d027f0206940feff08df5 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_actor_data_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_actor_data_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_actor_data_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dad4c95ff002bc2a2c15581df8cf4b0042cd8bec Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_actor_data_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_dataset_metadata_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_dataset_metadata_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..71f8eeac20d8292a2873548fe18575d7a87d6659 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_dataset_metadata_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_dataset_metadata_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_dataset_metadata_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..289e21172d7e58d6ace0ce9e50ebda83514cf075 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_dataset_metadata_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_driver_job_event_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_driver_job_event_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9130f35b408a83a00ac280aaff761f08df360afc Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_driver_job_event_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_driver_job_event_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_driver_job_event_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dad2e243f1ca0972780f2f7d8c069da4ea9bac3f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_driver_job_event_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_event_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_event_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..79b2eec36303c12f4392d8014dcf64f2ce3a52f8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_event_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_event_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_event_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a04fa3fc407d8fdefa8a4d5965c4f41caaa3640f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_event_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_node_data_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_node_data_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a4058712b3f70b718c702802fb7116deb3d195b7 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_node_data_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_node_data_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_node_data_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2d4f7ef769e1b9d948182f4abd7f631dbd0e30b0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_node_data_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_runtime_env_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_runtime_env_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b23ad38e9c99b2bcaeb378b62116e76e69accfe2 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_runtime_env_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_runtime_env_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_runtime_env_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0102a48f5ec3fcdf7ed0473eb81b45a1dfb97ea6 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_runtime_env_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_submission_job_event_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_submission_job_event_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9d9b7f81386ee31396b06c12e084717cbb056fbe Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_submission_job_event_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_submission_job_event_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_submission_job_event_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..416d4b5233a242682244699b1037b00e2ae0f870 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_submission_job_event_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_task_event_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_task_event_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..897e6841769d721336e7a731d70c55c42d37f0b1 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_task_event_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_task_event_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_task_event_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c59e42d9f1c2d371c2e31cb7a439f28998a1a3fb Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_task_event_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_train_state_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_train_state_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..50320cf3628016176012c63334bca9ba60b4e03f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_train_state_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_train_state_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_train_state_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6470a87bbe4bc0e234bdcb4ffe64db9ffaa97db4 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/export_train_state_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1b6c613a79dedaa79c5bc22c25a63b399bf7145d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3e71dc5f845037a6b44397d59eaa314234f8fb3c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_service_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_service_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b20a0769a50a49945297623ff8707b6ff2205b54 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_service_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_service_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_service_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..404f2a8a04ddd4328dea830b6aeeb0efd94fe08b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/gcs_service_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/instance_manager_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/instance_manager_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..79a1c7cc6ef9923bb80cc5aef78e78d2a17ad672 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/instance_manager_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/instance_manager_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/instance_manager_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..52875540d901558f2890e11db5babd426ef5ce1d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/instance_manager_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/logging_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/logging_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a39035e02b8274ee44ae87be91e6a0d0e479ada Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/logging_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/logging_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/logging_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..deeb080e3c217a3d371b5379453ff7ece9514d94 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/logging_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/metrics_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/metrics_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e30fefa8ca7358d2cddbc6bc74ad3653d8400f0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/metrics_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/metrics_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/metrics_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76912e17eaafacd88d1ec634086614146f668fe5 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/metrics_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/node_manager_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/node_manager_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73edf9b7a5afd583e955843b493ad5a3f449bd6f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/node_manager_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/node_manager_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/node_manager_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3c1d1461758c3d41cd9a099a6e12fea2200bd5c3 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/node_manager_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/profile_events_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/profile_events_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0f13f7f2fa0bcfc4f4db03d9b323a2741bb48ac0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/profile_events_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/profile_events_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/profile_events_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..84ff23490000284b19018b05f6fd65952ee7e012 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/profile_events_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/pubsub_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/pubsub_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4808faf665f873bb9e851c49ead4d38f64ffe92b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/pubsub_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/pubsub_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/pubsub_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..44d2b464b73b706b78e04ef28e5274f8b20af015 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/pubsub_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/ray_client_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/ray_client_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..10411507093c155941120287a830ea06bb1fa565 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/ray_client_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/ray_client_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/ray_client_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8233570ec308db24b6ebfa2c07c08980f92f1225 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/ray_client_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/reporter_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/reporter_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..69fb219cbf758b3f0e34be27fd9a14d204396895 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/reporter_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/reporter_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/reporter_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..25dd530acbf9b75fbea7fb9059aed1918c92b41d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/reporter_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/resource_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/resource_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9e6b09a651ddbd32fb0abaccd4d0495a0c4a2cc8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/resource_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/resource_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/resource_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..74df39997a7581faa5990bf07ef534e8521fb338 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/resource_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_agent_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_agent_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fbbe6886701167fdd22a2ac50452cb80caa7dce8 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_agent_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_agent_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_agent_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6b119e057d6319bfd85921420da5c669fc18844d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_agent_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_common_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_common_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1953ad33096da65d6733d82dcbc4d62582df08e0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_common_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_common_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_common_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5d9b893842d4850deb7f45633ec564652f540c0d Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/runtime_env_common_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/usage_pb2.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/usage_pb2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..56c0a3143b6ca313e217dc8fc670398b9d54b783 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/usage_pb2.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/usage_pb2_grpc.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/usage_pb2_grpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..340ca4fa21d35a451712e2bb349c7d6930d092c3 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/__pycache__/usage_pb2_grpc.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/autoscaler_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/autoscaler_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..3463719ff3979c9db50ed4a93d922f12f4f3dd5f --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/autoscaler_pb2.py @@ -0,0 +1,429 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/autoscaler.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!src/ray/protobuf/autoscaler.proto\x12\x12ray.rpc.autoscaler\x1a\x1dsrc/ray/protobuf/common.proto\"X\n\x16\x41ntiAffinityConstraint\x12\x1d\n\nlabel_name\x18\x01 \x01(\tR\tlabelName\x12\x1f\n\x0blabel_value\x18\x02 \x01(\tR\nlabelValue\"T\n\x12\x41\x66\x66inityConstraint\x12\x1d\n\nlabel_name\x18\x01 \x01(\tR\tlabelName\x12\x1f\n\x0blabel_value\x18\x02 \x01(\tR\nlabelValue\"\xd3\x01\n\x13PlacementConstraint\x12T\n\ranti_affinity\x18\x01 \x01(\x0b\x32*.ray.rpc.autoscaler.AntiAffinityConstraintH\x00R\x0c\x61ntiAffinity\x88\x01\x01\x12G\n\x08\x61\x66\x66inity\x18\x02 \x01(\x0b\x32&.ray.rpc.autoscaler.AffinityConstraintH\x01R\x08\x61\x66\x66inity\x88\x01\x01\x42\x10\n\x0e_anti_affinityB\x0b\n\t_affinity\"\xd9\x02\n\x0fResourceRequest\x12\x63\n\x10resources_bundle\x18\x01 \x03(\x0b\x32\x38.ray.rpc.autoscaler.ResourceRequest.ResourcesBundleEntryR\x0fresourcesBundle\x12\\\n\x15placement_constraints\x18\x02 \x03(\x0b\x32\'.ray.rpc.autoscaler.PlacementConstraintR\x14placementConstraints\x12?\n\x0flabel_selectors\x18\x03 \x03(\x0b\x32\x16.ray.rpc.LabelSelectorR\x0elabelSelectors\x1a\x42\n\x14ResourcesBundleEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\"m\n\x16ResourceRequestByCount\x12=\n\x07request\x18\x01 \x01(\x0b\x32#.ray.rpc.autoscaler.ResourceRequestR\x07request\x12\x14\n\x05\x63ount\x18\x02 \x01(\x03R\x05\x63ount\"b\n\x0e\x42undleSelector\x12P\n\x11resource_requests\x18\x01 \x03(\x0b\x32#.ray.rpc.autoscaler.ResourceRequestR\x10resourceRequests\"\xbf\x01\n\x13GangResourceRequest\x12?\n\x08requests\x18\x01 \x03(\x0b\x32#.ray.rpc.autoscaler.ResourceRequestR\x08requests\x12\x18\n\x07\x64\x65tails\x18\x02 \x01(\tR\x07\x64\x65tails\x12M\n\x10\x62undle_selectors\x18\x03 \x03(\x0b\x32\".ray.rpc.autoscaler.BundleSelectorR\x0f\x62undleSelectors\"t\n\x19\x43lusterResourceConstraint\x12W\n\x11resource_requests\x18\x01 \x03(\x0b\x32*.ray.rpc.autoscaler.ResourceRequestByCountR\x10resourceRequests\"\xe4\x07\n\tNodeState\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12\x1f\n\x0binstance_id\x18\x02 \x01(\tR\ninstanceId\x12+\n\x12ray_node_type_name\x18\x03 \x01(\tR\x0frayNodeTypeName\x12\x66\n\x13\x61vailable_resources\x18\x04 \x03(\x0b\x32\x35.ray.rpc.autoscaler.NodeState.AvailableResourcesEntryR\x12\x61vailableResources\x12Z\n\x0ftotal_resources\x18\x05 \x03(\x0b\x32\x31.ray.rpc.autoscaler.NodeState.TotalResourcesEntryR\x0etotalResources\x12W\n\x0e\x64ynamic_labels\x18\x06 \x03(\x0b\x32\x30.ray.rpc.autoscaler.NodeState.DynamicLabelsEntryR\rdynamicLabels\x12,\n\x12node_state_version\x18\x07 \x01(\x03R\x10nodeStateVersion\x12\x36\n\x06status\x18\x08 \x01(\x0e\x32\x1e.ray.rpc.autoscaler.NodeStatusR\x06status\x12(\n\x10idle_duration_ms\x18\t \x01(\x03R\x0eidleDurationMs\x12&\n\x0fnode_ip_address\x18\n \x01(\tR\rnodeIpAddress\x12,\n\x12instance_type_name\x18\x0b \x01(\tR\x10instanceTypeName\x12#\n\rnode_activity\x18\x0c \x03(\tR\x0cnodeActivity\x12\x41\n\x06labels\x18\r \x03(\x0b\x32).ray.rpc.autoscaler.NodeState.LabelsEntryR\x06labels\x1a\x45\n\x17\x41vailableResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x41\n\x13TotalResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a@\n\x12\x44ynamicLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"w\n\x1eGetClusterResourceStateRequest\x12U\n(last_seen_cluster_resource_state_version\x18\x01 \x01(\x03R#lastSeenClusterResourceStateVersion\"\xe0\x04\n\x14\x43lusterResourceState\x12\x43\n\x1e\x63luster_resource_state_version\x18\x01 \x01(\x03R\x1b\x63lusterResourceStateVersion\x12J\n\"last_seen_autoscaler_state_version\x18\x02 \x01(\x03R\x1elastSeenAutoscalerStateVersion\x12>\n\x0bnode_states\x18\x03 \x03(\x0b\x32\x1d.ray.rpc.autoscaler.NodeStateR\nnodeStates\x12\x66\n\x19pending_resource_requests\x18\x04 \x03(\x0b\x32*.ray.rpc.autoscaler.ResourceRequestByCountR\x17pendingResourceRequests\x12l\n\x1epending_gang_resource_requests\x18\x05 \x03(\x0b\x32\'.ray.rpc.autoscaler.GangResourceRequestR\x1bpendingGangResourceRequests\x12o\n\x1c\x63luster_resource_constraints\x18\x06 \x03(\x0b\x32-.ray.rpc.autoscaler.ClusterResourceConstraintR\x1a\x63lusterResourceConstraints\x12\x30\n\x14\x63luster_session_name\x18\x07 \x01(\tR\x12\x63lusterSessionName\"~\n\x1cGetClusterResourceStateReply\x12^\n\x16\x63luster_resource_state\x18\x01 \x01(\x0b\x32(.ray.rpc.autoscaler.ClusterResourceStateR\x14\x63lusterResourceState\"\xa8\x01\n\x16PendingInstanceRequest\x12,\n\x12instance_type_name\x18\x01 \x01(\tR\x10instanceTypeName\x12+\n\x12ray_node_type_name\x18\x02 \x01(\tR\x0frayNodeTypeName\x12\x14\n\x05\x63ount\x18\x03 \x01(\x05R\x05\x63ount\x12\x1d\n\nrequest_ts\x18\x04 \x01(\x03R\trequestTs\"\xd8\x01\n\x15\x46\x61iledInstanceRequest\x12,\n\x12instance_type_name\x18\x01 \x01(\tR\x10instanceTypeName\x12+\n\x12ray_node_type_name\x18\x02 \x01(\tR\x0frayNodeTypeName\x12\x14\n\x05\x63ount\x18\x03 \x01(\x05R\x05\x63ount\x12\x16\n\x06reason\x18\x04 \x01(\tR\x06reason\x12\x19\n\x08start_ts\x18\x05 \x01(\x03R\x07startTs\x12\x1b\n\tfailed_ts\x18\x06 \x01(\x03R\x08\x66\x61iledTs\"\xc6\x01\n\x0fPendingInstance\x12,\n\x12instance_type_name\x18\x01 \x01(\tR\x10instanceTypeName\x12+\n\x12ray_node_type_name\x18\x02 \x01(\tR\x0frayNodeTypeName\x12\x1f\n\x0binstance_id\x18\x03 \x01(\tR\ninstanceId\x12\x1d\n\nip_address\x18\x04 \x01(\tR\tipAddress\x12\x18\n\x07\x64\x65tails\x18\x05 \x01(\tR\x07\x64\x65tails\"\xa4\x06\n\x10\x41utoscalingState\x12U\n(last_seen_cluster_resource_state_version\x18\x01 \x01(\x03R#lastSeenClusterResourceStateVersion\x12\x38\n\x18\x61utoscaler_state_version\x18\x02 \x01(\x03R\x16\x61utoscalerStateVersion\x12\x66\n\x19pending_instance_requests\x18\x03 \x03(\x0b\x32*.ray.rpc.autoscaler.PendingInstanceRequestR\x17pendingInstanceRequests\x12\x65\n\x1cinfeasible_resource_requests\x18\x04 \x03(\x0b\x32#.ray.rpc.autoscaler.ResourceRequestR\x1ainfeasibleResourceRequests\x12r\n!infeasible_gang_resource_requests\x18\x05 \x03(\x0b\x32\'.ray.rpc.autoscaler.GangResourceRequestR\x1einfeasibleGangResourceRequests\x12\x84\x01\n\'infeasible_cluster_resource_constraints\x18\x06 \x03(\x0b\x32-.ray.rpc.autoscaler.ClusterResourceConstraintR$infeasibleClusterResourceConstraints\x12P\n\x11pending_instances\x18\x07 \x03(\x0b\x32#.ray.rpc.autoscaler.PendingInstanceR\x10pendingInstances\x12\x63\n\x18\x66\x61iled_instance_requests\x18\x08 \x03(\x0b\x32).ray.rpc.autoscaler.FailedInstanceRequestR\x16\x66\x61iledInstanceRequests\"r\n\x1dReportAutoscalingStateRequest\x12Q\n\x11\x61utoscaling_state\x18\x01 \x01(\x0b\x32$.ray.rpc.autoscaler.AutoscalingStateR\x10\x61utoscalingState\"\x1d\n\x1bReportAutoscalingStateReply\"\x98\x01\n\'RequestClusterResourceConstraintRequest\x12m\n\x1b\x63luster_resource_constraint\x18\x01 \x01(\x0b\x32-.ray.rpc.autoscaler.ClusterResourceConstraintR\x19\x63lusterResourceConstraint\"\'\n%RequestClusterResourceConstraintReply\"\x19\n\x17GetClusterStatusRequest\"\xca\x01\n\x15GetClusterStatusReply\x12Q\n\x11\x61utoscaling_state\x18\x01 \x01(\x0b\x32$.ray.rpc.autoscaler.AutoscalingStateR\x10\x61utoscalingState\x12^\n\x16\x63luster_resource_state\x18\x02 \x01(\x0b\x32(.ray.rpc.autoscaler.ClusterResourceStateR\x14\x63lusterResourceState\"\xc3\x01\n\x10\x44rainNodeRequest\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12;\n\x06reason\x18\x02 \x01(\x0e\x32#.ray.rpc.autoscaler.DrainNodeReasonR\x06reason\x12%\n\x0ereason_message\x18\x03 \x01(\tR\rreasonMessage\x12\x32\n\x15\x64\x65\x61\x64line_timestamp_ms\x18\x04 \x01(\x03R\x13\x64\x65\x61\x64lineTimestampMs\"k\n\x0e\x44rainNodeReply\x12\x1f\n\x0bis_accepted\x18\x01 \x01(\x08R\nisAccepted\x12\x38\n\x18rejection_reason_message\x18\x02 \x01(\tR\x16rejectionReasonMessage\"\xef\x01\n\x0fNodeGroupConfig\x12P\n\tresources\x18\x01 \x03(\x0b\x32\x32.ray.rpc.autoscaler.NodeGroupConfig.ResourcesEntryR\tresources\x12\x1b\n\tmin_count\x18\x02 \x01(\rR\x08minCount\x12\x1b\n\tmax_count\x18\x03 \x01(\x05R\x08maxCount\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x1a<\n\x0eResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x04R\x05value:\x02\x38\x01\"\x98\x03\n\rClusterConfig\x12X\n\rmin_resources\x18\x01 \x03(\x0b\x32\x33.ray.rpc.autoscaler.ClusterConfig.MinResourcesEntryR\x0cminResources\x12X\n\rmax_resources\x18\x02 \x03(\x0b\x32\x33.ray.rpc.autoscaler.ClusterConfig.MaxResourcesEntryR\x0cmaxResources\x12Q\n\x12node_group_configs\x18\x03 \x03(\x0b\x32#.ray.rpc.autoscaler.NodeGroupConfigR\x10nodeGroupConfigs\x1a?\n\x11MinResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x04R\x05value:\x02\x38\x01\x1a?\n\x11MaxResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x04R\x05value:\x02\x38\x01\"f\n\x1aReportClusterConfigRequest\x12H\n\x0e\x63luster_config\x18\x01 \x01(\x0b\x32!.ray.rpc.autoscaler.ClusterConfigR\rclusterConfig\"\x1a\n\x18ReportClusterConfigReply*L\n\nNodeStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44\x45\x41\x44\x10\x02\x12\x08\n\x04IDLE\x10\x03\x12\x0c\n\x08\x44RAINING\x10\x04*~\n\x0f\x44rainNodeReason\x12!\n\x1d\x44RAIN_NODE_REASON_UNSPECIFIED\x10\x00\x12&\n\"DRAIN_NODE_REASON_IDLE_TERMINATION\x10\x01\x12 \n\x1c\x44RAIN_NODE_REASON_PREEMPTION\x10\x02\x32\xec\x05\n\x16\x41utoscalerStateService\x12\x7f\n\x17GetClusterResourceState\x12\x32.ray.rpc.autoscaler.GetClusterResourceStateRequest\x1a\x30.ray.rpc.autoscaler.GetClusterResourceStateReply\x12|\n\x16ReportAutoscalingState\x12\x31.ray.rpc.autoscaler.ReportAutoscalingStateRequest\x1a/.ray.rpc.autoscaler.ReportAutoscalingStateReply\x12s\n\x13ReportClusterConfig\x12..ray.rpc.autoscaler.ReportClusterConfigRequest\x1a,.ray.rpc.autoscaler.ReportClusterConfigReply\x12\x9a\x01\n RequestClusterResourceConstraint\x12;.ray.rpc.autoscaler.RequestClusterResourceConstraintRequest\x1a\x39.ray.rpc.autoscaler.RequestClusterResourceConstraintReply\x12j\n\x10GetClusterStatus\x12+.ray.rpc.autoscaler.GetClusterStatusRequest\x1a).ray.rpc.autoscaler.GetClusterStatusReply\x12U\n\tDrainNode\x12$.ray.rpc.autoscaler.DrainNodeRequest\x1a\".ray.rpc.autoscaler.DrainNodeReplyb\x06proto3') + +_NODESTATUS = DESCRIPTOR.enum_types_by_name['NodeStatus'] +NodeStatus = enum_type_wrapper.EnumTypeWrapper(_NODESTATUS) +_DRAINNODEREASON = DESCRIPTOR.enum_types_by_name['DrainNodeReason'] +DrainNodeReason = enum_type_wrapper.EnumTypeWrapper(_DRAINNODEREASON) +UNSPECIFIED = 0 +RUNNING = 1 +DEAD = 2 +IDLE = 3 +DRAINING = 4 +DRAIN_NODE_REASON_UNSPECIFIED = 0 +DRAIN_NODE_REASON_IDLE_TERMINATION = 1 +DRAIN_NODE_REASON_PREEMPTION = 2 + + +_ANTIAFFINITYCONSTRAINT = DESCRIPTOR.message_types_by_name['AntiAffinityConstraint'] +_AFFINITYCONSTRAINT = DESCRIPTOR.message_types_by_name['AffinityConstraint'] +_PLACEMENTCONSTRAINT = DESCRIPTOR.message_types_by_name['PlacementConstraint'] +_RESOURCEREQUEST = DESCRIPTOR.message_types_by_name['ResourceRequest'] +_RESOURCEREQUEST_RESOURCESBUNDLEENTRY = _RESOURCEREQUEST.nested_types_by_name['ResourcesBundleEntry'] +_RESOURCEREQUESTBYCOUNT = DESCRIPTOR.message_types_by_name['ResourceRequestByCount'] +_BUNDLESELECTOR = DESCRIPTOR.message_types_by_name['BundleSelector'] +_GANGRESOURCEREQUEST = DESCRIPTOR.message_types_by_name['GangResourceRequest'] +_CLUSTERRESOURCECONSTRAINT = DESCRIPTOR.message_types_by_name['ClusterResourceConstraint'] +_NODESTATE = DESCRIPTOR.message_types_by_name['NodeState'] +_NODESTATE_AVAILABLERESOURCESENTRY = _NODESTATE.nested_types_by_name['AvailableResourcesEntry'] +_NODESTATE_TOTALRESOURCESENTRY = _NODESTATE.nested_types_by_name['TotalResourcesEntry'] +_NODESTATE_DYNAMICLABELSENTRY = _NODESTATE.nested_types_by_name['DynamicLabelsEntry'] +_NODESTATE_LABELSENTRY = _NODESTATE.nested_types_by_name['LabelsEntry'] +_GETCLUSTERRESOURCESTATEREQUEST = DESCRIPTOR.message_types_by_name['GetClusterResourceStateRequest'] +_CLUSTERRESOURCESTATE = DESCRIPTOR.message_types_by_name['ClusterResourceState'] +_GETCLUSTERRESOURCESTATEREPLY = DESCRIPTOR.message_types_by_name['GetClusterResourceStateReply'] +_PENDINGINSTANCEREQUEST = DESCRIPTOR.message_types_by_name['PendingInstanceRequest'] +_FAILEDINSTANCEREQUEST = DESCRIPTOR.message_types_by_name['FailedInstanceRequest'] +_PENDINGINSTANCE = DESCRIPTOR.message_types_by_name['PendingInstance'] +_AUTOSCALINGSTATE = DESCRIPTOR.message_types_by_name['AutoscalingState'] +_REPORTAUTOSCALINGSTATEREQUEST = DESCRIPTOR.message_types_by_name['ReportAutoscalingStateRequest'] +_REPORTAUTOSCALINGSTATEREPLY = DESCRIPTOR.message_types_by_name['ReportAutoscalingStateReply'] +_REQUESTCLUSTERRESOURCECONSTRAINTREQUEST = DESCRIPTOR.message_types_by_name['RequestClusterResourceConstraintRequest'] +_REQUESTCLUSTERRESOURCECONSTRAINTREPLY = DESCRIPTOR.message_types_by_name['RequestClusterResourceConstraintReply'] +_GETCLUSTERSTATUSREQUEST = DESCRIPTOR.message_types_by_name['GetClusterStatusRequest'] +_GETCLUSTERSTATUSREPLY = DESCRIPTOR.message_types_by_name['GetClusterStatusReply'] +_DRAINNODEREQUEST = DESCRIPTOR.message_types_by_name['DrainNodeRequest'] +_DRAINNODEREPLY = DESCRIPTOR.message_types_by_name['DrainNodeReply'] +_NODEGROUPCONFIG = DESCRIPTOR.message_types_by_name['NodeGroupConfig'] +_NODEGROUPCONFIG_RESOURCESENTRY = _NODEGROUPCONFIG.nested_types_by_name['ResourcesEntry'] +_CLUSTERCONFIG = DESCRIPTOR.message_types_by_name['ClusterConfig'] +_CLUSTERCONFIG_MINRESOURCESENTRY = _CLUSTERCONFIG.nested_types_by_name['MinResourcesEntry'] +_CLUSTERCONFIG_MAXRESOURCESENTRY = _CLUSTERCONFIG.nested_types_by_name['MaxResourcesEntry'] +_REPORTCLUSTERCONFIGREQUEST = DESCRIPTOR.message_types_by_name['ReportClusterConfigRequest'] +_REPORTCLUSTERCONFIGREPLY = DESCRIPTOR.message_types_by_name['ReportClusterConfigReply'] +AntiAffinityConstraint = _reflection.GeneratedProtocolMessageType('AntiAffinityConstraint', (_message.Message,), { + 'DESCRIPTOR' : _ANTIAFFINITYCONSTRAINT, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.AntiAffinityConstraint) + }) +_sym_db.RegisterMessage(AntiAffinityConstraint) + +AffinityConstraint = _reflection.GeneratedProtocolMessageType('AffinityConstraint', (_message.Message,), { + 'DESCRIPTOR' : _AFFINITYCONSTRAINT, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.AffinityConstraint) + }) +_sym_db.RegisterMessage(AffinityConstraint) + +PlacementConstraint = _reflection.GeneratedProtocolMessageType('PlacementConstraint', (_message.Message,), { + 'DESCRIPTOR' : _PLACEMENTCONSTRAINT, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.PlacementConstraint) + }) +_sym_db.RegisterMessage(PlacementConstraint) + +ResourceRequest = _reflection.GeneratedProtocolMessageType('ResourceRequest', (_message.Message,), { + + 'ResourcesBundleEntry' : _reflection.GeneratedProtocolMessageType('ResourcesBundleEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCEREQUEST_RESOURCESBUNDLEENTRY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ResourceRequest.ResourcesBundleEntry) + }) + , + 'DESCRIPTOR' : _RESOURCEREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ResourceRequest) + }) +_sym_db.RegisterMessage(ResourceRequest) +_sym_db.RegisterMessage(ResourceRequest.ResourcesBundleEntry) + +ResourceRequestByCount = _reflection.GeneratedProtocolMessageType('ResourceRequestByCount', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCEREQUESTBYCOUNT, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ResourceRequestByCount) + }) +_sym_db.RegisterMessage(ResourceRequestByCount) + +BundleSelector = _reflection.GeneratedProtocolMessageType('BundleSelector', (_message.Message,), { + 'DESCRIPTOR' : _BUNDLESELECTOR, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.BundleSelector) + }) +_sym_db.RegisterMessage(BundleSelector) + +GangResourceRequest = _reflection.GeneratedProtocolMessageType('GangResourceRequest', (_message.Message,), { + 'DESCRIPTOR' : _GANGRESOURCEREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.GangResourceRequest) + }) +_sym_db.RegisterMessage(GangResourceRequest) + +ClusterResourceConstraint = _reflection.GeneratedProtocolMessageType('ClusterResourceConstraint', (_message.Message,), { + 'DESCRIPTOR' : _CLUSTERRESOURCECONSTRAINT, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ClusterResourceConstraint) + }) +_sym_db.RegisterMessage(ClusterResourceConstraint) + +NodeState = _reflection.GeneratedProtocolMessageType('NodeState', (_message.Message,), { + + 'AvailableResourcesEntry' : _reflection.GeneratedProtocolMessageType('AvailableResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _NODESTATE_AVAILABLERESOURCESENTRY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.NodeState.AvailableResourcesEntry) + }) + , + + 'TotalResourcesEntry' : _reflection.GeneratedProtocolMessageType('TotalResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _NODESTATE_TOTALRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.NodeState.TotalResourcesEntry) + }) + , + + 'DynamicLabelsEntry' : _reflection.GeneratedProtocolMessageType('DynamicLabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _NODESTATE_DYNAMICLABELSENTRY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.NodeState.DynamicLabelsEntry) + }) + , + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _NODESTATE_LABELSENTRY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.NodeState.LabelsEntry) + }) + , + 'DESCRIPTOR' : _NODESTATE, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.NodeState) + }) +_sym_db.RegisterMessage(NodeState) +_sym_db.RegisterMessage(NodeState.AvailableResourcesEntry) +_sym_db.RegisterMessage(NodeState.TotalResourcesEntry) +_sym_db.RegisterMessage(NodeState.DynamicLabelsEntry) +_sym_db.RegisterMessage(NodeState.LabelsEntry) + +GetClusterResourceStateRequest = _reflection.GeneratedProtocolMessageType('GetClusterResourceStateRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETCLUSTERRESOURCESTATEREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.GetClusterResourceStateRequest) + }) +_sym_db.RegisterMessage(GetClusterResourceStateRequest) + +ClusterResourceState = _reflection.GeneratedProtocolMessageType('ClusterResourceState', (_message.Message,), { + 'DESCRIPTOR' : _CLUSTERRESOURCESTATE, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ClusterResourceState) + }) +_sym_db.RegisterMessage(ClusterResourceState) + +GetClusterResourceStateReply = _reflection.GeneratedProtocolMessageType('GetClusterResourceStateReply', (_message.Message,), { + 'DESCRIPTOR' : _GETCLUSTERRESOURCESTATEREPLY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.GetClusterResourceStateReply) + }) +_sym_db.RegisterMessage(GetClusterResourceStateReply) + +PendingInstanceRequest = _reflection.GeneratedProtocolMessageType('PendingInstanceRequest', (_message.Message,), { + 'DESCRIPTOR' : _PENDINGINSTANCEREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.PendingInstanceRequest) + }) +_sym_db.RegisterMessage(PendingInstanceRequest) + +FailedInstanceRequest = _reflection.GeneratedProtocolMessageType('FailedInstanceRequest', (_message.Message,), { + 'DESCRIPTOR' : _FAILEDINSTANCEREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.FailedInstanceRequest) + }) +_sym_db.RegisterMessage(FailedInstanceRequest) + +PendingInstance = _reflection.GeneratedProtocolMessageType('PendingInstance', (_message.Message,), { + 'DESCRIPTOR' : _PENDINGINSTANCE, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.PendingInstance) + }) +_sym_db.RegisterMessage(PendingInstance) + +AutoscalingState = _reflection.GeneratedProtocolMessageType('AutoscalingState', (_message.Message,), { + 'DESCRIPTOR' : _AUTOSCALINGSTATE, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.AutoscalingState) + }) +_sym_db.RegisterMessage(AutoscalingState) + +ReportAutoscalingStateRequest = _reflection.GeneratedProtocolMessageType('ReportAutoscalingStateRequest', (_message.Message,), { + 'DESCRIPTOR' : _REPORTAUTOSCALINGSTATEREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ReportAutoscalingStateRequest) + }) +_sym_db.RegisterMessage(ReportAutoscalingStateRequest) + +ReportAutoscalingStateReply = _reflection.GeneratedProtocolMessageType('ReportAutoscalingStateReply', (_message.Message,), { + 'DESCRIPTOR' : _REPORTAUTOSCALINGSTATEREPLY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ReportAutoscalingStateReply) + }) +_sym_db.RegisterMessage(ReportAutoscalingStateReply) + +RequestClusterResourceConstraintRequest = _reflection.GeneratedProtocolMessageType('RequestClusterResourceConstraintRequest', (_message.Message,), { + 'DESCRIPTOR' : _REQUESTCLUSTERRESOURCECONSTRAINTREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.RequestClusterResourceConstraintRequest) + }) +_sym_db.RegisterMessage(RequestClusterResourceConstraintRequest) + +RequestClusterResourceConstraintReply = _reflection.GeneratedProtocolMessageType('RequestClusterResourceConstraintReply', (_message.Message,), { + 'DESCRIPTOR' : _REQUESTCLUSTERRESOURCECONSTRAINTREPLY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.RequestClusterResourceConstraintReply) + }) +_sym_db.RegisterMessage(RequestClusterResourceConstraintReply) + +GetClusterStatusRequest = _reflection.GeneratedProtocolMessageType('GetClusterStatusRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETCLUSTERSTATUSREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.GetClusterStatusRequest) + }) +_sym_db.RegisterMessage(GetClusterStatusRequest) + +GetClusterStatusReply = _reflection.GeneratedProtocolMessageType('GetClusterStatusReply', (_message.Message,), { + 'DESCRIPTOR' : _GETCLUSTERSTATUSREPLY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.GetClusterStatusReply) + }) +_sym_db.RegisterMessage(GetClusterStatusReply) + +DrainNodeRequest = _reflection.GeneratedProtocolMessageType('DrainNodeRequest', (_message.Message,), { + 'DESCRIPTOR' : _DRAINNODEREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.DrainNodeRequest) + }) +_sym_db.RegisterMessage(DrainNodeRequest) + +DrainNodeReply = _reflection.GeneratedProtocolMessageType('DrainNodeReply', (_message.Message,), { + 'DESCRIPTOR' : _DRAINNODEREPLY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.DrainNodeReply) + }) +_sym_db.RegisterMessage(DrainNodeReply) + +NodeGroupConfig = _reflection.GeneratedProtocolMessageType('NodeGroupConfig', (_message.Message,), { + + 'ResourcesEntry' : _reflection.GeneratedProtocolMessageType('ResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _NODEGROUPCONFIG_RESOURCESENTRY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.NodeGroupConfig.ResourcesEntry) + }) + , + 'DESCRIPTOR' : _NODEGROUPCONFIG, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.NodeGroupConfig) + }) +_sym_db.RegisterMessage(NodeGroupConfig) +_sym_db.RegisterMessage(NodeGroupConfig.ResourcesEntry) + +ClusterConfig = _reflection.GeneratedProtocolMessageType('ClusterConfig', (_message.Message,), { + + 'MinResourcesEntry' : _reflection.GeneratedProtocolMessageType('MinResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _CLUSTERCONFIG_MINRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ClusterConfig.MinResourcesEntry) + }) + , + + 'MaxResourcesEntry' : _reflection.GeneratedProtocolMessageType('MaxResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _CLUSTERCONFIG_MAXRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ClusterConfig.MaxResourcesEntry) + }) + , + 'DESCRIPTOR' : _CLUSTERCONFIG, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ClusterConfig) + }) +_sym_db.RegisterMessage(ClusterConfig) +_sym_db.RegisterMessage(ClusterConfig.MinResourcesEntry) +_sym_db.RegisterMessage(ClusterConfig.MaxResourcesEntry) + +ReportClusterConfigRequest = _reflection.GeneratedProtocolMessageType('ReportClusterConfigRequest', (_message.Message,), { + 'DESCRIPTOR' : _REPORTCLUSTERCONFIGREQUEST, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ReportClusterConfigRequest) + }) +_sym_db.RegisterMessage(ReportClusterConfigRequest) + +ReportClusterConfigReply = _reflection.GeneratedProtocolMessageType('ReportClusterConfigReply', (_message.Message,), { + 'DESCRIPTOR' : _REPORTCLUSTERCONFIGREPLY, + '__module__' : 'src.ray.protobuf.autoscaler_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.ReportClusterConfigReply) + }) +_sym_db.RegisterMessage(ReportClusterConfigReply) + +_AUTOSCALERSTATESERVICE = DESCRIPTOR.services_by_name['AutoscalerStateService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _RESOURCEREQUEST_RESOURCESBUNDLEENTRY._options = None + _RESOURCEREQUEST_RESOURCESBUNDLEENTRY._serialized_options = b'8\001' + _NODESTATE_AVAILABLERESOURCESENTRY._options = None + _NODESTATE_AVAILABLERESOURCESENTRY._serialized_options = b'8\001' + _NODESTATE_TOTALRESOURCESENTRY._options = None + _NODESTATE_TOTALRESOURCESENTRY._serialized_options = b'8\001' + _NODESTATE_DYNAMICLABELSENTRY._options = None + _NODESTATE_DYNAMICLABELSENTRY._serialized_options = b'8\001' + _NODESTATE_LABELSENTRY._options = None + _NODESTATE_LABELSENTRY._serialized_options = b'8\001' + _NODEGROUPCONFIG_RESOURCESENTRY._options = None + _NODEGROUPCONFIG_RESOURCESENTRY._serialized_options = b'8\001' + _CLUSTERCONFIG_MINRESOURCESENTRY._options = None + _CLUSTERCONFIG_MINRESOURCESENTRY._serialized_options = b'8\001' + _CLUSTERCONFIG_MAXRESOURCESENTRY._options = None + _CLUSTERCONFIG_MAXRESOURCESENTRY._serialized_options = b'8\001' + _NODESTATUS._serialized_start=6273 + _NODESTATUS._serialized_end=6349 + _DRAINNODEREASON._serialized_start=6351 + _DRAINNODEREASON._serialized_end=6477 + _ANTIAFFINITYCONSTRAINT._serialized_start=88 + _ANTIAFFINITYCONSTRAINT._serialized_end=176 + _AFFINITYCONSTRAINT._serialized_start=178 + _AFFINITYCONSTRAINT._serialized_end=262 + _PLACEMENTCONSTRAINT._serialized_start=265 + _PLACEMENTCONSTRAINT._serialized_end=476 + _RESOURCEREQUEST._serialized_start=479 + _RESOURCEREQUEST._serialized_end=824 + _RESOURCEREQUEST_RESOURCESBUNDLEENTRY._serialized_start=758 + _RESOURCEREQUEST_RESOURCESBUNDLEENTRY._serialized_end=824 + _RESOURCEREQUESTBYCOUNT._serialized_start=826 + _RESOURCEREQUESTBYCOUNT._serialized_end=935 + _BUNDLESELECTOR._serialized_start=937 + _BUNDLESELECTOR._serialized_end=1035 + _GANGRESOURCEREQUEST._serialized_start=1038 + _GANGRESOURCEREQUEST._serialized_end=1229 + _CLUSTERRESOURCECONSTRAINT._serialized_start=1231 + _CLUSTERRESOURCECONSTRAINT._serialized_end=1347 + _NODESTATE._serialized_start=1350 + _NODESTATE._serialized_end=2346 + _NODESTATE_AVAILABLERESOURCESENTRY._serialized_start=2085 + _NODESTATE_AVAILABLERESOURCESENTRY._serialized_end=2154 + _NODESTATE_TOTALRESOURCESENTRY._serialized_start=2156 + _NODESTATE_TOTALRESOURCESENTRY._serialized_end=2221 + _NODESTATE_DYNAMICLABELSENTRY._serialized_start=2223 + _NODESTATE_DYNAMICLABELSENTRY._serialized_end=2287 + _NODESTATE_LABELSENTRY._serialized_start=2289 + _NODESTATE_LABELSENTRY._serialized_end=2346 + _GETCLUSTERRESOURCESTATEREQUEST._serialized_start=2348 + _GETCLUSTERRESOURCESTATEREQUEST._serialized_end=2467 + _CLUSTERRESOURCESTATE._serialized_start=2470 + _CLUSTERRESOURCESTATE._serialized_end=3078 + _GETCLUSTERRESOURCESTATEREPLY._serialized_start=3080 + _GETCLUSTERRESOURCESTATEREPLY._serialized_end=3206 + _PENDINGINSTANCEREQUEST._serialized_start=3209 + _PENDINGINSTANCEREQUEST._serialized_end=3377 + _FAILEDINSTANCEREQUEST._serialized_start=3380 + _FAILEDINSTANCEREQUEST._serialized_end=3596 + _PENDINGINSTANCE._serialized_start=3599 + _PENDINGINSTANCE._serialized_end=3797 + _AUTOSCALINGSTATE._serialized_start=3800 + _AUTOSCALINGSTATE._serialized_end=4604 + _REPORTAUTOSCALINGSTATEREQUEST._serialized_start=4606 + _REPORTAUTOSCALINGSTATEREQUEST._serialized_end=4720 + _REPORTAUTOSCALINGSTATEREPLY._serialized_start=4722 + _REPORTAUTOSCALINGSTATEREPLY._serialized_end=4751 + _REQUESTCLUSTERRESOURCECONSTRAINTREQUEST._serialized_start=4754 + _REQUESTCLUSTERRESOURCECONSTRAINTREQUEST._serialized_end=4906 + _REQUESTCLUSTERRESOURCECONSTRAINTREPLY._serialized_start=4908 + _REQUESTCLUSTERRESOURCECONSTRAINTREPLY._serialized_end=4947 + _GETCLUSTERSTATUSREQUEST._serialized_start=4949 + _GETCLUSTERSTATUSREQUEST._serialized_end=4974 + _GETCLUSTERSTATUSREPLY._serialized_start=4977 + _GETCLUSTERSTATUSREPLY._serialized_end=5179 + _DRAINNODEREQUEST._serialized_start=5182 + _DRAINNODEREQUEST._serialized_end=5377 + _DRAINNODEREPLY._serialized_start=5379 + _DRAINNODEREPLY._serialized_end=5486 + _NODEGROUPCONFIG._serialized_start=5489 + _NODEGROUPCONFIG._serialized_end=5728 + _NODEGROUPCONFIG_RESOURCESENTRY._serialized_start=5668 + _NODEGROUPCONFIG_RESOURCESENTRY._serialized_end=5728 + _CLUSTERCONFIG._serialized_start=5731 + _CLUSTERCONFIG._serialized_end=6139 + _CLUSTERCONFIG_MINRESOURCESENTRY._serialized_start=6011 + _CLUSTERCONFIG_MINRESOURCESENTRY._serialized_end=6074 + _CLUSTERCONFIG_MAXRESOURCESENTRY._serialized_start=6076 + _CLUSTERCONFIG_MAXRESOURCESENTRY._serialized_end=6139 + _REPORTCLUSTERCONFIGREQUEST._serialized_start=6141 + _REPORTCLUSTERCONFIGREQUEST._serialized_end=6243 + _REPORTCLUSTERCONFIGREPLY._serialized_start=6245 + _REPORTCLUSTERCONFIGREPLY._serialized_end=6271 + _AUTOSCALERSTATESERVICE._serialized_start=6480 + _AUTOSCALERSTATESERVICE._serialized_end=7228 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/autoscaler_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/autoscaler_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..60e23a686d0a25825fe89c77dc882c82af056d34 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/autoscaler_pb2_grpc.py @@ -0,0 +1,231 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import autoscaler_pb2 as src_dot_ray_dot_protobuf_dot_autoscaler__pb2 + + +class AutoscalerStateServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetClusterResourceState = channel.unary_unary( + '/ray.rpc.autoscaler.AutoscalerStateService/GetClusterResourceState', + request_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterResourceStateRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterResourceStateReply.FromString, + ) + self.ReportAutoscalingState = channel.unary_unary( + '/ray.rpc.autoscaler.AutoscalerStateService/ReportAutoscalingState', + request_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportAutoscalingStateRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportAutoscalingStateReply.FromString, + ) + self.ReportClusterConfig = channel.unary_unary( + '/ray.rpc.autoscaler.AutoscalerStateService/ReportClusterConfig', + request_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportClusterConfigRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportClusterConfigReply.FromString, + ) + self.RequestClusterResourceConstraint = channel.unary_unary( + '/ray.rpc.autoscaler.AutoscalerStateService/RequestClusterResourceConstraint', + request_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.RequestClusterResourceConstraintRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.RequestClusterResourceConstraintReply.FromString, + ) + self.GetClusterStatus = channel.unary_unary( + '/ray.rpc.autoscaler.AutoscalerStateService/GetClusterStatus', + request_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterStatusRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterStatusReply.FromString, + ) + self.DrainNode = channel.unary_unary( + '/ray.rpc.autoscaler.AutoscalerStateService/DrainNode', + request_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.DrainNodeRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.DrainNodeReply.FromString, + ) + + +class AutoscalerStateServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetClusterResourceState(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReportAutoscalingState(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReportClusterConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RequestClusterResourceConstraint(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetClusterStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DrainNode(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_AutoscalerStateServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetClusterResourceState': grpc.unary_unary_rpc_method_handler( + servicer.GetClusterResourceState, + request_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterResourceStateRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterResourceStateReply.SerializeToString, + ), + 'ReportAutoscalingState': grpc.unary_unary_rpc_method_handler( + servicer.ReportAutoscalingState, + request_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportAutoscalingStateRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportAutoscalingStateReply.SerializeToString, + ), + 'ReportClusterConfig': grpc.unary_unary_rpc_method_handler( + servicer.ReportClusterConfig, + request_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportClusterConfigRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportClusterConfigReply.SerializeToString, + ), + 'RequestClusterResourceConstraint': grpc.unary_unary_rpc_method_handler( + servicer.RequestClusterResourceConstraint, + request_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.RequestClusterResourceConstraintRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.RequestClusterResourceConstraintReply.SerializeToString, + ), + 'GetClusterStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetClusterStatus, + request_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterStatusRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterStatusReply.SerializeToString, + ), + 'DrainNode': grpc.unary_unary_rpc_method_handler( + servicer.DrainNode, + request_deserializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.DrainNodeRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_autoscaler__pb2.DrainNodeReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.autoscaler.AutoscalerStateService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class AutoscalerStateService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetClusterResourceState(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.autoscaler.AutoscalerStateService/GetClusterResourceState', + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterResourceStateRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterResourceStateReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReportAutoscalingState(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.autoscaler.AutoscalerStateService/ReportAutoscalingState', + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportAutoscalingStateRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportAutoscalingStateReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReportClusterConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.autoscaler.AutoscalerStateService/ReportClusterConfig', + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportClusterConfigRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.ReportClusterConfigReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RequestClusterResourceConstraint(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.autoscaler.AutoscalerStateService/RequestClusterResourceConstraint', + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.RequestClusterResourceConstraintRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.RequestClusterResourceConstraintReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetClusterStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.autoscaler.AutoscalerStateService/GetClusterStatus', + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterStatusRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.GetClusterStatusReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DrainNode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.autoscaler.AutoscalerStateService/DrainNode', + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.DrainNodeRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_autoscaler__pb2.DrainNodeReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/common_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/common_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..650496edd7521e4aeade69583f898a23a0de04d8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/common_pb2.py @@ -0,0 +1,887 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/common.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import runtime_env_common_pb2 as src_dot_ray_dot_protobuf_dot_runtime__env__common__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dsrc/ray/protobuf/common.proto\x12\x07ray.rpc\x1a)src/ray/protobuf/runtime_env_common.proto\"!\n\x07LabelIn\x12\x16\n\x06values\x18\x01 \x03(\tR\x06values\"$\n\nLabelNotIn\x12\x16\n\x06values\x18\x01 \x03(\tR\x06values\"\r\n\x0bLabelExists\"\x13\n\x11LabelDoesNotExist\"\x93\x02\n\rLabelOperator\x12-\n\x08label_in\x18\x01 \x01(\x0b\x32\x10.ray.rpc.LabelInH\x00R\x07labelIn\x12\x37\n\x0clabel_not_in\x18\x02 \x01(\x0b\x32\x13.ray.rpc.LabelNotInH\x00R\nlabelNotIn\x12\x39\n\x0clabel_exists\x18\x03 \x01(\x0b\x32\x14.ray.rpc.LabelExistsH\x00R\x0blabelExists\x12M\n\x14label_does_not_exist\x18\x04 \x01(\x0b\x32\x1a.ray.rpc.LabelDoesNotExistH\x00R\x11labelDoesNotExistB\x10\n\x0elabel_operator\"\\\n\x14LabelMatchExpression\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x32\n\x08operator\x18\x02 \x01(\x0b\x32\x16.ray.rpc.LabelOperatorR\x08operator\"X\n\x15LabelMatchExpressions\x12?\n\x0b\x65xpressions\x18\x01 \x03(\x0b\x32\x1d.ray.rpc.LabelMatchExpressionR\x0b\x65xpressions\"\x85\x01\n\x1bNodeLabelSchedulingStrategy\x12\x32\n\x04hard\x18\x01 \x01(\x0b\x32\x1e.ray.rpc.LabelMatchExpressionsR\x04hard\x12\x32\n\x04soft\x18\x02 \x01(\x0b\x32\x1e.ray.rpc.LabelMatchExpressionsR\x04soft\"\xaf\x01\n\x1eNodeAffinitySchedulingStrategy\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12\x12\n\x04soft\x18\x02 \x01(\x08R\x04soft\x12\x30\n\x14spill_on_unavailable\x18\x03 \x01(\x08R\x12spillOnUnavailable\x12.\n\x13\x66\x61il_on_unavailable\x18\x04 \x01(\x08R\x11\x66\x61ilOnUnavailable\"\xdf\x01\n PlacementGroupSchedulingStrategy\x12,\n\x12placement_group_id\x18\x01 \x01(\x0cR\x10placementGroupId\x12?\n\x1cplacement_group_bundle_index\x18\x02 \x01(\x03R\x19placementGroupBundleIndex\x12L\n#placement_group_capture_child_tasks\x18\x03 \x01(\x08R\x1fplacementGroupCaptureChildTasks\"\x1b\n\x19\x44\x65\x66\x61ultSchedulingStrategy\"\x1a\n\x18SpreadSchedulingStrategy\"\xd3\x04\n\x12SchedulingStrategy\x12\x64\n\x1b\x64\x65\x66\x61ult_scheduling_strategy\x18\x01 \x01(\x0b\x32\".ray.rpc.DefaultSchedulingStrategyH\x00R\x19\x64\x65\x66\x61ultSchedulingStrategy\x12z\n#placement_group_scheduling_strategy\x18\x02 \x01(\x0b\x32).ray.rpc.PlacementGroupSchedulingStrategyH\x00R placementGroupSchedulingStrategy\x12\x61\n\x1aspread_scheduling_strategy\x18\x03 \x01(\x0b\x32!.ray.rpc.SpreadSchedulingStrategyH\x00R\x18spreadSchedulingStrategy\x12t\n!node_affinity_scheduling_strategy\x18\x04 \x01(\x0b\x32\'.ray.rpc.NodeAffinitySchedulingStrategyH\x00R\x1enodeAffinitySchedulingStrategy\x12k\n\x1enode_label_scheduling_strategy\x18\x05 \x01(\x0b\x32$.ray.rpc.NodeLabelSchedulingStrategyH\x00R\x1bnodeLabelSchedulingStrategyB\x15\n\x13scheduling_strategy\"r\n\x07\x41\x64\x64ress\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12\x1d\n\nip_address\x18\x02 \x01(\tR\tipAddress\x12\x12\n\x04port\x18\x03 \x01(\x05R\x04port\x12\x1b\n\tworker_id\x18\x04 \x01(\x0cR\x08workerId\"z\n\x16JavaFunctionDescriptor\x12\x1d\n\nclass_name\x18\x01 \x01(\tR\tclassName\x12#\n\rfunction_name\x18\x02 \x01(\tR\x0c\x66unctionName\x12\x1c\n\tsignature\x18\x03 \x01(\tR\tsignature\"\xa4\x01\n\x18PythonFunctionDescriptor\x12\x1f\n\x0bmodule_name\x18\x01 \x01(\tR\nmoduleName\x12\x1d\n\nclass_name\x18\x02 \x01(\tR\tclassName\x12#\n\rfunction_name\x18\x03 \x01(\tR\x0c\x66unctionName\x12#\n\rfunction_hash\x18\x04 \x01(\tR\x0c\x66unctionHash\"s\n\x15\x43ppFunctionDescriptor\x12#\n\rfunction_name\x18\x01 \x01(\tR\x0c\x66unctionName\x12\x16\n\x06\x63\x61ller\x18\x02 \x01(\tR\x06\x63\x61ller\x12\x1d\n\nclass_name\x18\x03 \x01(\tR\tclassName\"\xc5\x02\n\x12\x46unctionDescriptor\x12[\n\x18java_function_descriptor\x18\x01 \x01(\x0b\x32\x1f.ray.rpc.JavaFunctionDescriptorH\x00R\x16javaFunctionDescriptor\x12\x61\n\x1apython_function_descriptor\x18\x02 \x01(\x0b\x32!.ray.rpc.PythonFunctionDescriptorH\x00R\x18pythonFunctionDescriptor\x12X\n\x17\x63pp_function_descriptor\x18\x03 \x01(\x0b\x32\x1e.ray.rpc.CppFunctionDescriptorH\x00R\x15\x63ppFunctionDescriptorB\x15\n\x13\x66unction_descriptor\"\x9f\x01\n\x10\x43oncurrencyGroup\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\'\n\x0fmax_concurrency\x18\x02 \x01(\x05R\x0emaxConcurrency\x12N\n\x14\x66unction_descriptors\x18\x03 \x03(\x0b\x32\x1b.ray.rpc.FunctionDescriptorR\x13\x66unctionDescriptors\"c\n\rUserErrorInfo\x12%\n\x0e\x65xception_name\x18\x01 \x01(\tR\rexceptionName\x12+\n\x11\x65xception_message\x18\x02 \x01(\tR\x10\x65xceptionMessage\"\xf9\x02\n\x0cRayErrorInfo\x12\x44\n\x10\x61\x63tor_died_error\x18\x02 \x01(\x0b\x32\x18.ray.rpc.ActorDeathCauseH\x00R\x0e\x61\x63torDiedError\x12\x66\n\x1eruntime_env_setup_failed_error\x18\x03 \x01(\x0b\x32 .ray.rpc.RuntimeEnvFailedContextH\x00R\x1aruntimeEnvSetupFailedError\x12Z\n\x17\x61\x63tor_unavailable_error\x18\x04 \x01(\x0b\x32 .ray.rpc.ActorUnavailableContextH\x00R\x15\x61\x63torUnavailableError\x12#\n\rerror_message\x18\x05 \x01(\tR\x0c\x65rrorMessage\x12\x31\n\nerror_type\x18\x0b \x01(\x0e\x32\x12.ray.rpc.ErrorTypeR\terrorTypeB\x07\n\x05\x65rror\"\xb0\x02\n\x17OutOfMemoryErrorContext\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\x12\x1b\n\ttask_name\x18\x02 \x01(\tR\x08taskName\x12&\n\x0fnode_ip_address\x18\x03 \x01(\tR\rnodeIpAddress\x12*\n\x11memory_used_bytes\x18\x04 \x01(\x04R\x0fmemoryUsedBytes\x12,\n\x12memory_total_bytes\x18\x05 \x01(\x04R\x10memoryTotalBytes\x12\x32\n\x15memory_usage_fraction\x18\x06 \x01(\x01R\x13memoryUsageFraction\x12)\n\x10memory_threshold\x18\x07 \x01(\x01R\x0fmemoryThreshold\"W\n\x14NodeDiedErrorContext\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12&\n\x0fnode_ip_address\x18\x02 \x01(\tR\rnodeIpAddress\"\xae\x01\n\x0cRayException\x12-\n\x08language\x18\x01 \x01(\x0e\x32\x11.ray.rpc.LanguageR\x08language\x12\x31\n\x14serialized_exception\x18\x02 \x01(\x0cR\x13serializedException\x12<\n\x1a\x66ormatted_exception_string\x18\x03 \x01(\tR\x18\x66ormattedExceptionString\"\xfa\x01\n\rNodeDeathInfo\x12\x35\n\x06reason\x18\x01 \x01(\x0e\x32\x1d.ray.rpc.NodeDeathInfo.ReasonR\x06reason\x12%\n\x0ereason_message\x18\x02 \x01(\tR\rreasonMessage\"\x8a\x01\n\x06Reason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x18\n\x14\x45XPECTED_TERMINATION\x10\x01\x12\x1a\n\x16UNEXPECTED_TERMINATION\x10\x02\x12\x1e\n\x1a\x41UTOSCALER_DRAIN_PREEMPTED\x10\x03\x12\x19\n\x15\x41UTOSCALER_DRAIN_IDLE\x10\x04\"\xd2\x03\n\x0f\x41\x63torDeathCause\x12Z\n\x1d\x63reation_task_failure_context\x18\x01 \x01(\x0b\x32\x15.ray.rpc.RayExceptionH\x00R\x1a\x63reationTaskFailureContext\x12_\n\x1aruntime_env_failed_context\x18\x02 \x01(\x0b\x32 .ray.rpc.RuntimeEnvFailedContextH\x00R\x17runtimeEnvFailedContext\x12Y\n\x18\x61\x63tor_died_error_context\x18\x03 \x01(\x0b\x32\x1e.ray.rpc.ActorDiedErrorContextH\x00R\x15\x61\x63torDiedErrorContext\x12\x64\n\x1b\x61\x63tor_unschedulable_context\x18\x04 \x01(\x0b\x32\".ray.rpc.ActorUnschedulableContextH\x00R\x19\x61\x63torUnschedulableContext\x12\x36\n\x0boom_context\x18\x05 \x01(\x0b\x32\x13.ray.rpc.OomContextH\x00R\noomContextB\t\n\x07\x63ontext\">\n\x17RuntimeEnvFailedContext\x12#\n\rerror_message\x18\x01 \x01(\tR\x0c\x65rrorMessage\"@\n\x19\x41\x63torUnschedulableContext\x12#\n\rerror_message\x18\x01 \x01(\tR\x0c\x65rrorMessage\"\xe7\x04\n\x15\x41\x63torDiedErrorContext\x12#\n\rerror_message\x18\x01 \x01(\tR\x0c\x65rrorMessage\x12\x19\n\x08owner_id\x18\x02 \x01(\x0cR\x07ownerId\x12(\n\x10owner_ip_address\x18\x03 \x01(\tR\x0eownerIpAddress\x12&\n\x0fnode_ip_address\x18\x04 \x01(\tR\rnodeIpAddress\x12\x10\n\x03pid\x18\x05 \x01(\rR\x03pid\x12\x12\n\x04name\x18\x06 \x01(\tR\x04name\x12#\n\rray_namespace\x18\x07 \x01(\tR\x0crayNamespace\x12\x1d\n\nclass_name\x18\x08 \x01(\tR\tclassName\x12\x19\n\x08\x61\x63tor_id\x18\t \x01(\x0cR\x07\x61\x63torId\x12#\n\rnever_started\x18\n \x01(\x08R\x0cneverStarted\x12\x43\n\x0fnode_death_info\x18\x0b \x01(\x0b\x32\x16.ray.rpc.NodeDeathInfoH\x00R\rnodeDeathInfo\x88\x01\x01\x12=\n\x06reason\x18\x0c \x01(\x0e\x32%.ray.rpc.ActorDiedErrorContext.ReasonR\x06reason\"z\n\x06Reason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0f\n\x0bWORKER_DIED\x10\x01\x12\x0e\n\nOWNER_DIED\x10\x02\x12\r\n\tNODE_DIED\x10\x03\x12\x0c\n\x08RAY_KILL\x10\x04\x12\x10\n\x0cOUT_OF_SCOPE\x10\x05\x12\x0f\n\x0bREF_DELETED\x10\x06\x42\x12\n\x10_node_death_info\"\\\n\nOomContext\x12#\n\rerror_message\x18\x01 \x01(\tR\x0c\x65rrorMessage\x12)\n\x10\x66\x61il_immediately\x18\x02 \x01(\x08R\x0f\x66\x61ilImmediately\"F\n\x17\x41\x63torUnavailableContext\x12\x1e\n\x08\x61\x63tor_id\x18\x01 \x01(\x0cH\x00R\x07\x61\x63torId\x88\x01\x01\x42\x0b\n\t_actor_id\"\xb0\x04\n\tJobConfig\x12\x1f\n\x0bjvm_options\x18\x02 \x03(\tR\njvmOptions\x12(\n\x10\x63ode_search_path\x18\x03 \x03(\tR\x0e\x63odeSearchPath\x12\x41\n\x10runtime_env_info\x18\x04 \x01(\x0b\x32\x17.ray.rpc.RuntimeEnvInfoR\x0eruntimeEnvInfo\x12#\n\rray_namespace\x18\x05 \x01(\tR\x0crayNamespace\x12<\n\x08metadata\x18\x06 \x03(\x0b\x32 .ray.rpc.JobConfig.MetadataEntryR\x08metadata\x12V\n\x16\x64\x65\x66\x61ult_actor_lifetime\x18\x07 \x01(\x0e\x32 .ray.rpc.JobConfig.ActorLifetimeR\x14\x64\x65\x66\x61ultActorLifetime\x12+\n\x12py_driver_sys_path\x18\x08 \x03(\tR\x0fpyDriverSysPath\x12?\n\x1cserialized_py_logging_config\x18\t \x01(\x0cR\x19serializedPyLoggingConfig\x1a;\n\rMetadataEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"/\n\rActorLifetime\x12\x0c\n\x08\x44\x45TACHED\x10\x00\x12\x10\n\x0cNON_DETACHED\x10\x01\"g\n\x1eStreamingGeneratorReturnIdInfo\x12\x1b\n\tobject_id\x18\x01 \x01(\x0cR\x08objectId\x12(\n\x10is_plasma_object\x18\x02 \x01(\x08R\x0eisPlasmaObject\"\xc1\x13\n\x08TaskSpec\x12%\n\x04type\x18\x01 \x01(\x0e\x32\x11.ray.rpc.TaskTypeR\x04type\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12-\n\x08language\x18\x03 \x01(\x0e\x32\x11.ray.rpc.LanguageR\x08language\x12L\n\x13\x66unction_descriptor\x18\x04 \x01(\x0b\x32\x1b.ray.rpc.FunctionDescriptorR\x12\x66unctionDescriptor\x12\x15\n\x06job_id\x18\x05 \x01(\x0cR\x05jobId\x12\x17\n\x07task_id\x18\x06 \x01(\x0cR\x06taskId\x12$\n\x0eparent_task_id\x18\x07 \x01(\x0cR\x0cparentTaskId\x12%\n\x0eparent_counter\x18\x08 \x01(\x04R\rparentCounter\x12\x1b\n\tcaller_id\x18\t \x01(\x0cR\x08\x63\x61llerId\x12\x37\n\x0e\x63\x61ller_address\x18\n \x01(\x0b\x32\x10.ray.rpc.AddressR\rcallerAddress\x12$\n\x04\x61rgs\x18\x0b \x03(\x0b\x32\x10.ray.rpc.TaskArgR\x04\x61rgs\x12\x1f\n\x0bnum_returns\x18\x0c \x01(\x04R\nnumReturns\x12W\n\x12required_resources\x18\r \x03(\x0b\x32(.ray.rpc.TaskSpec.RequiredResourcesEntryR\x11requiredResources\x12s\n\x1crequired_placement_resources\x18\x0e \x03(\x0b\x32\x31.ray.rpc.TaskSpec.RequiredPlacementResourcesEntryR\x1arequiredPlacementResources\x12W\n\x18\x61\x63tor_creation_task_spec\x18\x0f \x01(\x0b\x32\x1e.ray.rpc.ActorCreationTaskSpecR\x15\x61\x63torCreationTaskSpec\x12>\n\x0f\x61\x63tor_task_spec\x18\x10 \x01(\x0b\x32\x16.ray.rpc.ActorTaskSpecR\ractorTaskSpec\x12\x1f\n\x0bmax_retries\x18\x11 \x01(\x05R\nmaxRetries\x12/\n\x13\x64\x65\x62ugger_breakpoint\x18\x16 \x01(\x0cR\x12\x64\x65\x62uggerBreakpoint\x12\x41\n\x10runtime_env_info\x18\x17 \x01(\x0b\x32\x17.ray.rpc.RuntimeEnvInfoR\x0eruntimeEnvInfo\x12\x34\n\x16\x63oncurrency_group_name\x18\x18 \x01(\tR\x14\x63oncurrencyGroupName\x12)\n\x10retry_exceptions\x18\x19 \x01(\x08R\x0fretryExceptions\x12O\n$serialized_retry_exception_allowlist\x18\x1a \x01(\x0cR!serializedRetryExceptionAllowlist\x12\x14\n\x05\x64\x65pth\x18\x1b \x01(\x03R\x05\x64\x65pth\x12L\n\x13scheduling_strategy\x18\x1c \x01(\x0b\x32\x1b.ray.rpc.SchedulingStrategyR\x12schedulingStrategy\x12%\n\x0e\x61ttempt_number\x18\x1d \x01(\x04R\rattemptNumber\x12\'\n\x0freturns_dynamic\x18\x1e \x01(\x08R\x0ereturnsDynamic\x12,\n\x12\x64ynamic_return_ids\x18\x1f \x03(\x0cR\x10\x64ynamicReturnIds\x12\x36\n\njob_config\x18 \x01(\x0b\x32\x12.ray.rpc.JobConfigH\x00R\tjobConfig\x88\x01\x01\x12*\n\x11submitter_task_id\x18! \x01(\x0cR\x0fsubmitterTaskId\x12/\n\x13streaming_generator\x18\" \x01(\x08R\x12streamingGenerator\x12K\n\"dependency_resolution_timestamp_ms\x18# \x01(\x03R\x1f\x64\x65pendencyResolutionTimestampMs\x12\x37\n\x18lease_grant_timestamp_ms\x18$ \x01(\x03R\x15leaseGrantTimestampMs\x12J\n\x1fnum_streaming_generator_returns\x18% \x01(\x04H\x01R\x1cnumStreamingGeneratorReturns\x88\x01\x01\x12K\n\"generator_backpressure_num_objects\x18& \x01(\x03R\x1fgeneratorBackpressureNumObjects\x12,\n\x12\x65nable_task_events\x18\' \x01(\x08R\x10\x65nableTaskEvents\x12\x33\n\x16root_detached_actor_id\x18( \x01(\x0cR\x13rootDetachedActorId\x12\x35\n\x06labels\x18) \x03(\x0b\x32\x1d.ray.rpc.TaskSpec.LabelsEntryR\x06labels\x12 \n\tcall_site\x18* \x01(\tH\x02R\x08\x63\x61llSite\x88\x01\x01\x12K\n\x0elabel_selector\x18+ \x03(\x0b\x32$.ray.rpc.TaskSpec.LabelSelectorEntryR\rlabelSelector\x12\x43\n\x10tensor_transport\x18, \x01(\x0e\x32\x18.ray.rpc.TensorTransportR\x0ftensorTransport\x1a\x44\n\x16RequiredResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1aM\n\x1fRequiredPlacementResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a@\n\x12LabelSelectorEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\r\n\x0b_job_configB\"\n _num_streaming_generator_returnsB\x0c\n\n_call_site\"\x88\x07\n\rTaskInfoEntry\x12%\n\x04type\x18\x01 \x01(\x0e\x32\x11.ray.rpc.TaskTypeR\x04type\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12-\n\x08language\x18\x03 \x01(\x0e\x32\x11.ray.rpc.LanguageR\x08language\x12+\n\x12\x66unc_or_class_name\x18\x04 \x01(\tR\x0f\x66uncOrClassName\x12>\n\x10scheduling_state\x18\x05 \x01(\x0e\x32\x13.ray.rpc.TaskStatusR\x0fschedulingState\x12\x15\n\x06job_id\x18\x06 \x01(\x0cR\x05jobId\x12\x17\n\x07task_id\x18\x07 \x01(\x0cR\x06taskId\x12$\n\x0eparent_task_id\x18\x08 \x01(\x0cR\x0cparentTaskId\x12\\\n\x12required_resources\x18\r \x03(\x0b\x32-.ray.rpc.TaskInfoEntry.RequiredResourcesEntryR\x11requiredResources\x12\x41\n\x10runtime_env_info\x18\x17 \x01(\x0b\x32\x17.ray.rpc.RuntimeEnvInfoR\x0eruntimeEnvInfo\x12\x1c\n\x07node_id\x18\x18 \x01(\x0cH\x00R\x06nodeId\x88\x01\x01\x12\x1e\n\x08\x61\x63tor_id\x18\x19 \x01(\x0cH\x01R\x07\x61\x63torId\x88\x01\x01\x12\x31\n\x12placement_group_id\x18\x1a \x01(\x0cH\x02R\x10placementGroupId\x88\x01\x01\x12 \n\tcall_site\x18\x1b \x01(\tH\x03R\x08\x63\x61llSite\x88\x01\x01\x12P\n\x0elabel_selector\x18\x1c \x03(\x0b\x32).ray.rpc.TaskInfoEntry.LabelSelectorEntryR\rlabelSelector\x1a\x44\n\x16RequiredResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a@\n\x12LabelSelectorEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\n\n\x08_node_idB\x0b\n\t_actor_idB\x15\n\x13_placement_group_idB\x0c\n\n_call_site\"M\n\x0bTaskAttempt\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\x12%\n\x0e\x61ttempt_number\x18\x02 \x01(\x05R\rattemptNumber\"\xdf\x03\n\x06\x42undle\x12=\n\tbundle_id\x18\x01 \x01(\x0b\x32 .ray.rpc.Bundle.BundleIdentifierR\x08\x62undleId\x12I\n\x0eunit_resources\x18\x02 \x03(\x0b\x32\".ray.rpc.Bundle.UnitResourcesEntryR\runitResources\x12\x17\n\x07node_id\x18\x03 \x01(\x0cR\x06nodeId\x12I\n\x0elabel_selector\x18\x04 \x03(\x0b\x32\".ray.rpc.Bundle.LabelSelectorEntryR\rlabelSelector\x1a\x63\n\x10\x42undleIdentifier\x12,\n\x12placement_group_id\x18\x01 \x01(\x0cR\x10placementGroupId\x12!\n\x0c\x62undle_index\x18\x02 \x01(\x05R\x0b\x62undleIndex\x1a@\n\x12UnitResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a@\n\x12LabelSelectorEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xeb\x03\n\x12PlacementGroupSpec\x12,\n\x12placement_group_id\x18\x01 \x01(\x0cR\x10placementGroupId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12)\n\x07\x62undles\x18\x03 \x03(\x0b\x32\x0f.ray.rpc.BundleR\x07\x62undles\x12\x36\n\x08strategy\x18\x04 \x01(\x0e\x32\x1a.ray.rpc.PlacementStrategyR\x08strategy\x12$\n\x0e\x63reator_job_id\x18\x05 \x01(\x0cR\x0c\x63reatorJobId\x12(\n\x10\x63reator_actor_id\x18\x06 \x01(\x0cR\x0e\x63reatorActorId\x12(\n\x10\x63reator_job_dead\x18\x07 \x01(\x08R\x0e\x63reatorJobDead\x12,\n\x12\x63reator_actor_dead\x18\x08 \x01(\x08R\x10\x63reatorActorDead\x12\x1f\n\x0bis_detached\x18\t \x01(\x08R\nisDetached\x12\x38\n\x19max_cpu_fraction_per_node\x18\n \x01(\x01R\x15maxCpuFractionPerNode\x12-\n\x13soft_target_node_id\x18\x0b \x01(\x0cR\x10softTargetNodeId\"\x82\x01\n\x0fObjectReference\x12\x1b\n\tobject_id\x18\x01 \x01(\x0cR\x08objectId\x12\x35\n\rowner_address\x18\x02 \x01(\x0b\x32\x10.ray.rpc.AddressR\x0cownerAddress\x12\x1b\n\tcall_site\x18\x03 \x01(\tR\x08\x63\x61llSite\"\xbf\x02\n\x14ObjectReferenceCount\x12\x36\n\treference\x18\x01 \x01(\x0b\x32\x18.ray.rpc.ObjectReferenceR\treference\x12\"\n\rhas_local_ref\x18\x02 \x01(\x08R\x0bhasLocalRef\x12.\n\tborrowers\x18\x03 \x03(\x0b\x32\x10.ray.rpc.AddressR\tborrowers\x12\x44\n\x11stored_in_objects\x18\x04 \x03(\x0b\x32\x18.ray.rpc.ObjectReferenceR\x0fstoredInObjects\x12\x39\n\x19\x63ontained_in_borrowed_ids\x18\x05 \x03(\x0cR\x16\x63ontainedInBorrowedIds\x12\x1a\n\x08\x63ontains\x18\x06 \x03(\x0cR\x08\x63ontains\"\xba\x02\n\x07TaskArg\x12\x37\n\nobject_ref\x18\x01 \x01(\x0b\x32\x18.ray.rpc.ObjectReferenceR\tobjectRef\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\x0cR\x04\x64\x61ta\x12\x1a\n\x08metadata\x18\x03 \x01(\x0cR\x08metadata\x12H\n\x13nested_inlined_refs\x18\x04 \x03(\x0b\x32\x18.ray.rpc.ObjectReferenceR\x11nestedInlinedRefs\x12\x1d\n\nis_inlined\x18\x05 \x01(\x08R\tisInlined\x12H\n\x10tensor_transport\x18\x06 \x01(\x0e\x32\x18.ray.rpc.TensorTransportH\x00R\x0ftensorTransport\x88\x01\x01\x42\x13\n\x11_tensor_transport\"\xd6\x01\n\x0cReturnObject\x12\x1b\n\tobject_id\x18\x01 \x01(\x0cR\x08objectId\x12\x1b\n\tin_plasma\x18\x02 \x01(\x08R\x08inPlasma\x12\x12\n\x04\x64\x61ta\x18\x03 \x01(\x0cR\x04\x64\x61ta\x12\x1a\n\x08metadata\x18\x04 \x01(\x0cR\x08metadata\x12H\n\x13nested_inlined_refs\x18\x05 \x03(\x0b\x32\x18.ray.rpc.ObjectReferenceR\x11nestedInlinedRefs\x12\x12\n\x04size\x18\x06 \x01(\x03R\x04size\"\xf7\x04\n\x15\x41\x63torCreationTaskSpec\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\x0cR\x07\x61\x63torId\x12,\n\x12max_actor_restarts\x18\x03 \x01(\x03R\x10maxActorRestarts\x12(\n\x10max_task_retries\x18\x04 \x01(\x03R\x0emaxTaskRetries\x12\x34\n\x16\x64ynamic_worker_options\x18\x05 \x03(\tR\x14\x64ynamicWorkerOptions\x12\'\n\x0fmax_concurrency\x18\x06 \x01(\x05R\x0emaxConcurrency\x12\x1f\n\x0bis_detached\x18\x07 \x01(\x08R\nisDetached\x12\x12\n\x04name\x18\x08 \x01(\tR\x04name\x12#\n\rray_namespace\x18\t \x01(\tR\x0crayNamespace\x12\x1d\n\nis_asyncio\x18\n \x01(\x08R\tisAsyncio\x12%\n\x0e\x65xtension_data\x18\x0b \x01(\tR\rextensionData\x12\x36\n\x17serialized_actor_handle\x18\x0c \x01(\x0cR\x15serializedActorHandle\x12H\n\x12\x63oncurrency_groups\x18\r \x03(\x0b\x32\x19.ray.rpc.ConcurrencyGroupR\x11\x63oncurrencyGroups\x12>\n\x1c\x61llow_out_of_order_execution\x18\x0e \x01(\x08R\x18\x61llowOutOfOrderExecution\x12*\n\x11max_pending_calls\x18\x0f \x01(\x05R\x0fmaxPendingCalls\"\x97\x01\n\rActorTaskSpec\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\x0cR\x07\x61\x63torId\x12\x42\n\x1e\x61\x63tor_creation_dummy_object_id\x18\x04 \x01(\x0cR\x1a\x61\x63torCreationDummyObjectId\x12\'\n\x0fsequence_number\x18\x05 \x01(\x04R\x0esequenceNumber\"6\n\x04Task\x12.\n\ttask_spec\x18\x01 \x01(\x0b\x32\x11.ray.rpc.TaskSpecR\x08taskSpec\">\n\nResourceId\x12\x14\n\x05index\x18\x01 \x01(\x03R\x05index\x12\x1a\n\x08quantity\x18\x02 \x01(\x01R\x08quantity\"^\n\x10ResourceMapEntry\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x36\n\x0cresource_ids\x18\x02 \x03(\x0b\x32\x13.ray.rpc.ResourceIdR\x0bresourceIds\"\xf4\x03\n\x08ViewData\x12\x1b\n\tview_name\x18\x01 \x01(\tR\x08viewName\x12\x35\n\x08measures\x18\x02 \x03(\x0b\x32\x19.ray.rpc.ViewData.MeasureR\x08measures\x1a\x93\x03\n\x07Measure\x12\x12\n\x04tags\x18\x01 \x01(\tR\x04tags\x12\x1b\n\tint_value\x18\x02 \x01(\x03R\x08intValue\x12!\n\x0c\x64ouble_value\x18\x03 \x01(\x01R\x0b\x64oubleValue\x12)\n\x10\x64istribution_min\x18\x04 \x01(\x01R\x0f\x64istributionMin\x12+\n\x11\x64istribution_mean\x18\x05 \x01(\x01R\x10\x64istributionMean\x12)\n\x10\x64istribution_max\x18\x06 \x01(\x01R\x0f\x64istributionMax\x12-\n\x12\x64istribution_count\x18\x07 \x01(\x01R\x11\x64istributionCount\x12\x44\n\x1e\x64istribution_bucket_boundaries\x18\x08 \x03(\x01R\x1c\x64istributionBucketBoundaries\x12<\n\x1a\x64istribution_bucket_counts\x18\t \x03(\x01R\x18\x64istributionBucketCounts\"\x80\x03\n\rObjectRefInfo\x12\x1b\n\tobject_id\x18\x01 \x01(\x0cR\x08objectId\x12\x1b\n\tcall_site\x18\x02 \x01(\tR\x08\x63\x61llSite\x12\x1f\n\x0bobject_size\x18\x03 \x01(\x03R\nobjectSize\x12&\n\x0flocal_ref_count\x18\x04 \x01(\x03R\rlocalRefCount\x12\x37\n\x18submitted_task_ref_count\x18\x05 \x01(\x03R\x15submittedTaskRefCount\x12,\n\x12\x63ontained_in_owned\x18\x06 \x03(\x0cR\x10\x63ontainedInOwned\x12(\n\x10pinned_in_memory\x18\x07 \x01(\x08R\x0epinnedInMemory\x12\x34\n\x0btask_status\x18\x08 \x01(\x0e\x32\x13.ray.rpc.TaskStatusR\ntaskStatus\x12%\n\x0e\x61ttempt_number\x18\t \x01(\x04R\rattemptNumber\"\xab\x01\n\x13ResourceAllocations\x12P\n\x0eresource_slots\x18\x01 \x03(\x0b\x32).ray.rpc.ResourceAllocations.ResourceSlotR\rresourceSlots\x1a\x42\n\x0cResourceSlot\x12\x12\n\x04slot\x18\x01 \x01(\x03R\x04slot\x12\x1e\n\nallocation\x18\x02 \x01(\x01R\nallocation\"\x9e\t\n\x0f\x43oreWorkerStats\x12*\n\x11num_pending_tasks\x18\x02 \x01(\x05R\x0fnumPendingTasks\x12\x36\n\x18num_object_refs_in_scope\x18\x03 \x01(\x05R\x14numObjectRefsInScope\x12\x1d\n\nip_address\x18\x07 \x01(\tR\tipAddress\x12\x12\n\x04port\x18\x08 \x01(\x03R\x04port\x12\x19\n\x08\x61\x63tor_id\x18\t \x01(\x0cR\x07\x61\x63torId\x12R\n\x0eused_resources\x18\n \x03(\x0b\x32+.ray.rpc.CoreWorkerStats.UsedResourcesEntryR\rusedResources\x12O\n\rwebui_display\x18\x0b \x03(\x0b\x32*.ray.rpc.CoreWorkerStats.WebuiDisplayEntryR\x0cwebuiDisplay\x12\"\n\rnum_in_plasma\x18\x0c \x01(\x05R\x0bnumInPlasma\x12*\n\x11num_local_objects\x18\r \x01(\x05R\x0fnumLocalObjects\x12\x37\n\x18used_object_store_memory\x18\x0e \x01(\x03R\x15usedObjectStoreMemory\x12*\n\x11task_queue_length\x18\x0f \x01(\x05R\x0ftaskQueueLength\x12,\n\x12num_executed_tasks\x18\x10 \x01(\x05R\x10numExecutedTasks\x12\x1f\n\x0b\x61\x63tor_title\x18\x11 \x01(\tR\nactorTitle\x12\x37\n\x0bobject_refs\x18\x12 \x03(\x0b\x32\x16.ray.rpc.ObjectRefInfoR\nobjectRefs\x12\x15\n\x06job_id\x18\x13 \x01(\x0cR\x05jobId\x12\x1b\n\tworker_id\x18\x14 \x01(\x0cR\x08workerId\x12-\n\x08language\x18\x15 \x01(\x0e\x32\x11.ray.rpc.LanguageR\x08language\x12\x10\n\x03pid\x18\x16 \x01(\rR\x03pid\x12\x34\n\x0bworker_type\x18\x17 \x01(\x0e\x32\x13.ray.rpc.WorkerTypeR\nworkerType\x12#\n\robjects_total\x18\x18 \x01(\x03R\x0cobjectsTotal\x12*\n\x11num_owned_objects\x18\x19 \x01(\x03R\x0fnumOwnedObjects\x12(\n\x10num_owned_actors\x18\x1a \x01(\x03R\x0enumOwnedActors\x12*\n\x11num_running_tasks\x18\x1b \x01(\x03R\x0fnumRunningTasks\x1a^\n\x12UsedResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x32\n\x05value\x18\x02 \x01(\x0b\x32\x1c.ray.rpc.ResourceAllocationsR\x05value:\x02\x38\x01\x1a?\n\x11WebuiDisplayEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01J\x04\x08\x01\x10\x02\"\'\n\x11NodeResourceUsage\x12\x12\n\x04json\x18\x01 \x01(\tR\x04json\"\x95\x01\n\x17LabelSelectorConstraint\x12\x1b\n\tlabel_key\x18\x01 \x01(\tR\x08labelKey\x12:\n\x08operator\x18\x02 \x01(\x0e\x32\x1e.ray.rpc.LabelSelectorOperatorR\x08operator\x12!\n\x0clabel_values\x18\x03 \x03(\tR\x0blabelValues\"^\n\rLabelSelector\x12M\n\x11label_constraints\x18\x01 \x03(\x0b\x32 .ray.rpc.LabelSelectorConstraintR\x10labelConstraints\"I\n\x0eNamedActorInfo\x12#\n\rray_namespace\x18\x01 \x01(\tR\x0crayNamespace\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"\xdf\x01\n\x19LineageReconstructionTask\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12+\n\x06status\x18\x02 \x01(\x0e\x32\x13.ray.rpc.TaskStatusR\x06status\x12\x46\n\x06labels\x18\x03 \x03(\x0b\x32..ray.rpc.LineageReconstructionTask.LabelsEntryR\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01*)\n\x08Language\x12\n\n\x06PYTHON\x10\x00\x12\x08\n\x04JAVA\x10\x01\x12\x07\n\x03\x43PP\x10\x02*J\n\nWorkerType\x12\n\n\x06WORKER\x10\x00\x12\n\n\x06\x44RIVER\x10\x01\x12\x10\n\x0cSPILL_WORKER\x10\x02\x12\x12\n\x0eRESTORE_WORKER\x10\x03*U\n\x08TaskType\x12\x0f\n\x0bNORMAL_TASK\x10\x00\x12\x17\n\x13\x41\x43TOR_CREATION_TASK\x10\x01\x12\x0e\n\nACTOR_TASK\x10\x02\x12\x0f\n\x0b\x44RIVER_TASK\x10\x03*\xf0\x05\n\tErrorType\x12\x0f\n\x0bWORKER_DIED\x10\x00\x12\x0e\n\nACTOR_DIED\x10\x01\x12\x1c\n\x18OBJECT_UNRECONSTRUCTABLE\x10\x02\x12\x1c\n\x18TASK_EXECUTION_EXCEPTION\x10\x03\x12\x14\n\x10OBJECT_IN_PLASMA\x10\x04\x12\x12\n\x0eTASK_CANCELLED\x10\x05\x12\x19\n\x15\x41\x43TOR_CREATION_FAILED\x10\x06\x12\x1c\n\x18RUNTIME_ENV_SETUP_FAILED\x10\x07\x12\x0f\n\x0bOBJECT_LOST\x10\x08\x12\x0e\n\nOWNER_DIED\x10\t\x12\x12\n\x0eOBJECT_DELETED\x10\n\x12 \n\x1c\x44\x45PENDENCY_RESOLUTION_FAILED\x10\x0b\x12\x32\n.OBJECT_UNRECONSTRUCTABLE_MAX_ATTEMPTS_EXCEEDED\x10\x0c\x12,\n(OBJECT_UNRECONSTRUCTABLE_LINEAGE_EVICTED\x10\r\x12\x1a\n\x16OBJECT_FETCH_TIMED_OUT\x10\x0e\x12\x15\n\x11LOCAL_RAYLET_DIED\x10\x0f\x12 \n\x1cTASK_PLACEMENT_GROUP_REMOVED\x10\x10\x12!\n\x1d\x41\x43TOR_PLACEMENT_GROUP_REMOVED\x10\x11\x12\x1c\n\x18TASK_UNSCHEDULABLE_ERROR\x10\x12\x12\x1d\n\x19\x41\x43TOR_UNSCHEDULABLE_ERROR\x10\x13\x12\x15\n\x11OUT_OF_DISK_ERROR\x10\x14\x12\x10\n\x0cOBJECT_FREED\x10\x15\x12\x11\n\rOUT_OF_MEMORY\x10\x16\x12\r\n\tNODE_DIED\x10\x17\x12\x1e\n\x1a\x45ND_OF_STREAMING_GENERATOR\x10\x18\x12\x15\n\x11\x41\x43TOR_UNAVAILABLE\x10\x19\x12\x33\n/GENERATOR_TASK_FAILED_FOR_OBJECT_RECONSTRUCTION\x10\x1a*7\n\x0fTensorTransport\x12\x10\n\x0cOBJECT_STORE\x10\x00\x12\x08\n\x04NCCL\x10\x01\x12\x08\n\x04GLOO\x10\x02*\xc7\x02\n\nTaskStatus\x12\x07\n\x03NIL\x10\x00\x12\x16\n\x12PENDING_ARGS_AVAIL\x10\x01\x12\x1b\n\x17PENDING_NODE_ASSIGNMENT\x10\x02\x12\x1f\n\x1bPENDING_OBJ_STORE_MEM_AVAIL\x10\x03\x12\x16\n\x12PENDING_ARGS_FETCH\x10\x04\x12\x17\n\x13SUBMITTED_TO_WORKER\x10\x05\x12!\n\x1dPENDING_ACTOR_TASK_ARGS_FETCH\x10\x06\x12.\n*PENDING_ACTOR_TASK_ORDERING_OR_CONCURRENCY\x10\x07\x12\x0b\n\x07RUNNING\x10\x08\x12\x16\n\x12RUNNING_IN_RAY_GET\x10\t\x12\x17\n\x13RUNNING_IN_RAY_WAIT\x10\n\x12\x0c\n\x08\x46INISHED\x10\x0b\x12\n\n\x06\x46\x41ILED\x10\x0c*|\n\x0eWorkerExitType\x12\x10\n\x0cSYSTEM_ERROR\x10\x00\x12\x18\n\x14INTENDED_SYSTEM_EXIT\x10\x01\x12\x0e\n\nUSER_ERROR\x10\x02\x12\x16\n\x12INTENDED_USER_EXIT\x10\x03\x12\x16\n\x12NODE_OUT_OF_MEMORY\x10\x04*M\n\x11PlacementStrategy\x12\x08\n\x04PACK\x10\x00\x12\n\n\x06SPREAD\x10\x01\x12\x0f\n\x0bSTRICT_PACK\x10\x02\x12\x11\n\rSTRICT_SPREAD\x10\x03*i\n\x15LabelSelectorOperator\x12\x1e\n\x1aLABEL_OPERATOR_UNSPECIFIED\x10\x00\x12\x15\n\x11LABEL_OPERATOR_IN\x10\x01\x12\x19\n\x15LABEL_OPERATOR_NOT_IN\x10\x02\x42\x1a\n\x18io.ray.runtime.generatedb\x06proto3') + +_LANGUAGE = DESCRIPTOR.enum_types_by_name['Language'] +Language = enum_type_wrapper.EnumTypeWrapper(_LANGUAGE) +_WORKERTYPE = DESCRIPTOR.enum_types_by_name['WorkerType'] +WorkerType = enum_type_wrapper.EnumTypeWrapper(_WORKERTYPE) +_TASKTYPE = DESCRIPTOR.enum_types_by_name['TaskType'] +TaskType = enum_type_wrapper.EnumTypeWrapper(_TASKTYPE) +_ERRORTYPE = DESCRIPTOR.enum_types_by_name['ErrorType'] +ErrorType = enum_type_wrapper.EnumTypeWrapper(_ERRORTYPE) +_TENSORTRANSPORT = DESCRIPTOR.enum_types_by_name['TensorTransport'] +TensorTransport = enum_type_wrapper.EnumTypeWrapper(_TENSORTRANSPORT) +_TASKSTATUS = DESCRIPTOR.enum_types_by_name['TaskStatus'] +TaskStatus = enum_type_wrapper.EnumTypeWrapper(_TASKSTATUS) +_WORKEREXITTYPE = DESCRIPTOR.enum_types_by_name['WorkerExitType'] +WorkerExitType = enum_type_wrapper.EnumTypeWrapper(_WORKEREXITTYPE) +_PLACEMENTSTRATEGY = DESCRIPTOR.enum_types_by_name['PlacementStrategy'] +PlacementStrategy = enum_type_wrapper.EnumTypeWrapper(_PLACEMENTSTRATEGY) +_LABELSELECTOROPERATOR = DESCRIPTOR.enum_types_by_name['LabelSelectorOperator'] +LabelSelectorOperator = enum_type_wrapper.EnumTypeWrapper(_LABELSELECTOROPERATOR) +PYTHON = 0 +JAVA = 1 +CPP = 2 +WORKER = 0 +DRIVER = 1 +SPILL_WORKER = 2 +RESTORE_WORKER = 3 +NORMAL_TASK = 0 +ACTOR_CREATION_TASK = 1 +ACTOR_TASK = 2 +DRIVER_TASK = 3 +WORKER_DIED = 0 +ACTOR_DIED = 1 +OBJECT_UNRECONSTRUCTABLE = 2 +TASK_EXECUTION_EXCEPTION = 3 +OBJECT_IN_PLASMA = 4 +TASK_CANCELLED = 5 +ACTOR_CREATION_FAILED = 6 +RUNTIME_ENV_SETUP_FAILED = 7 +OBJECT_LOST = 8 +OWNER_DIED = 9 +OBJECT_DELETED = 10 +DEPENDENCY_RESOLUTION_FAILED = 11 +OBJECT_UNRECONSTRUCTABLE_MAX_ATTEMPTS_EXCEEDED = 12 +OBJECT_UNRECONSTRUCTABLE_LINEAGE_EVICTED = 13 +OBJECT_FETCH_TIMED_OUT = 14 +LOCAL_RAYLET_DIED = 15 +TASK_PLACEMENT_GROUP_REMOVED = 16 +ACTOR_PLACEMENT_GROUP_REMOVED = 17 +TASK_UNSCHEDULABLE_ERROR = 18 +ACTOR_UNSCHEDULABLE_ERROR = 19 +OUT_OF_DISK_ERROR = 20 +OBJECT_FREED = 21 +OUT_OF_MEMORY = 22 +NODE_DIED = 23 +END_OF_STREAMING_GENERATOR = 24 +ACTOR_UNAVAILABLE = 25 +GENERATOR_TASK_FAILED_FOR_OBJECT_RECONSTRUCTION = 26 +OBJECT_STORE = 0 +NCCL = 1 +GLOO = 2 +NIL = 0 +PENDING_ARGS_AVAIL = 1 +PENDING_NODE_ASSIGNMENT = 2 +PENDING_OBJ_STORE_MEM_AVAIL = 3 +PENDING_ARGS_FETCH = 4 +SUBMITTED_TO_WORKER = 5 +PENDING_ACTOR_TASK_ARGS_FETCH = 6 +PENDING_ACTOR_TASK_ORDERING_OR_CONCURRENCY = 7 +RUNNING = 8 +RUNNING_IN_RAY_GET = 9 +RUNNING_IN_RAY_WAIT = 10 +FINISHED = 11 +FAILED = 12 +SYSTEM_ERROR = 0 +INTENDED_SYSTEM_EXIT = 1 +USER_ERROR = 2 +INTENDED_USER_EXIT = 3 +NODE_OUT_OF_MEMORY = 4 +PACK = 0 +SPREAD = 1 +STRICT_PACK = 2 +STRICT_SPREAD = 3 +LABEL_OPERATOR_UNSPECIFIED = 0 +LABEL_OPERATOR_IN = 1 +LABEL_OPERATOR_NOT_IN = 2 + + +_LABELIN = DESCRIPTOR.message_types_by_name['LabelIn'] +_LABELNOTIN = DESCRIPTOR.message_types_by_name['LabelNotIn'] +_LABELEXISTS = DESCRIPTOR.message_types_by_name['LabelExists'] +_LABELDOESNOTEXIST = DESCRIPTOR.message_types_by_name['LabelDoesNotExist'] +_LABELOPERATOR = DESCRIPTOR.message_types_by_name['LabelOperator'] +_LABELMATCHEXPRESSION = DESCRIPTOR.message_types_by_name['LabelMatchExpression'] +_LABELMATCHEXPRESSIONS = DESCRIPTOR.message_types_by_name['LabelMatchExpressions'] +_NODELABELSCHEDULINGSTRATEGY = DESCRIPTOR.message_types_by_name['NodeLabelSchedulingStrategy'] +_NODEAFFINITYSCHEDULINGSTRATEGY = DESCRIPTOR.message_types_by_name['NodeAffinitySchedulingStrategy'] +_PLACEMENTGROUPSCHEDULINGSTRATEGY = DESCRIPTOR.message_types_by_name['PlacementGroupSchedulingStrategy'] +_DEFAULTSCHEDULINGSTRATEGY = DESCRIPTOR.message_types_by_name['DefaultSchedulingStrategy'] +_SPREADSCHEDULINGSTRATEGY = DESCRIPTOR.message_types_by_name['SpreadSchedulingStrategy'] +_SCHEDULINGSTRATEGY = DESCRIPTOR.message_types_by_name['SchedulingStrategy'] +_ADDRESS = DESCRIPTOR.message_types_by_name['Address'] +_JAVAFUNCTIONDESCRIPTOR = DESCRIPTOR.message_types_by_name['JavaFunctionDescriptor'] +_PYTHONFUNCTIONDESCRIPTOR = DESCRIPTOR.message_types_by_name['PythonFunctionDescriptor'] +_CPPFUNCTIONDESCRIPTOR = DESCRIPTOR.message_types_by_name['CppFunctionDescriptor'] +_FUNCTIONDESCRIPTOR = DESCRIPTOR.message_types_by_name['FunctionDescriptor'] +_CONCURRENCYGROUP = DESCRIPTOR.message_types_by_name['ConcurrencyGroup'] +_USERERRORINFO = DESCRIPTOR.message_types_by_name['UserErrorInfo'] +_RAYERRORINFO = DESCRIPTOR.message_types_by_name['RayErrorInfo'] +_OUTOFMEMORYERRORCONTEXT = DESCRIPTOR.message_types_by_name['OutOfMemoryErrorContext'] +_NODEDIEDERRORCONTEXT = DESCRIPTOR.message_types_by_name['NodeDiedErrorContext'] +_RAYEXCEPTION = DESCRIPTOR.message_types_by_name['RayException'] +_NODEDEATHINFO = DESCRIPTOR.message_types_by_name['NodeDeathInfo'] +_ACTORDEATHCAUSE = DESCRIPTOR.message_types_by_name['ActorDeathCause'] +_RUNTIMEENVFAILEDCONTEXT = DESCRIPTOR.message_types_by_name['RuntimeEnvFailedContext'] +_ACTORUNSCHEDULABLECONTEXT = DESCRIPTOR.message_types_by_name['ActorUnschedulableContext'] +_ACTORDIEDERRORCONTEXT = DESCRIPTOR.message_types_by_name['ActorDiedErrorContext'] +_OOMCONTEXT = DESCRIPTOR.message_types_by_name['OomContext'] +_ACTORUNAVAILABLECONTEXT = DESCRIPTOR.message_types_by_name['ActorUnavailableContext'] +_JOBCONFIG = DESCRIPTOR.message_types_by_name['JobConfig'] +_JOBCONFIG_METADATAENTRY = _JOBCONFIG.nested_types_by_name['MetadataEntry'] +_STREAMINGGENERATORRETURNIDINFO = DESCRIPTOR.message_types_by_name['StreamingGeneratorReturnIdInfo'] +_TASKSPEC = DESCRIPTOR.message_types_by_name['TaskSpec'] +_TASKSPEC_REQUIREDRESOURCESENTRY = _TASKSPEC.nested_types_by_name['RequiredResourcesEntry'] +_TASKSPEC_REQUIREDPLACEMENTRESOURCESENTRY = _TASKSPEC.nested_types_by_name['RequiredPlacementResourcesEntry'] +_TASKSPEC_LABELSENTRY = _TASKSPEC.nested_types_by_name['LabelsEntry'] +_TASKSPEC_LABELSELECTORENTRY = _TASKSPEC.nested_types_by_name['LabelSelectorEntry'] +_TASKINFOENTRY = DESCRIPTOR.message_types_by_name['TaskInfoEntry'] +_TASKINFOENTRY_REQUIREDRESOURCESENTRY = _TASKINFOENTRY.nested_types_by_name['RequiredResourcesEntry'] +_TASKINFOENTRY_LABELSELECTORENTRY = _TASKINFOENTRY.nested_types_by_name['LabelSelectorEntry'] +_TASKATTEMPT = DESCRIPTOR.message_types_by_name['TaskAttempt'] +_BUNDLE = DESCRIPTOR.message_types_by_name['Bundle'] +_BUNDLE_BUNDLEIDENTIFIER = _BUNDLE.nested_types_by_name['BundleIdentifier'] +_BUNDLE_UNITRESOURCESENTRY = _BUNDLE.nested_types_by_name['UnitResourcesEntry'] +_BUNDLE_LABELSELECTORENTRY = _BUNDLE.nested_types_by_name['LabelSelectorEntry'] +_PLACEMENTGROUPSPEC = DESCRIPTOR.message_types_by_name['PlacementGroupSpec'] +_OBJECTREFERENCE = DESCRIPTOR.message_types_by_name['ObjectReference'] +_OBJECTREFERENCECOUNT = DESCRIPTOR.message_types_by_name['ObjectReferenceCount'] +_TASKARG = DESCRIPTOR.message_types_by_name['TaskArg'] +_RETURNOBJECT = DESCRIPTOR.message_types_by_name['ReturnObject'] +_ACTORCREATIONTASKSPEC = DESCRIPTOR.message_types_by_name['ActorCreationTaskSpec'] +_ACTORTASKSPEC = DESCRIPTOR.message_types_by_name['ActorTaskSpec'] +_TASK = DESCRIPTOR.message_types_by_name['Task'] +_RESOURCEID = DESCRIPTOR.message_types_by_name['ResourceId'] +_RESOURCEMAPENTRY = DESCRIPTOR.message_types_by_name['ResourceMapEntry'] +_VIEWDATA = DESCRIPTOR.message_types_by_name['ViewData'] +_VIEWDATA_MEASURE = _VIEWDATA.nested_types_by_name['Measure'] +_OBJECTREFINFO = DESCRIPTOR.message_types_by_name['ObjectRefInfo'] +_RESOURCEALLOCATIONS = DESCRIPTOR.message_types_by_name['ResourceAllocations'] +_RESOURCEALLOCATIONS_RESOURCESLOT = _RESOURCEALLOCATIONS.nested_types_by_name['ResourceSlot'] +_COREWORKERSTATS = DESCRIPTOR.message_types_by_name['CoreWorkerStats'] +_COREWORKERSTATS_USEDRESOURCESENTRY = _COREWORKERSTATS.nested_types_by_name['UsedResourcesEntry'] +_COREWORKERSTATS_WEBUIDISPLAYENTRY = _COREWORKERSTATS.nested_types_by_name['WebuiDisplayEntry'] +_NODERESOURCEUSAGE = DESCRIPTOR.message_types_by_name['NodeResourceUsage'] +_LABELSELECTORCONSTRAINT = DESCRIPTOR.message_types_by_name['LabelSelectorConstraint'] +_LABELSELECTOR = DESCRIPTOR.message_types_by_name['LabelSelector'] +_NAMEDACTORINFO = DESCRIPTOR.message_types_by_name['NamedActorInfo'] +_LINEAGERECONSTRUCTIONTASK = DESCRIPTOR.message_types_by_name['LineageReconstructionTask'] +_LINEAGERECONSTRUCTIONTASK_LABELSENTRY = _LINEAGERECONSTRUCTIONTASK.nested_types_by_name['LabelsEntry'] +_NODEDEATHINFO_REASON = _NODEDEATHINFO.enum_types_by_name['Reason'] +_ACTORDIEDERRORCONTEXT_REASON = _ACTORDIEDERRORCONTEXT.enum_types_by_name['Reason'] +_JOBCONFIG_ACTORLIFETIME = _JOBCONFIG.enum_types_by_name['ActorLifetime'] +LabelIn = _reflection.GeneratedProtocolMessageType('LabelIn', (_message.Message,), { + 'DESCRIPTOR' : _LABELIN, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LabelIn) + }) +_sym_db.RegisterMessage(LabelIn) + +LabelNotIn = _reflection.GeneratedProtocolMessageType('LabelNotIn', (_message.Message,), { + 'DESCRIPTOR' : _LABELNOTIN, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LabelNotIn) + }) +_sym_db.RegisterMessage(LabelNotIn) + +LabelExists = _reflection.GeneratedProtocolMessageType('LabelExists', (_message.Message,), { + 'DESCRIPTOR' : _LABELEXISTS, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LabelExists) + }) +_sym_db.RegisterMessage(LabelExists) + +LabelDoesNotExist = _reflection.GeneratedProtocolMessageType('LabelDoesNotExist', (_message.Message,), { + 'DESCRIPTOR' : _LABELDOESNOTEXIST, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LabelDoesNotExist) + }) +_sym_db.RegisterMessage(LabelDoesNotExist) + +LabelOperator = _reflection.GeneratedProtocolMessageType('LabelOperator', (_message.Message,), { + 'DESCRIPTOR' : _LABELOPERATOR, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LabelOperator) + }) +_sym_db.RegisterMessage(LabelOperator) + +LabelMatchExpression = _reflection.GeneratedProtocolMessageType('LabelMatchExpression', (_message.Message,), { + 'DESCRIPTOR' : _LABELMATCHEXPRESSION, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LabelMatchExpression) + }) +_sym_db.RegisterMessage(LabelMatchExpression) + +LabelMatchExpressions = _reflection.GeneratedProtocolMessageType('LabelMatchExpressions', (_message.Message,), { + 'DESCRIPTOR' : _LABELMATCHEXPRESSIONS, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LabelMatchExpressions) + }) +_sym_db.RegisterMessage(LabelMatchExpressions) + +NodeLabelSchedulingStrategy = _reflection.GeneratedProtocolMessageType('NodeLabelSchedulingStrategy', (_message.Message,), { + 'DESCRIPTOR' : _NODELABELSCHEDULINGSTRATEGY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NodeLabelSchedulingStrategy) + }) +_sym_db.RegisterMessage(NodeLabelSchedulingStrategy) + +NodeAffinitySchedulingStrategy = _reflection.GeneratedProtocolMessageType('NodeAffinitySchedulingStrategy', (_message.Message,), { + 'DESCRIPTOR' : _NODEAFFINITYSCHEDULINGSTRATEGY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NodeAffinitySchedulingStrategy) + }) +_sym_db.RegisterMessage(NodeAffinitySchedulingStrategy) + +PlacementGroupSchedulingStrategy = _reflection.GeneratedProtocolMessageType('PlacementGroupSchedulingStrategy', (_message.Message,), { + 'DESCRIPTOR' : _PLACEMENTGROUPSCHEDULINGSTRATEGY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PlacementGroupSchedulingStrategy) + }) +_sym_db.RegisterMessage(PlacementGroupSchedulingStrategy) + +DefaultSchedulingStrategy = _reflection.GeneratedProtocolMessageType('DefaultSchedulingStrategy', (_message.Message,), { + 'DESCRIPTOR' : _DEFAULTSCHEDULINGSTRATEGY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DefaultSchedulingStrategy) + }) +_sym_db.RegisterMessage(DefaultSchedulingStrategy) + +SpreadSchedulingStrategy = _reflection.GeneratedProtocolMessageType('SpreadSchedulingStrategy', (_message.Message,), { + 'DESCRIPTOR' : _SPREADSCHEDULINGSTRATEGY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.SpreadSchedulingStrategy) + }) +_sym_db.RegisterMessage(SpreadSchedulingStrategy) + +SchedulingStrategy = _reflection.GeneratedProtocolMessageType('SchedulingStrategy', (_message.Message,), { + 'DESCRIPTOR' : _SCHEDULINGSTRATEGY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.SchedulingStrategy) + }) +_sym_db.RegisterMessage(SchedulingStrategy) + +Address = _reflection.GeneratedProtocolMessageType('Address', (_message.Message,), { + 'DESCRIPTOR' : _ADDRESS, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Address) + }) +_sym_db.RegisterMessage(Address) + +JavaFunctionDescriptor = _reflection.GeneratedProtocolMessageType('JavaFunctionDescriptor', (_message.Message,), { + 'DESCRIPTOR' : _JAVAFUNCTIONDESCRIPTOR, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.JavaFunctionDescriptor) + }) +_sym_db.RegisterMessage(JavaFunctionDescriptor) + +PythonFunctionDescriptor = _reflection.GeneratedProtocolMessageType('PythonFunctionDescriptor', (_message.Message,), { + 'DESCRIPTOR' : _PYTHONFUNCTIONDESCRIPTOR, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PythonFunctionDescriptor) + }) +_sym_db.RegisterMessage(PythonFunctionDescriptor) + +CppFunctionDescriptor = _reflection.GeneratedProtocolMessageType('CppFunctionDescriptor', (_message.Message,), { + 'DESCRIPTOR' : _CPPFUNCTIONDESCRIPTOR, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CppFunctionDescriptor) + }) +_sym_db.RegisterMessage(CppFunctionDescriptor) + +FunctionDescriptor = _reflection.GeneratedProtocolMessageType('FunctionDescriptor', (_message.Message,), { + 'DESCRIPTOR' : _FUNCTIONDESCRIPTOR, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.FunctionDescriptor) + }) +_sym_db.RegisterMessage(FunctionDescriptor) + +ConcurrencyGroup = _reflection.GeneratedProtocolMessageType('ConcurrencyGroup', (_message.Message,), { + 'DESCRIPTOR' : _CONCURRENCYGROUP, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ConcurrencyGroup) + }) +_sym_db.RegisterMessage(ConcurrencyGroup) + +UserErrorInfo = _reflection.GeneratedProtocolMessageType('UserErrorInfo', (_message.Message,), { + 'DESCRIPTOR' : _USERERRORINFO, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UserErrorInfo) + }) +_sym_db.RegisterMessage(UserErrorInfo) + +RayErrorInfo = _reflection.GeneratedProtocolMessageType('RayErrorInfo', (_message.Message,), { + 'DESCRIPTOR' : _RAYERRORINFO, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RayErrorInfo) + }) +_sym_db.RegisterMessage(RayErrorInfo) + +OutOfMemoryErrorContext = _reflection.GeneratedProtocolMessageType('OutOfMemoryErrorContext', (_message.Message,), { + 'DESCRIPTOR' : _OUTOFMEMORYERRORCONTEXT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.OutOfMemoryErrorContext) + }) +_sym_db.RegisterMessage(OutOfMemoryErrorContext) + +NodeDiedErrorContext = _reflection.GeneratedProtocolMessageType('NodeDiedErrorContext', (_message.Message,), { + 'DESCRIPTOR' : _NODEDIEDERRORCONTEXT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NodeDiedErrorContext) + }) +_sym_db.RegisterMessage(NodeDiedErrorContext) + +RayException = _reflection.GeneratedProtocolMessageType('RayException', (_message.Message,), { + 'DESCRIPTOR' : _RAYEXCEPTION, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RayException) + }) +_sym_db.RegisterMessage(RayException) + +NodeDeathInfo = _reflection.GeneratedProtocolMessageType('NodeDeathInfo', (_message.Message,), { + 'DESCRIPTOR' : _NODEDEATHINFO, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NodeDeathInfo) + }) +_sym_db.RegisterMessage(NodeDeathInfo) + +ActorDeathCause = _reflection.GeneratedProtocolMessageType('ActorDeathCause', (_message.Message,), { + 'DESCRIPTOR' : _ACTORDEATHCAUSE, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorDeathCause) + }) +_sym_db.RegisterMessage(ActorDeathCause) + +RuntimeEnvFailedContext = _reflection.GeneratedProtocolMessageType('RuntimeEnvFailedContext', (_message.Message,), { + 'DESCRIPTOR' : _RUNTIMEENVFAILEDCONTEXT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RuntimeEnvFailedContext) + }) +_sym_db.RegisterMessage(RuntimeEnvFailedContext) + +ActorUnschedulableContext = _reflection.GeneratedProtocolMessageType('ActorUnschedulableContext', (_message.Message,), { + 'DESCRIPTOR' : _ACTORUNSCHEDULABLECONTEXT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorUnschedulableContext) + }) +_sym_db.RegisterMessage(ActorUnschedulableContext) + +ActorDiedErrorContext = _reflection.GeneratedProtocolMessageType('ActorDiedErrorContext', (_message.Message,), { + 'DESCRIPTOR' : _ACTORDIEDERRORCONTEXT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorDiedErrorContext) + }) +_sym_db.RegisterMessage(ActorDiedErrorContext) + +OomContext = _reflection.GeneratedProtocolMessageType('OomContext', (_message.Message,), { + 'DESCRIPTOR' : _OOMCONTEXT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.OomContext) + }) +_sym_db.RegisterMessage(OomContext) + +ActorUnavailableContext = _reflection.GeneratedProtocolMessageType('ActorUnavailableContext', (_message.Message,), { + 'DESCRIPTOR' : _ACTORUNAVAILABLECONTEXT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorUnavailableContext) + }) +_sym_db.RegisterMessage(ActorUnavailableContext) + +JobConfig = _reflection.GeneratedProtocolMessageType('JobConfig', (_message.Message,), { + + 'MetadataEntry' : _reflection.GeneratedProtocolMessageType('MetadataEntry', (_message.Message,), { + 'DESCRIPTOR' : _JOBCONFIG_METADATAENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.JobConfig.MetadataEntry) + }) + , + 'DESCRIPTOR' : _JOBCONFIG, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.JobConfig) + }) +_sym_db.RegisterMessage(JobConfig) +_sym_db.RegisterMessage(JobConfig.MetadataEntry) + +StreamingGeneratorReturnIdInfo = _reflection.GeneratedProtocolMessageType('StreamingGeneratorReturnIdInfo', (_message.Message,), { + 'DESCRIPTOR' : _STREAMINGGENERATORRETURNIDINFO, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.StreamingGeneratorReturnIdInfo) + }) +_sym_db.RegisterMessage(StreamingGeneratorReturnIdInfo) + +TaskSpec = _reflection.GeneratedProtocolMessageType('TaskSpec', (_message.Message,), { + + 'RequiredResourcesEntry' : _reflection.GeneratedProtocolMessageType('RequiredResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKSPEC_REQUIREDRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskSpec.RequiredResourcesEntry) + }) + , + + 'RequiredPlacementResourcesEntry' : _reflection.GeneratedProtocolMessageType('RequiredPlacementResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKSPEC_REQUIREDPLACEMENTRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskSpec.RequiredPlacementResourcesEntry) + }) + , + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKSPEC_LABELSENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskSpec.LabelsEntry) + }) + , + + 'LabelSelectorEntry' : _reflection.GeneratedProtocolMessageType('LabelSelectorEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKSPEC_LABELSELECTORENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskSpec.LabelSelectorEntry) + }) + , + 'DESCRIPTOR' : _TASKSPEC, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskSpec) + }) +_sym_db.RegisterMessage(TaskSpec) +_sym_db.RegisterMessage(TaskSpec.RequiredResourcesEntry) +_sym_db.RegisterMessage(TaskSpec.RequiredPlacementResourcesEntry) +_sym_db.RegisterMessage(TaskSpec.LabelsEntry) +_sym_db.RegisterMessage(TaskSpec.LabelSelectorEntry) + +TaskInfoEntry = _reflection.GeneratedProtocolMessageType('TaskInfoEntry', (_message.Message,), { + + 'RequiredResourcesEntry' : _reflection.GeneratedProtocolMessageType('RequiredResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKINFOENTRY_REQUIREDRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskInfoEntry.RequiredResourcesEntry) + }) + , + + 'LabelSelectorEntry' : _reflection.GeneratedProtocolMessageType('LabelSelectorEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKINFOENTRY_LABELSELECTORENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskInfoEntry.LabelSelectorEntry) + }) + , + 'DESCRIPTOR' : _TASKINFOENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskInfoEntry) + }) +_sym_db.RegisterMessage(TaskInfoEntry) +_sym_db.RegisterMessage(TaskInfoEntry.RequiredResourcesEntry) +_sym_db.RegisterMessage(TaskInfoEntry.LabelSelectorEntry) + +TaskAttempt = _reflection.GeneratedProtocolMessageType('TaskAttempt', (_message.Message,), { + 'DESCRIPTOR' : _TASKATTEMPT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskAttempt) + }) +_sym_db.RegisterMessage(TaskAttempt) + +Bundle = _reflection.GeneratedProtocolMessageType('Bundle', (_message.Message,), { + + 'BundleIdentifier' : _reflection.GeneratedProtocolMessageType('BundleIdentifier', (_message.Message,), { + 'DESCRIPTOR' : _BUNDLE_BUNDLEIDENTIFIER, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Bundle.BundleIdentifier) + }) + , + + 'UnitResourcesEntry' : _reflection.GeneratedProtocolMessageType('UnitResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _BUNDLE_UNITRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Bundle.UnitResourcesEntry) + }) + , + + 'LabelSelectorEntry' : _reflection.GeneratedProtocolMessageType('LabelSelectorEntry', (_message.Message,), { + 'DESCRIPTOR' : _BUNDLE_LABELSELECTORENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Bundle.LabelSelectorEntry) + }) + , + 'DESCRIPTOR' : _BUNDLE, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Bundle) + }) +_sym_db.RegisterMessage(Bundle) +_sym_db.RegisterMessage(Bundle.BundleIdentifier) +_sym_db.RegisterMessage(Bundle.UnitResourcesEntry) +_sym_db.RegisterMessage(Bundle.LabelSelectorEntry) + +PlacementGroupSpec = _reflection.GeneratedProtocolMessageType('PlacementGroupSpec', (_message.Message,), { + 'DESCRIPTOR' : _PLACEMENTGROUPSPEC, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PlacementGroupSpec) + }) +_sym_db.RegisterMessage(PlacementGroupSpec) + +ObjectReference = _reflection.GeneratedProtocolMessageType('ObjectReference', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTREFERENCE, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ObjectReference) + }) +_sym_db.RegisterMessage(ObjectReference) + +ObjectReferenceCount = _reflection.GeneratedProtocolMessageType('ObjectReferenceCount', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTREFERENCECOUNT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ObjectReferenceCount) + }) +_sym_db.RegisterMessage(ObjectReferenceCount) + +TaskArg = _reflection.GeneratedProtocolMessageType('TaskArg', (_message.Message,), { + 'DESCRIPTOR' : _TASKARG, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskArg) + }) +_sym_db.RegisterMessage(TaskArg) + +ReturnObject = _reflection.GeneratedProtocolMessageType('ReturnObject', (_message.Message,), { + 'DESCRIPTOR' : _RETURNOBJECT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReturnObject) + }) +_sym_db.RegisterMessage(ReturnObject) + +ActorCreationTaskSpec = _reflection.GeneratedProtocolMessageType('ActorCreationTaskSpec', (_message.Message,), { + 'DESCRIPTOR' : _ACTORCREATIONTASKSPEC, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorCreationTaskSpec) + }) +_sym_db.RegisterMessage(ActorCreationTaskSpec) + +ActorTaskSpec = _reflection.GeneratedProtocolMessageType('ActorTaskSpec', (_message.Message,), { + 'DESCRIPTOR' : _ACTORTASKSPEC, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorTaskSpec) + }) +_sym_db.RegisterMessage(ActorTaskSpec) + +Task = _reflection.GeneratedProtocolMessageType('Task', (_message.Message,), { + 'DESCRIPTOR' : _TASK, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Task) + }) +_sym_db.RegisterMessage(Task) + +ResourceId = _reflection.GeneratedProtocolMessageType('ResourceId', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCEID, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourceId) + }) +_sym_db.RegisterMessage(ResourceId) + +ResourceMapEntry = _reflection.GeneratedProtocolMessageType('ResourceMapEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCEMAPENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourceMapEntry) + }) +_sym_db.RegisterMessage(ResourceMapEntry) + +ViewData = _reflection.GeneratedProtocolMessageType('ViewData', (_message.Message,), { + + 'Measure' : _reflection.GeneratedProtocolMessageType('Measure', (_message.Message,), { + 'DESCRIPTOR' : _VIEWDATA_MEASURE, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ViewData.Measure) + }) + , + 'DESCRIPTOR' : _VIEWDATA, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ViewData) + }) +_sym_db.RegisterMessage(ViewData) +_sym_db.RegisterMessage(ViewData.Measure) + +ObjectRefInfo = _reflection.GeneratedProtocolMessageType('ObjectRefInfo', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTREFINFO, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ObjectRefInfo) + }) +_sym_db.RegisterMessage(ObjectRefInfo) + +ResourceAllocations = _reflection.GeneratedProtocolMessageType('ResourceAllocations', (_message.Message,), { + + 'ResourceSlot' : _reflection.GeneratedProtocolMessageType('ResourceSlot', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCEALLOCATIONS_RESOURCESLOT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourceAllocations.ResourceSlot) + }) + , + 'DESCRIPTOR' : _RESOURCEALLOCATIONS, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourceAllocations) + }) +_sym_db.RegisterMessage(ResourceAllocations) +_sym_db.RegisterMessage(ResourceAllocations.ResourceSlot) + +CoreWorkerStats = _reflection.GeneratedProtocolMessageType('CoreWorkerStats', (_message.Message,), { + + 'UsedResourcesEntry' : _reflection.GeneratedProtocolMessageType('UsedResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _COREWORKERSTATS_USEDRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CoreWorkerStats.UsedResourcesEntry) + }) + , + + 'WebuiDisplayEntry' : _reflection.GeneratedProtocolMessageType('WebuiDisplayEntry', (_message.Message,), { + 'DESCRIPTOR' : _COREWORKERSTATS_WEBUIDISPLAYENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CoreWorkerStats.WebuiDisplayEntry) + }) + , + 'DESCRIPTOR' : _COREWORKERSTATS, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CoreWorkerStats) + }) +_sym_db.RegisterMessage(CoreWorkerStats) +_sym_db.RegisterMessage(CoreWorkerStats.UsedResourcesEntry) +_sym_db.RegisterMessage(CoreWorkerStats.WebuiDisplayEntry) + +NodeResourceUsage = _reflection.GeneratedProtocolMessageType('NodeResourceUsage', (_message.Message,), { + 'DESCRIPTOR' : _NODERESOURCEUSAGE, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NodeResourceUsage) + }) +_sym_db.RegisterMessage(NodeResourceUsage) + +LabelSelectorConstraint = _reflection.GeneratedProtocolMessageType('LabelSelectorConstraint', (_message.Message,), { + 'DESCRIPTOR' : _LABELSELECTORCONSTRAINT, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LabelSelectorConstraint) + }) +_sym_db.RegisterMessage(LabelSelectorConstraint) + +LabelSelector = _reflection.GeneratedProtocolMessageType('LabelSelector', (_message.Message,), { + 'DESCRIPTOR' : _LABELSELECTOR, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LabelSelector) + }) +_sym_db.RegisterMessage(LabelSelector) + +NamedActorInfo = _reflection.GeneratedProtocolMessageType('NamedActorInfo', (_message.Message,), { + 'DESCRIPTOR' : _NAMEDACTORINFO, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NamedActorInfo) + }) +_sym_db.RegisterMessage(NamedActorInfo) + +LineageReconstructionTask = _reflection.GeneratedProtocolMessageType('LineageReconstructionTask', (_message.Message,), { + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _LINEAGERECONSTRUCTIONTASK_LABELSENTRY, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LineageReconstructionTask.LabelsEntry) + }) + , + 'DESCRIPTOR' : _LINEAGERECONSTRUCTIONTASK, + '__module__' : 'src.ray.protobuf.common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LineageReconstructionTask) + }) +_sym_db.RegisterMessage(LineageReconstructionTask) +_sym_db.RegisterMessage(LineageReconstructionTask.LabelsEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\030io.ray.runtime.generated' + _JOBCONFIG_METADATAENTRY._options = None + _JOBCONFIG_METADATAENTRY._serialized_options = b'8\001' + _TASKSPEC_REQUIREDRESOURCESENTRY._options = None + _TASKSPEC_REQUIREDRESOURCESENTRY._serialized_options = b'8\001' + _TASKSPEC_REQUIREDPLACEMENTRESOURCESENTRY._options = None + _TASKSPEC_REQUIREDPLACEMENTRESOURCESENTRY._serialized_options = b'8\001' + _TASKSPEC_LABELSENTRY._options = None + _TASKSPEC_LABELSENTRY._serialized_options = b'8\001' + _TASKSPEC_LABELSELECTORENTRY._options = None + _TASKSPEC_LABELSELECTORENTRY._serialized_options = b'8\001' + _TASKINFOENTRY_REQUIREDRESOURCESENTRY._options = None + _TASKINFOENTRY_REQUIREDRESOURCESENTRY._serialized_options = b'8\001' + _TASKINFOENTRY_LABELSELECTORENTRY._options = None + _TASKINFOENTRY_LABELSELECTORENTRY._serialized_options = b'8\001' + _BUNDLE_UNITRESOURCESENTRY._options = None + _BUNDLE_UNITRESOURCESENTRY._serialized_options = b'8\001' + _BUNDLE_LABELSELECTORENTRY._options = None + _BUNDLE_LABELSELECTORENTRY._serialized_options = b'8\001' + _COREWORKERSTATS_USEDRESOURCESENTRY._options = None + _COREWORKERSTATS_USEDRESOURCESENTRY._serialized_options = b'8\001' + _COREWORKERSTATS_WEBUIDISPLAYENTRY._options = None + _COREWORKERSTATS_WEBUIDISPLAYENTRY._serialized_options = b'8\001' + _LINEAGERECONSTRUCTIONTASK_LABELSENTRY._options = None + _LINEAGERECONSTRUCTIONTASK_LABELSENTRY._serialized_options = b'8\001' + _LANGUAGE._serialized_start=15517 + _LANGUAGE._serialized_end=15558 + _WORKERTYPE._serialized_start=15560 + _WORKERTYPE._serialized_end=15634 + _TASKTYPE._serialized_start=15636 + _TASKTYPE._serialized_end=15721 + _ERRORTYPE._serialized_start=15724 + _ERRORTYPE._serialized_end=16476 + _TENSORTRANSPORT._serialized_start=16478 + _TENSORTRANSPORT._serialized_end=16533 + _TASKSTATUS._serialized_start=16536 + _TASKSTATUS._serialized_end=16863 + _WORKEREXITTYPE._serialized_start=16865 + _WORKEREXITTYPE._serialized_end=16989 + _PLACEMENTSTRATEGY._serialized_start=16991 + _PLACEMENTSTRATEGY._serialized_end=17068 + _LABELSELECTOROPERATOR._serialized_start=17070 + _LABELSELECTOROPERATOR._serialized_end=17175 + _LABELIN._serialized_start=85 + _LABELIN._serialized_end=118 + _LABELNOTIN._serialized_start=120 + _LABELNOTIN._serialized_end=156 + _LABELEXISTS._serialized_start=158 + _LABELEXISTS._serialized_end=171 + _LABELDOESNOTEXIST._serialized_start=173 + _LABELDOESNOTEXIST._serialized_end=192 + _LABELOPERATOR._serialized_start=195 + _LABELOPERATOR._serialized_end=470 + _LABELMATCHEXPRESSION._serialized_start=472 + _LABELMATCHEXPRESSION._serialized_end=564 + _LABELMATCHEXPRESSIONS._serialized_start=566 + _LABELMATCHEXPRESSIONS._serialized_end=654 + _NODELABELSCHEDULINGSTRATEGY._serialized_start=657 + _NODELABELSCHEDULINGSTRATEGY._serialized_end=790 + _NODEAFFINITYSCHEDULINGSTRATEGY._serialized_start=793 + _NODEAFFINITYSCHEDULINGSTRATEGY._serialized_end=968 + _PLACEMENTGROUPSCHEDULINGSTRATEGY._serialized_start=971 + _PLACEMENTGROUPSCHEDULINGSTRATEGY._serialized_end=1194 + _DEFAULTSCHEDULINGSTRATEGY._serialized_start=1196 + _DEFAULTSCHEDULINGSTRATEGY._serialized_end=1223 + _SPREADSCHEDULINGSTRATEGY._serialized_start=1225 + _SPREADSCHEDULINGSTRATEGY._serialized_end=1251 + _SCHEDULINGSTRATEGY._serialized_start=1254 + _SCHEDULINGSTRATEGY._serialized_end=1849 + _ADDRESS._serialized_start=1851 + _ADDRESS._serialized_end=1965 + _JAVAFUNCTIONDESCRIPTOR._serialized_start=1967 + _JAVAFUNCTIONDESCRIPTOR._serialized_end=2089 + _PYTHONFUNCTIONDESCRIPTOR._serialized_start=2092 + _PYTHONFUNCTIONDESCRIPTOR._serialized_end=2256 + _CPPFUNCTIONDESCRIPTOR._serialized_start=2258 + _CPPFUNCTIONDESCRIPTOR._serialized_end=2373 + _FUNCTIONDESCRIPTOR._serialized_start=2376 + _FUNCTIONDESCRIPTOR._serialized_end=2701 + _CONCURRENCYGROUP._serialized_start=2704 + _CONCURRENCYGROUP._serialized_end=2863 + _USERERRORINFO._serialized_start=2865 + _USERERRORINFO._serialized_end=2964 + _RAYERRORINFO._serialized_start=2967 + _RAYERRORINFO._serialized_end=3344 + _OUTOFMEMORYERRORCONTEXT._serialized_start=3347 + _OUTOFMEMORYERRORCONTEXT._serialized_end=3651 + _NODEDIEDERRORCONTEXT._serialized_start=3653 + _NODEDIEDERRORCONTEXT._serialized_end=3740 + _RAYEXCEPTION._serialized_start=3743 + _RAYEXCEPTION._serialized_end=3917 + _NODEDEATHINFO._serialized_start=3920 + _NODEDEATHINFO._serialized_end=4170 + _NODEDEATHINFO_REASON._serialized_start=4032 + _NODEDEATHINFO_REASON._serialized_end=4170 + _ACTORDEATHCAUSE._serialized_start=4173 + _ACTORDEATHCAUSE._serialized_end=4639 + _RUNTIMEENVFAILEDCONTEXT._serialized_start=4641 + _RUNTIMEENVFAILEDCONTEXT._serialized_end=4703 + _ACTORUNSCHEDULABLECONTEXT._serialized_start=4705 + _ACTORUNSCHEDULABLECONTEXT._serialized_end=4769 + _ACTORDIEDERRORCONTEXT._serialized_start=4772 + _ACTORDIEDERRORCONTEXT._serialized_end=5387 + _ACTORDIEDERRORCONTEXT_REASON._serialized_start=5245 + _ACTORDIEDERRORCONTEXT_REASON._serialized_end=5367 + _OOMCONTEXT._serialized_start=5389 + _OOMCONTEXT._serialized_end=5481 + _ACTORUNAVAILABLECONTEXT._serialized_start=5483 + _ACTORUNAVAILABLECONTEXT._serialized_end=5553 + _JOBCONFIG._serialized_start=5556 + _JOBCONFIG._serialized_end=6116 + _JOBCONFIG_METADATAENTRY._serialized_start=6008 + _JOBCONFIG_METADATAENTRY._serialized_end=6067 + _JOBCONFIG_ACTORLIFETIME._serialized_start=6069 + _JOBCONFIG_ACTORLIFETIME._serialized_end=6116 + _STREAMINGGENERATORRETURNIDINFO._serialized_start=6118 + _STREAMINGGENERATORRETURNIDINFO._serialized_end=6221 + _TASKSPEC._serialized_start=6224 + _TASKSPEC._serialized_end=8721 + _TASKSPEC_REQUIREDRESOURCESENTRY._serialized_start=8384 + _TASKSPEC_REQUIREDRESOURCESENTRY._serialized_end=8452 + _TASKSPEC_REQUIREDPLACEMENTRESOURCESENTRY._serialized_start=8454 + _TASKSPEC_REQUIREDPLACEMENTRESOURCESENTRY._serialized_end=8531 + _TASKSPEC_LABELSENTRY._serialized_start=8533 + _TASKSPEC_LABELSENTRY._serialized_end=8590 + _TASKSPEC_LABELSELECTORENTRY._serialized_start=8592 + _TASKSPEC_LABELSELECTORENTRY._serialized_end=8656 + _TASKINFOENTRY._serialized_start=8724 + _TASKINFOENTRY._serialized_end=9628 + _TASKINFOENTRY_REQUIREDRESOURCESENTRY._serialized_start=8384 + _TASKINFOENTRY_REQUIREDRESOURCESENTRY._serialized_end=8452 + _TASKINFOENTRY_LABELSELECTORENTRY._serialized_start=8592 + _TASKINFOENTRY_LABELSELECTORENTRY._serialized_end=8656 + _TASKATTEMPT._serialized_start=9630 + _TASKATTEMPT._serialized_end=9707 + _BUNDLE._serialized_start=9710 + _BUNDLE._serialized_end=10189 + _BUNDLE_BUNDLEIDENTIFIER._serialized_start=9958 + _BUNDLE_BUNDLEIDENTIFIER._serialized_end=10057 + _BUNDLE_UNITRESOURCESENTRY._serialized_start=10059 + _BUNDLE_UNITRESOURCESENTRY._serialized_end=10123 + _BUNDLE_LABELSELECTORENTRY._serialized_start=8592 + _BUNDLE_LABELSELECTORENTRY._serialized_end=8656 + _PLACEMENTGROUPSPEC._serialized_start=10192 + _PLACEMENTGROUPSPEC._serialized_end=10683 + _OBJECTREFERENCE._serialized_start=10686 + _OBJECTREFERENCE._serialized_end=10816 + _OBJECTREFERENCECOUNT._serialized_start=10819 + _OBJECTREFERENCECOUNT._serialized_end=11138 + _TASKARG._serialized_start=11141 + _TASKARG._serialized_end=11455 + _RETURNOBJECT._serialized_start=11458 + _RETURNOBJECT._serialized_end=11672 + _ACTORCREATIONTASKSPEC._serialized_start=11675 + _ACTORCREATIONTASKSPEC._serialized_end=12306 + _ACTORTASKSPEC._serialized_start=12309 + _ACTORTASKSPEC._serialized_end=12460 + _TASK._serialized_start=12462 + _TASK._serialized_end=12516 + _RESOURCEID._serialized_start=12518 + _RESOURCEID._serialized_end=12580 + _RESOURCEMAPENTRY._serialized_start=12582 + _RESOURCEMAPENTRY._serialized_end=12676 + _VIEWDATA._serialized_start=12679 + _VIEWDATA._serialized_end=13179 + _VIEWDATA_MEASURE._serialized_start=12776 + _VIEWDATA_MEASURE._serialized_end=13179 + _OBJECTREFINFO._serialized_start=13182 + _OBJECTREFINFO._serialized_end=13566 + _RESOURCEALLOCATIONS._serialized_start=13569 + _RESOURCEALLOCATIONS._serialized_end=13740 + _RESOURCEALLOCATIONS_RESOURCESLOT._serialized_start=13674 + _RESOURCEALLOCATIONS_RESOURCESLOT._serialized_end=13740 + _COREWORKERSTATS._serialized_start=13743 + _COREWORKERSTATS._serialized_end=14925 + _COREWORKERSTATS_USEDRESOURCESENTRY._serialized_start=14760 + _COREWORKERSTATS_USEDRESOURCESENTRY._serialized_end=14854 + _COREWORKERSTATS_WEBUIDISPLAYENTRY._serialized_start=14856 + _COREWORKERSTATS_WEBUIDISPLAYENTRY._serialized_end=14919 + _NODERESOURCEUSAGE._serialized_start=14927 + _NODERESOURCEUSAGE._serialized_end=14966 + _LABELSELECTORCONSTRAINT._serialized_start=14969 + _LABELSELECTORCONSTRAINT._serialized_end=15118 + _LABELSELECTOR._serialized_start=15120 + _LABELSELECTOR._serialized_end=15214 + _NAMEDACTORINFO._serialized_start=15216 + _NAMEDACTORINFO._serialized_end=15289 + _LINEAGERECONSTRUCTIONTASK._serialized_start=15292 + _LINEAGERECONSTRUCTIONTASK._serialized_end=15515 + _LINEAGERECONSTRUCTIONTASK_LABELSENTRY._serialized_start=8533 + _LINEAGERECONSTRUCTIONTASK_LABELSENTRY._serialized_end=8590 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/common_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/common_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/common_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/core_worker_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/core_worker_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..8df5a84c82870aee6ab703d7ad04688c73bf976f --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/core_worker_pb2.py @@ -0,0 +1,562 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/core_worker.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 +from . import pubsub_pb2 as src_dot_ray_dot_protobuf_dot_pubsub__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"src/ray/protobuf/core_worker.proto\x12\x07ray.rpc\x1a\x1dsrc/ray/protobuf/common.proto\x1a\x1dsrc/ray/protobuf/pubsub.proto\"0\n\x0f\x41\x63tiveObjectIDs\x12\x1d\n\nobject_ids\x18\x01 \x03(\x0cR\tobjectIds\"\x8b\x06\n\x0b\x41\x63torHandle\x12\x19\n\x08\x61\x63tor_id\x18\x01 \x01(\x0cR\x07\x61\x63torId\x12\x19\n\x08owner_id\x18\x02 \x01(\x0cR\x07ownerId\x12\x35\n\rowner_address\x18\x03 \x01(\x0b\x32\x10.ray.rpc.AddressR\x0cownerAddress\x12&\n\x0f\x63reation_job_id\x18\x04 \x01(\x0cR\rcreationJobId\x12\x38\n\x0e\x61\x63tor_language\x18\x05 \x01(\x0e\x32\x11.ray.rpc.LanguageR\ractorLanguage\x12q\n\'actor_creation_task_function_descriptor\x18\x06 \x01(\x0b\x32\x1b.ray.rpc.FunctionDescriptorR#actorCreationTaskFunctionDescriptor\x12!\n\x0c\x61\x63tor_cursor\x18\x07 \x01(\x0cR\x0b\x61\x63torCursor\x12%\n\x0e\x65xtension_data\x18\x08 \x01(\x0cR\rextensionData\x12(\n\x10max_task_retries\x18\t \x01(\x03R\x0emaxTaskRetries\x12\x12\n\x04name\x18\n \x01(\tR\x04name\x12#\n\rray_namespace\x18\x0b \x01(\tR\x0crayNamespace\x12>\n\x1c\x61llow_out_of_order_execution\x18\x0c \x01(\x08R\x18\x61llowOutOfOrderExecution\x12*\n\x11max_pending_calls\x18\r \x01(\x05R\x0fmaxPendingCalls\x12,\n\x12\x65nable_task_events\x18\x0e \x01(\x08R\x10\x65nableTaskEvents\x12\x38\n\x06labels\x18\x0f \x03(\x0b\x32 .ray.rpc.ActorHandle.LabelsEntryR\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x93\x02\n\x0fPushTaskRequest\x12,\n\x12intended_worker_id\x18\x01 \x01(\x0cR\x10intendedWorkerId\x12.\n\ttask_spec\x18\x02 \x01(\x0b\x32\x11.ray.rpc.TaskSpecR\x08taskSpec\x12\'\n\x0fsequence_number\x18\x03 \x01(\x03R\x0esequenceNumber\x12\x33\n\x16\x63lient_processed_up_to\x18\x04 \x01(\x03R\x13\x63lientProcessedUpTo\x12\x44\n\x10resource_mapping\x18\x05 \x03(\x0b\x32\x19.ray.rpc.ResourceMapEntryR\x0fresourceMapping\"\x87\x05\n\rPushTaskReply\x12<\n\x0ereturn_objects\x18\x01 \x03(\x0b\x32\x15.ray.rpc.ReturnObjectR\rreturnObjects\x12K\n\x16\x64ynamic_return_objects\x18\x02 \x03(\x0b\x32\x15.ray.rpc.ReturnObjectR\x14\x64ynamicReturnObjects\x12%\n\x0eworker_exiting\x18\x03 \x01(\x08R\rworkerExiting\x12\x42\n\rborrowed_refs\x18\x04 \x03(\x0b\x32\x1d.ray.rpc.ObjectReferenceCountR\x0c\x62orrowedRefs\x12,\n\x12is_retryable_error\x18\x05 \x01(\x08R\x10isRetryableError\x12\x30\n\x14is_application_error\x18\x06 \x01(\x08R\x12isApplicationError\x12?\n\x1cwas_cancelled_before_running\x18\x07 \x01(\x08R\x19wasCancelledBeforeRunning\x12+\n\x0f\x61\x63tor_repr_name\x18\x08 \x01(\tH\x00R\ractorReprName\x88\x01\x01\x12\x30\n\x14task_execution_error\x18\t \x01(\tR\x12taskExecutionError\x12l\n\x1estreaming_generator_return_ids\x18\n \x03(\x0b\x32\'.ray.rpc.StreamingGeneratorReturnIdInfoR\x1bstreamingGeneratorReturnIdsB\x12\n\x10_actor_repr_name\"a\n\x1f\x41\x63torCallArgWaitCompleteRequest\x12,\n\x12intended_worker_id\x18\x01 \x01(\x0cR\x10intendedWorkerId\x12\x10\n\x03tag\x18\x02 \x01(\x03R\x03tag\"\x1f\n\x1d\x41\x63torCallArgWaitCompleteReply\"]\n\x16GetObjectStatusRequest\x12&\n\x0fowner_worker_id\x18\x01 \x01(\x0cR\rownerWorkerId\x12\x1b\n\tobject_id\x18\x02 \x01(\x0cR\x08objectId\"\x85\x01\n\tRayObject\x12\x12\n\x04\x64\x61ta\x18\x01 \x01(\x0cR\x04\x64\x61ta\x12\x1a\n\x08metadata\x18\x02 \x01(\x0cR\x08metadata\x12H\n\x13nested_inlined_refs\x18\x03 \x03(\x0b\x32\x18.ray.rpc.ObjectReferenceR\x11nestedInlinedRefs\"\xfc\x01\n\x14GetObjectStatusReply\x12\x42\n\x06status\x18\x01 \x01(\x0e\x32*.ray.rpc.GetObjectStatusReply.ObjectStatusR\x06status\x12*\n\x06object\x18\x02 \x01(\x0b\x32\x12.ray.rpc.RayObjectR\x06object\x12\x19\n\x08node_ids\x18\x03 \x03(\x0cR\x07nodeIds\x12\x1f\n\x0bobject_size\x18\x04 \x01(\x04R\nobjectSize\"8\n\x0cObjectStatus\x12\x0b\n\x07\x43REATED\x10\x00\x12\x10\n\x0cOUT_OF_SCOPE\x10\x01\x12\t\n\x05\x46REED\x10\x02\"h\n\x1dWaitForActorRefDeletedRequest\x12,\n\x12intended_worker_id\x18\x01 \x01(\x0cR\x10intendedWorkerId\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\x0cR\x07\x61\x63torId\"\x1d\n\x1bWaitForActorRefDeletedReply\"\xc0\x01\n UpdateObjectLocationBatchRequest\x12,\n\x12intended_worker_id\x18\x01 \x01(\x0cR\x10intendedWorkerId\x12\x17\n\x07node_id\x18\x02 \x01(\x0cR\x06nodeId\x12U\n\x17object_location_updates\x18\x03 \x03(\x0b\x32\x1d.ray.rpc.ObjectLocationUpdateR\x15objectLocationUpdates\" \n\x1eUpdateObjectLocationBatchReply\"w\n\x1bObjectSpilledLocationUpdate\x12\x1f\n\x0bspilled_url\x18\x03 \x01(\tR\nspilledUrl\x12\x37\n\x18spilled_to_local_storage\x18\x04 \x01(\x08R\x15spilledToLocalStorage\"\xe6\x02\n\x14ObjectLocationUpdate\x12\x1b\n\tobject_id\x18\x01 \x01(\x0cR\x08objectId\x12^\n\x16plasma_location_update\x18\x02 \x01(\x0e\x32#.ray.rpc.ObjectPlasmaLocationUpdateH\x00R\x14plasmaLocationUpdate\x88\x01\x01\x12\x61\n\x17spilled_location_update\x18\x03 \x01(\x0b\x32$.ray.rpc.ObjectSpilledLocationUpdateH\x01R\x15spilledLocationUpdate\x88\x01\x01\x12&\n\x0cgenerator_id\x18\x04 \x01(\x0cH\x02R\x0bgeneratorId\x88\x01\x01\x42\x19\n\x17_plasma_location_updateB\x1a\n\x18_spilled_location_updateB\x0f\n\r_generator_id\"m\n\x1eGetObjectLocationsOwnerRequest\x12,\n\x12intended_worker_id\x18\x01 \x01(\x0cR\x10intendedWorkerId\x12\x1d\n\nobject_ids\x18\x02 \x03(\x0cR\tobjectIds\"|\n\x1cGetObjectLocationsOwnerReply\x12\\\n\x15object_location_infos\x18\x01 \x03(\x0b\x32(.ray.rpc.WorkerObjectLocationsPubMessageR\x13objectLocationInfos\"\x98\x01\n\x10KillActorRequest\x12*\n\x11intended_actor_id\x18\x01 \x01(\x0cR\x0fintendedActorId\x12\x1d\n\nforce_kill\x18\x02 \x01(\x08R\tforceKill\x12\x39\n\x0b\x64\x65\x61th_cause\x18\x03 \x01(\x0b\x32\x18.ray.rpc.ActorDeathCauseR\ndeathCause\"\x10\n\x0eKillActorReply\"\xa4\x01\n\x11\x43\x61ncelTaskRequest\x12(\n\x10intended_task_id\x18\x01 \x01(\x0cR\x0eintendedTaskId\x12\x1d\n\nforce_kill\x18\x02 \x01(\x08R\tforceKill\x12\x1c\n\trecursive\x18\x03 \x01(\x08R\trecursive\x12(\n\x10\x63\x61ller_worker_id\x18\x04 \x01(\x0cR\x0e\x63\x61llerWorkerId\"t\n\x0f\x43\x61ncelTaskReply\x12\x34\n\x16requested_task_running\x18\x01 \x01(\x08R\x14requestedTaskRunning\x12+\n\x11\x61ttempt_succeeded\x18\x02 \x01(\x08R\x10\x61ttemptSucceeded\"\x80\x01\n\x17RemoteCancelTaskRequest\x12(\n\x10remote_object_id\x18\x01 \x01(\x0cR\x0eremoteObjectId\x12\x1d\n\nforce_kill\x18\x02 \x01(\x08R\tforceKill\x12\x1c\n\trecursive\x18\x03 \x01(\x08R\trecursive\"\x17\n\x15RemoteCancelTaskReply\"\xca\x01\n\x19GetCoreWorkerStatsRequest\x12,\n\x12intended_worker_id\x18\x01 \x01(\x0cR\x10intendedWorkerId\x12.\n\x13include_memory_info\x18\x02 \x01(\x08R\x11includeMemoryInfo\x12*\n\x11include_task_info\x18\x03 \x01(\x08R\x0fincludeTaskInfo\x12\x19\n\x05limit\x18\x04 \x01(\x03H\x00R\x05limit\x88\x01\x01\x42\x08\n\x06_limit\"\xf9\x01\n\x17GetCoreWorkerStatsReply\x12\x44\n\x11\x63ore_worker_stats\x18\x01 \x01(\x0b\x32\x18.ray.rpc.CoreWorkerStatsR\x0f\x63oreWorkerStats\x12M\n\x17owned_task_info_entries\x18\x02 \x03(\x0b\x32\x16.ray.rpc.TaskInfoEntryR\x14ownedTaskInfoEntries\x12(\n\x10running_task_ids\x18\x03 \x03(\x0cR\x0erunningTaskIds\x12\x1f\n\x0btasks_total\x18\x04 \x01(\x03R\ntasksTotal\"E\n\x0eLocalGCRequest\x12\x33\n\x16triggered_by_global_gc\x18\x01 \x01(\x08R\x13triggeredByGlobalGc\"\x0e\n\x0cLocalGCReply\"7\n\x18PlasmaObjectReadyRequest\x12\x1b\n\tobject_id\x18\x01 \x01(\x0cR\x08objectId\"\x18\n\x16PlasmaObjectReadyReply\"T\n\x14\x44\x65leteObjectsRequest\x12\x1d\n\nobject_ids\x18\x01 \x03(\x0cR\tobjectIds\x12\x1d\n\nlocal_only\x18\x02 \x01(\x08R\tlocalOnly\"\x14\n\x12\x44\x65leteObjectsReply\"\xa6\x01\n\x13SpillObjectsRequest\x12I\n\x14object_refs_to_spill\x18\x01 \x03(\x0b\x32\x18.ray.rpc.ObjectReferenceR\x11objectRefsToSpill\x12\x44\n\x0e\x64\x65lete_request\x18\x02 \x01(\x0b\x32\x1d.ray.rpc.DeleteObjectsRequestR\rdeleteRequest\"C\n\x11SpillObjectsReply\x12.\n\x13spilled_objects_url\x18\x01 \x03(\tR\x11spilledObjectsUrl\"\x81\x01\n\x1cRestoreSpilledObjectsRequest\x12.\n\x13spilled_objects_url\x18\x01 \x03(\tR\x11spilledObjectsUrl\x12\x31\n\x15object_ids_to_restore\x18\x02 \x03(\x0cR\x12objectIdsToRestore\"N\n\x1aRestoreSpilledObjectsReply\x12\x30\n\x14\x62ytes_restored_total\x18\x01 \x01(\x03R\x12\x62ytesRestoredTotal\"M\n\x1b\x44\x65leteSpilledObjectsRequest\x12.\n\x13spilled_objects_url\x18\x01 \x03(\tR\x11spilledObjectsUrl\"\x1b\n\x19\x44\x65leteSpilledObjectsReply\",\n\x0b\x45xitRequest\x12\x1d\n\nforce_exit\x18\x01 \x01(\x08R\tforceExit\"%\n\tExitReply\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\"\xe4\x01\n\x18\x41ssignObjectOwnerRequest\x12\x1b\n\tobject_id\x18\x01 \x01(\x0cR\x08objectId\x12\x1f\n\x0bobject_size\x18\x02 \x01(\x04R\nobjectSize\x12\x30\n\x14\x63ontained_object_ids\x18\x03 \x03(\x0cR\x12\x63ontainedObjectIds\x12;\n\x10\x62orrower_address\x18\x04 \x01(\x0b\x32\x10.ray.rpc.AddressR\x0f\x62orrowerAddress\x12\x1b\n\tcall_site\x18\x05 \x01(\tR\x08\x63\x61llSite\"\x18\n\x16\x41ssignObjectOwnerReply\"\x1f\n\x1dRayletNotifyGCSRestartRequest\"\x1d\n\x1bRayletNotifyGCSRestartReply\"\x18\n\x16NumPendingTasksRequest\"B\n\x14NumPendingTasksReply\x12*\n\x11num_pending_tasks\x18\x01 \x01(\x03R\x0fnumPendingTasks\"5\n\x16\x46reeActorObjectRequest\x12\x1b\n\tobject_id\x18\x01 \x01(\x0cR\x08objectId\"\x16\n\x14\x46reeActorObjectReply\"\x8c\x02\n!ReportGeneratorItemReturnsRequest\x12K\n\x16\x64ynamic_return_objects\x18\x01 \x03(\x0b\x32\x15.ray.rpc.ReturnObjectR\x14\x64ynamicReturnObjects\x12\x31\n\x0bworker_addr\x18\x02 \x01(\x0b\x32\x10.ray.rpc.AddressR\nworkerAddr\x12\x1d\n\nitem_index\x18\x03 \x01(\x03R\titemIndex\x12!\n\x0cgenerator_id\x18\x05 \x01(\x0cR\x0bgeneratorId\x12%\n\x0e\x61ttempt_number\x18\x06 \x01(\x04R\rattemptNumber\"\\\n\x1fReportGeneratorItemReturnsReply\x12\x39\n\x19total_num_object_consumed\x18\x01 \x01(\x03R\x16totalNumObjectConsumed\"\x99\x01\n\"RegisterMutableObjectReaderRequest\x12(\n\x10writer_object_id\x18\x01 \x01(\x0cR\x0ewriterObjectId\x12\x1f\n\x0bnum_readers\x18\x02 \x01(\x03R\nnumReaders\x12(\n\x10reader_object_id\x18\x03 \x01(\x0cR\x0ereaderObjectId\"\"\n RegisterMutableObjectReaderReply*4\n\x1aObjectPlasmaLocationUpdate\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x00\x12\x0b\n\x07REMOVED\x10\x01\x32\xb8\x11\n\x11\x43oreWorkerService\x12\x66\n\x16RayletNotifyGCSRestart\x12&.ray.rpc.RayletNotifyGCSRestartRequest\x1a$.ray.rpc.RayletNotifyGCSRestartReply\x12<\n\x08PushTask\x12\x18.ray.rpc.PushTaskRequest\x1a\x16.ray.rpc.PushTaskReply\x12l\n\x18\x41\x63torCallArgWaitComplete\x12(.ray.rpc.ActorCallArgWaitCompleteRequest\x1a&.ray.rpc.ActorCallArgWaitCompleteReply\x12Q\n\x0fGetObjectStatus\x12\x1f.ray.rpc.GetObjectStatusRequest\x1a\x1d.ray.rpc.GetObjectStatusReply\x12\x66\n\x16WaitForActorRefDeleted\x12&.ray.rpc.WaitForActorRefDeletedRequest\x1a$.ray.rpc.WaitForActorRefDeletedReply\x12W\n\x11PubsubLongPolling\x12!.ray.rpc.PubsubLongPollingRequest\x1a\x1f.ray.rpc.PubsubLongPollingReply\x12r\n\x1aReportGeneratorItemReturns\x12*.ray.rpc.ReportGeneratorItemReturnsRequest\x1a(.ray.rpc.ReportGeneratorItemReturnsReply\x12Z\n\x12PubsubCommandBatch\x12\".ray.rpc.PubsubCommandBatchRequest\x1a .ray.rpc.PubsubCommandBatchReply\x12o\n\x19UpdateObjectLocationBatch\x12).ray.rpc.UpdateObjectLocationBatchRequest\x1a\'.ray.rpc.UpdateObjectLocationBatchReply\x12i\n\x17GetObjectLocationsOwner\x12\'.ray.rpc.GetObjectLocationsOwnerRequest\x1a%.ray.rpc.GetObjectLocationsOwnerReply\x12?\n\tKillActor\x12\x19.ray.rpc.KillActorRequest\x1a\x17.ray.rpc.KillActorReply\x12\x42\n\nCancelTask\x12\x1a.ray.rpc.CancelTaskRequest\x1a\x18.ray.rpc.CancelTaskReply\x12T\n\x10RemoteCancelTask\x12 .ray.rpc.RemoteCancelTaskRequest\x1a\x1e.ray.rpc.RemoteCancelTaskReply\x12Z\n\x12GetCoreWorkerStats\x12\".ray.rpc.GetCoreWorkerStatsRequest\x1a .ray.rpc.GetCoreWorkerStatsReply\x12\x39\n\x07LocalGC\x12\x17.ray.rpc.LocalGCRequest\x1a\x15.ray.rpc.LocalGCReply\x12K\n\rDeleteObjects\x12\x1d.ray.rpc.DeleteObjectsRequest\x1a\x1b.ray.rpc.DeleteObjectsReply\x12H\n\x0cSpillObjects\x12\x1c.ray.rpc.SpillObjectsRequest\x1a\x1a.ray.rpc.SpillObjectsReply\x12\x63\n\x15RestoreSpilledObjects\x12%.ray.rpc.RestoreSpilledObjectsRequest\x1a#.ray.rpc.RestoreSpilledObjectsReply\x12`\n\x14\x44\x65leteSpilledObjects\x12$.ray.rpc.DeleteSpilledObjectsRequest\x1a\".ray.rpc.DeleteSpilledObjectsReply\x12W\n\x11PlasmaObjectReady\x12!.ray.rpc.PlasmaObjectReadyRequest\x1a\x1f.ray.rpc.PlasmaObjectReadyReply\x12\x30\n\x04\x45xit\x12\x14.ray.rpc.ExitRequest\x1a\x12.ray.rpc.ExitReply\x12W\n\x11\x41ssignObjectOwner\x12!.ray.rpc.AssignObjectOwnerRequest\x1a\x1f.ray.rpc.AssignObjectOwnerReply\x12Q\n\x0fNumPendingTasks\x12\x1f.ray.rpc.NumPendingTasksRequest\x1a\x1d.ray.rpc.NumPendingTasksReply\x12Q\n\x0f\x46reeActorObject\x12\x1f.ray.rpc.FreeActorObjectRequest\x1a\x1d.ray.rpc.FreeActorObjectReply\x12u\n\x1bRegisterMutableObjectReader\x12+.ray.rpc.RegisterMutableObjectReaderRequest\x1a).ray.rpc.RegisterMutableObjectReaderReplyb\x06proto3') + +_OBJECTPLASMALOCATIONUPDATE = DESCRIPTOR.enum_types_by_name['ObjectPlasmaLocationUpdate'] +ObjectPlasmaLocationUpdate = enum_type_wrapper.EnumTypeWrapper(_OBJECTPLASMALOCATIONUPDATE) +ADDED = 0 +REMOVED = 1 + + +_ACTIVEOBJECTIDS = DESCRIPTOR.message_types_by_name['ActiveObjectIDs'] +_ACTORHANDLE = DESCRIPTOR.message_types_by_name['ActorHandle'] +_ACTORHANDLE_LABELSENTRY = _ACTORHANDLE.nested_types_by_name['LabelsEntry'] +_PUSHTASKREQUEST = DESCRIPTOR.message_types_by_name['PushTaskRequest'] +_PUSHTASKREPLY = DESCRIPTOR.message_types_by_name['PushTaskReply'] +_ACTORCALLARGWAITCOMPLETEREQUEST = DESCRIPTOR.message_types_by_name['ActorCallArgWaitCompleteRequest'] +_ACTORCALLARGWAITCOMPLETEREPLY = DESCRIPTOR.message_types_by_name['ActorCallArgWaitCompleteReply'] +_GETOBJECTSTATUSREQUEST = DESCRIPTOR.message_types_by_name['GetObjectStatusRequest'] +_RAYOBJECT = DESCRIPTOR.message_types_by_name['RayObject'] +_GETOBJECTSTATUSREPLY = DESCRIPTOR.message_types_by_name['GetObjectStatusReply'] +_WAITFORACTORREFDELETEDREQUEST = DESCRIPTOR.message_types_by_name['WaitForActorRefDeletedRequest'] +_WAITFORACTORREFDELETEDREPLY = DESCRIPTOR.message_types_by_name['WaitForActorRefDeletedReply'] +_UPDATEOBJECTLOCATIONBATCHREQUEST = DESCRIPTOR.message_types_by_name['UpdateObjectLocationBatchRequest'] +_UPDATEOBJECTLOCATIONBATCHREPLY = DESCRIPTOR.message_types_by_name['UpdateObjectLocationBatchReply'] +_OBJECTSPILLEDLOCATIONUPDATE = DESCRIPTOR.message_types_by_name['ObjectSpilledLocationUpdate'] +_OBJECTLOCATIONUPDATE = DESCRIPTOR.message_types_by_name['ObjectLocationUpdate'] +_GETOBJECTLOCATIONSOWNERREQUEST = DESCRIPTOR.message_types_by_name['GetObjectLocationsOwnerRequest'] +_GETOBJECTLOCATIONSOWNERREPLY = DESCRIPTOR.message_types_by_name['GetObjectLocationsOwnerReply'] +_KILLACTORREQUEST = DESCRIPTOR.message_types_by_name['KillActorRequest'] +_KILLACTORREPLY = DESCRIPTOR.message_types_by_name['KillActorReply'] +_CANCELTASKREQUEST = DESCRIPTOR.message_types_by_name['CancelTaskRequest'] +_CANCELTASKREPLY = DESCRIPTOR.message_types_by_name['CancelTaskReply'] +_REMOTECANCELTASKREQUEST = DESCRIPTOR.message_types_by_name['RemoteCancelTaskRequest'] +_REMOTECANCELTASKREPLY = DESCRIPTOR.message_types_by_name['RemoteCancelTaskReply'] +_GETCOREWORKERSTATSREQUEST = DESCRIPTOR.message_types_by_name['GetCoreWorkerStatsRequest'] +_GETCOREWORKERSTATSREPLY = DESCRIPTOR.message_types_by_name['GetCoreWorkerStatsReply'] +_LOCALGCREQUEST = DESCRIPTOR.message_types_by_name['LocalGCRequest'] +_LOCALGCREPLY = DESCRIPTOR.message_types_by_name['LocalGCReply'] +_PLASMAOBJECTREADYREQUEST = DESCRIPTOR.message_types_by_name['PlasmaObjectReadyRequest'] +_PLASMAOBJECTREADYREPLY = DESCRIPTOR.message_types_by_name['PlasmaObjectReadyReply'] +_DELETEOBJECTSREQUEST = DESCRIPTOR.message_types_by_name['DeleteObjectsRequest'] +_DELETEOBJECTSREPLY = DESCRIPTOR.message_types_by_name['DeleteObjectsReply'] +_SPILLOBJECTSREQUEST = DESCRIPTOR.message_types_by_name['SpillObjectsRequest'] +_SPILLOBJECTSREPLY = DESCRIPTOR.message_types_by_name['SpillObjectsReply'] +_RESTORESPILLEDOBJECTSREQUEST = DESCRIPTOR.message_types_by_name['RestoreSpilledObjectsRequest'] +_RESTORESPILLEDOBJECTSREPLY = DESCRIPTOR.message_types_by_name['RestoreSpilledObjectsReply'] +_DELETESPILLEDOBJECTSREQUEST = DESCRIPTOR.message_types_by_name['DeleteSpilledObjectsRequest'] +_DELETESPILLEDOBJECTSREPLY = DESCRIPTOR.message_types_by_name['DeleteSpilledObjectsReply'] +_EXITREQUEST = DESCRIPTOR.message_types_by_name['ExitRequest'] +_EXITREPLY = DESCRIPTOR.message_types_by_name['ExitReply'] +_ASSIGNOBJECTOWNERREQUEST = DESCRIPTOR.message_types_by_name['AssignObjectOwnerRequest'] +_ASSIGNOBJECTOWNERREPLY = DESCRIPTOR.message_types_by_name['AssignObjectOwnerReply'] +_RAYLETNOTIFYGCSRESTARTREQUEST = DESCRIPTOR.message_types_by_name['RayletNotifyGCSRestartRequest'] +_RAYLETNOTIFYGCSRESTARTREPLY = DESCRIPTOR.message_types_by_name['RayletNotifyGCSRestartReply'] +_NUMPENDINGTASKSREQUEST = DESCRIPTOR.message_types_by_name['NumPendingTasksRequest'] +_NUMPENDINGTASKSREPLY = DESCRIPTOR.message_types_by_name['NumPendingTasksReply'] +_FREEACTOROBJECTREQUEST = DESCRIPTOR.message_types_by_name['FreeActorObjectRequest'] +_FREEACTOROBJECTREPLY = DESCRIPTOR.message_types_by_name['FreeActorObjectReply'] +_REPORTGENERATORITEMRETURNSREQUEST = DESCRIPTOR.message_types_by_name['ReportGeneratorItemReturnsRequest'] +_REPORTGENERATORITEMRETURNSREPLY = DESCRIPTOR.message_types_by_name['ReportGeneratorItemReturnsReply'] +_REGISTERMUTABLEOBJECTREADERREQUEST = DESCRIPTOR.message_types_by_name['RegisterMutableObjectReaderRequest'] +_REGISTERMUTABLEOBJECTREADERREPLY = DESCRIPTOR.message_types_by_name['RegisterMutableObjectReaderReply'] +_GETOBJECTSTATUSREPLY_OBJECTSTATUS = _GETOBJECTSTATUSREPLY.enum_types_by_name['ObjectStatus'] +ActiveObjectIDs = _reflection.GeneratedProtocolMessageType('ActiveObjectIDs', (_message.Message,), { + 'DESCRIPTOR' : _ACTIVEOBJECTIDS, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActiveObjectIDs) + }) +_sym_db.RegisterMessage(ActiveObjectIDs) + +ActorHandle = _reflection.GeneratedProtocolMessageType('ActorHandle', (_message.Message,), { + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _ACTORHANDLE_LABELSENTRY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorHandle.LabelsEntry) + }) + , + 'DESCRIPTOR' : _ACTORHANDLE, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorHandle) + }) +_sym_db.RegisterMessage(ActorHandle) +_sym_db.RegisterMessage(ActorHandle.LabelsEntry) + +PushTaskRequest = _reflection.GeneratedProtocolMessageType('PushTaskRequest', (_message.Message,), { + 'DESCRIPTOR' : _PUSHTASKREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PushTaskRequest) + }) +_sym_db.RegisterMessage(PushTaskRequest) + +PushTaskReply = _reflection.GeneratedProtocolMessageType('PushTaskReply', (_message.Message,), { + 'DESCRIPTOR' : _PUSHTASKREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PushTaskReply) + }) +_sym_db.RegisterMessage(PushTaskReply) + +ActorCallArgWaitCompleteRequest = _reflection.GeneratedProtocolMessageType('ActorCallArgWaitCompleteRequest', (_message.Message,), { + 'DESCRIPTOR' : _ACTORCALLARGWAITCOMPLETEREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorCallArgWaitCompleteRequest) + }) +_sym_db.RegisterMessage(ActorCallArgWaitCompleteRequest) + +ActorCallArgWaitCompleteReply = _reflection.GeneratedProtocolMessageType('ActorCallArgWaitCompleteReply', (_message.Message,), { + 'DESCRIPTOR' : _ACTORCALLARGWAITCOMPLETEREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorCallArgWaitCompleteReply) + }) +_sym_db.RegisterMessage(ActorCallArgWaitCompleteReply) + +GetObjectStatusRequest = _reflection.GeneratedProtocolMessageType('GetObjectStatusRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETOBJECTSTATUSREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetObjectStatusRequest) + }) +_sym_db.RegisterMessage(GetObjectStatusRequest) + +RayObject = _reflection.GeneratedProtocolMessageType('RayObject', (_message.Message,), { + 'DESCRIPTOR' : _RAYOBJECT, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RayObject) + }) +_sym_db.RegisterMessage(RayObject) + +GetObjectStatusReply = _reflection.GeneratedProtocolMessageType('GetObjectStatusReply', (_message.Message,), { + 'DESCRIPTOR' : _GETOBJECTSTATUSREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetObjectStatusReply) + }) +_sym_db.RegisterMessage(GetObjectStatusReply) + +WaitForActorRefDeletedRequest = _reflection.GeneratedProtocolMessageType('WaitForActorRefDeletedRequest', (_message.Message,), { + 'DESCRIPTOR' : _WAITFORACTORREFDELETEDREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WaitForActorRefDeletedRequest) + }) +_sym_db.RegisterMessage(WaitForActorRefDeletedRequest) + +WaitForActorRefDeletedReply = _reflection.GeneratedProtocolMessageType('WaitForActorRefDeletedReply', (_message.Message,), { + 'DESCRIPTOR' : _WAITFORACTORREFDELETEDREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WaitForActorRefDeletedReply) + }) +_sym_db.RegisterMessage(WaitForActorRefDeletedReply) + +UpdateObjectLocationBatchRequest = _reflection.GeneratedProtocolMessageType('UpdateObjectLocationBatchRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEOBJECTLOCATIONBATCHREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UpdateObjectLocationBatchRequest) + }) +_sym_db.RegisterMessage(UpdateObjectLocationBatchRequest) + +UpdateObjectLocationBatchReply = _reflection.GeneratedProtocolMessageType('UpdateObjectLocationBatchReply', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEOBJECTLOCATIONBATCHREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UpdateObjectLocationBatchReply) + }) +_sym_db.RegisterMessage(UpdateObjectLocationBatchReply) + +ObjectSpilledLocationUpdate = _reflection.GeneratedProtocolMessageType('ObjectSpilledLocationUpdate', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTSPILLEDLOCATIONUPDATE, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ObjectSpilledLocationUpdate) + }) +_sym_db.RegisterMessage(ObjectSpilledLocationUpdate) + +ObjectLocationUpdate = _reflection.GeneratedProtocolMessageType('ObjectLocationUpdate', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTLOCATIONUPDATE, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ObjectLocationUpdate) + }) +_sym_db.RegisterMessage(ObjectLocationUpdate) + +GetObjectLocationsOwnerRequest = _reflection.GeneratedProtocolMessageType('GetObjectLocationsOwnerRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETOBJECTLOCATIONSOWNERREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetObjectLocationsOwnerRequest) + }) +_sym_db.RegisterMessage(GetObjectLocationsOwnerRequest) + +GetObjectLocationsOwnerReply = _reflection.GeneratedProtocolMessageType('GetObjectLocationsOwnerReply', (_message.Message,), { + 'DESCRIPTOR' : _GETOBJECTLOCATIONSOWNERREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetObjectLocationsOwnerReply) + }) +_sym_db.RegisterMessage(GetObjectLocationsOwnerReply) + +KillActorRequest = _reflection.GeneratedProtocolMessageType('KillActorRequest', (_message.Message,), { + 'DESCRIPTOR' : _KILLACTORREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KillActorRequest) + }) +_sym_db.RegisterMessage(KillActorRequest) + +KillActorReply = _reflection.GeneratedProtocolMessageType('KillActorReply', (_message.Message,), { + 'DESCRIPTOR' : _KILLACTORREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KillActorReply) + }) +_sym_db.RegisterMessage(KillActorReply) + +CancelTaskRequest = _reflection.GeneratedProtocolMessageType('CancelTaskRequest', (_message.Message,), { + 'DESCRIPTOR' : _CANCELTASKREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelTaskRequest) + }) +_sym_db.RegisterMessage(CancelTaskRequest) + +CancelTaskReply = _reflection.GeneratedProtocolMessageType('CancelTaskReply', (_message.Message,), { + 'DESCRIPTOR' : _CANCELTASKREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelTaskReply) + }) +_sym_db.RegisterMessage(CancelTaskReply) + +RemoteCancelTaskRequest = _reflection.GeneratedProtocolMessageType('RemoteCancelTaskRequest', (_message.Message,), { + 'DESCRIPTOR' : _REMOTECANCELTASKREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RemoteCancelTaskRequest) + }) +_sym_db.RegisterMessage(RemoteCancelTaskRequest) + +RemoteCancelTaskReply = _reflection.GeneratedProtocolMessageType('RemoteCancelTaskReply', (_message.Message,), { + 'DESCRIPTOR' : _REMOTECANCELTASKREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RemoteCancelTaskReply) + }) +_sym_db.RegisterMessage(RemoteCancelTaskReply) + +GetCoreWorkerStatsRequest = _reflection.GeneratedProtocolMessageType('GetCoreWorkerStatsRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETCOREWORKERSTATSREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetCoreWorkerStatsRequest) + }) +_sym_db.RegisterMessage(GetCoreWorkerStatsRequest) + +GetCoreWorkerStatsReply = _reflection.GeneratedProtocolMessageType('GetCoreWorkerStatsReply', (_message.Message,), { + 'DESCRIPTOR' : _GETCOREWORKERSTATSREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetCoreWorkerStatsReply) + }) +_sym_db.RegisterMessage(GetCoreWorkerStatsReply) + +LocalGCRequest = _reflection.GeneratedProtocolMessageType('LocalGCRequest', (_message.Message,), { + 'DESCRIPTOR' : _LOCALGCREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LocalGCRequest) + }) +_sym_db.RegisterMessage(LocalGCRequest) + +LocalGCReply = _reflection.GeneratedProtocolMessageType('LocalGCReply', (_message.Message,), { + 'DESCRIPTOR' : _LOCALGCREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LocalGCReply) + }) +_sym_db.RegisterMessage(LocalGCReply) + +PlasmaObjectReadyRequest = _reflection.GeneratedProtocolMessageType('PlasmaObjectReadyRequest', (_message.Message,), { + 'DESCRIPTOR' : _PLASMAOBJECTREADYREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PlasmaObjectReadyRequest) + }) +_sym_db.RegisterMessage(PlasmaObjectReadyRequest) + +PlasmaObjectReadyReply = _reflection.GeneratedProtocolMessageType('PlasmaObjectReadyReply', (_message.Message,), { + 'DESCRIPTOR' : _PLASMAOBJECTREADYREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PlasmaObjectReadyReply) + }) +_sym_db.RegisterMessage(PlasmaObjectReadyReply) + +DeleteObjectsRequest = _reflection.GeneratedProtocolMessageType('DeleteObjectsRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETEOBJECTSREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DeleteObjectsRequest) + }) +_sym_db.RegisterMessage(DeleteObjectsRequest) + +DeleteObjectsReply = _reflection.GeneratedProtocolMessageType('DeleteObjectsReply', (_message.Message,), { + 'DESCRIPTOR' : _DELETEOBJECTSREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DeleteObjectsReply) + }) +_sym_db.RegisterMessage(DeleteObjectsReply) + +SpillObjectsRequest = _reflection.GeneratedProtocolMessageType('SpillObjectsRequest', (_message.Message,), { + 'DESCRIPTOR' : _SPILLOBJECTSREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.SpillObjectsRequest) + }) +_sym_db.RegisterMessage(SpillObjectsRequest) + +SpillObjectsReply = _reflection.GeneratedProtocolMessageType('SpillObjectsReply', (_message.Message,), { + 'DESCRIPTOR' : _SPILLOBJECTSREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.SpillObjectsReply) + }) +_sym_db.RegisterMessage(SpillObjectsReply) + +RestoreSpilledObjectsRequest = _reflection.GeneratedProtocolMessageType('RestoreSpilledObjectsRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESTORESPILLEDOBJECTSREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RestoreSpilledObjectsRequest) + }) +_sym_db.RegisterMessage(RestoreSpilledObjectsRequest) + +RestoreSpilledObjectsReply = _reflection.GeneratedProtocolMessageType('RestoreSpilledObjectsReply', (_message.Message,), { + 'DESCRIPTOR' : _RESTORESPILLEDOBJECTSREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RestoreSpilledObjectsReply) + }) +_sym_db.RegisterMessage(RestoreSpilledObjectsReply) + +DeleteSpilledObjectsRequest = _reflection.GeneratedProtocolMessageType('DeleteSpilledObjectsRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETESPILLEDOBJECTSREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DeleteSpilledObjectsRequest) + }) +_sym_db.RegisterMessage(DeleteSpilledObjectsRequest) + +DeleteSpilledObjectsReply = _reflection.GeneratedProtocolMessageType('DeleteSpilledObjectsReply', (_message.Message,), { + 'DESCRIPTOR' : _DELETESPILLEDOBJECTSREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DeleteSpilledObjectsReply) + }) +_sym_db.RegisterMessage(DeleteSpilledObjectsReply) + +ExitRequest = _reflection.GeneratedProtocolMessageType('ExitRequest', (_message.Message,), { + 'DESCRIPTOR' : _EXITREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExitRequest) + }) +_sym_db.RegisterMessage(ExitRequest) + +ExitReply = _reflection.GeneratedProtocolMessageType('ExitReply', (_message.Message,), { + 'DESCRIPTOR' : _EXITREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExitReply) + }) +_sym_db.RegisterMessage(ExitReply) + +AssignObjectOwnerRequest = _reflection.GeneratedProtocolMessageType('AssignObjectOwnerRequest', (_message.Message,), { + 'DESCRIPTOR' : _ASSIGNOBJECTOWNERREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AssignObjectOwnerRequest) + }) +_sym_db.RegisterMessage(AssignObjectOwnerRequest) + +AssignObjectOwnerReply = _reflection.GeneratedProtocolMessageType('AssignObjectOwnerReply', (_message.Message,), { + 'DESCRIPTOR' : _ASSIGNOBJECTOWNERREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AssignObjectOwnerReply) + }) +_sym_db.RegisterMessage(AssignObjectOwnerReply) + +RayletNotifyGCSRestartRequest = _reflection.GeneratedProtocolMessageType('RayletNotifyGCSRestartRequest', (_message.Message,), { + 'DESCRIPTOR' : _RAYLETNOTIFYGCSRESTARTREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RayletNotifyGCSRestartRequest) + }) +_sym_db.RegisterMessage(RayletNotifyGCSRestartRequest) + +RayletNotifyGCSRestartReply = _reflection.GeneratedProtocolMessageType('RayletNotifyGCSRestartReply', (_message.Message,), { + 'DESCRIPTOR' : _RAYLETNOTIFYGCSRESTARTREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RayletNotifyGCSRestartReply) + }) +_sym_db.RegisterMessage(RayletNotifyGCSRestartReply) + +NumPendingTasksRequest = _reflection.GeneratedProtocolMessageType('NumPendingTasksRequest', (_message.Message,), { + 'DESCRIPTOR' : _NUMPENDINGTASKSREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NumPendingTasksRequest) + }) +_sym_db.RegisterMessage(NumPendingTasksRequest) + +NumPendingTasksReply = _reflection.GeneratedProtocolMessageType('NumPendingTasksReply', (_message.Message,), { + 'DESCRIPTOR' : _NUMPENDINGTASKSREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NumPendingTasksReply) + }) +_sym_db.RegisterMessage(NumPendingTasksReply) + +FreeActorObjectRequest = _reflection.GeneratedProtocolMessageType('FreeActorObjectRequest', (_message.Message,), { + 'DESCRIPTOR' : _FREEACTOROBJECTREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.FreeActorObjectRequest) + }) +_sym_db.RegisterMessage(FreeActorObjectRequest) + +FreeActorObjectReply = _reflection.GeneratedProtocolMessageType('FreeActorObjectReply', (_message.Message,), { + 'DESCRIPTOR' : _FREEACTOROBJECTREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.FreeActorObjectReply) + }) +_sym_db.RegisterMessage(FreeActorObjectReply) + +ReportGeneratorItemReturnsRequest = _reflection.GeneratedProtocolMessageType('ReportGeneratorItemReturnsRequest', (_message.Message,), { + 'DESCRIPTOR' : _REPORTGENERATORITEMRETURNSREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportGeneratorItemReturnsRequest) + }) +_sym_db.RegisterMessage(ReportGeneratorItemReturnsRequest) + +ReportGeneratorItemReturnsReply = _reflection.GeneratedProtocolMessageType('ReportGeneratorItemReturnsReply', (_message.Message,), { + 'DESCRIPTOR' : _REPORTGENERATORITEMRETURNSREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportGeneratorItemReturnsReply) + }) +_sym_db.RegisterMessage(ReportGeneratorItemReturnsReply) + +RegisterMutableObjectReaderRequest = _reflection.GeneratedProtocolMessageType('RegisterMutableObjectReaderRequest', (_message.Message,), { + 'DESCRIPTOR' : _REGISTERMUTABLEOBJECTREADERREQUEST, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RegisterMutableObjectReaderRequest) + }) +_sym_db.RegisterMessage(RegisterMutableObjectReaderRequest) + +RegisterMutableObjectReaderReply = _reflection.GeneratedProtocolMessageType('RegisterMutableObjectReaderReply', (_message.Message,), { + 'DESCRIPTOR' : _REGISTERMUTABLEOBJECTREADERREPLY, + '__module__' : 'src.ray.protobuf.core_worker_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RegisterMutableObjectReaderReply) + }) +_sym_db.RegisterMessage(RegisterMutableObjectReaderReply) + +_COREWORKERSERVICE = DESCRIPTOR.services_by_name['CoreWorkerService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ACTORHANDLE_LABELSENTRY._options = None + _ACTORHANDLE_LABELSENTRY._serialized_options = b'8\001' + _OBJECTPLASMALOCATIONUPDATE._serialized_start=6615 + _OBJECTPLASMALOCATIONUPDATE._serialized_end=6667 + _ACTIVEOBJECTIDS._serialized_start=109 + _ACTIVEOBJECTIDS._serialized_end=157 + _ACTORHANDLE._serialized_start=160 + _ACTORHANDLE._serialized_end=939 + _ACTORHANDLE_LABELSENTRY._serialized_start=882 + _ACTORHANDLE_LABELSENTRY._serialized_end=939 + _PUSHTASKREQUEST._serialized_start=942 + _PUSHTASKREQUEST._serialized_end=1217 + _PUSHTASKREPLY._serialized_start=1220 + _PUSHTASKREPLY._serialized_end=1867 + _ACTORCALLARGWAITCOMPLETEREQUEST._serialized_start=1869 + _ACTORCALLARGWAITCOMPLETEREQUEST._serialized_end=1966 + _ACTORCALLARGWAITCOMPLETEREPLY._serialized_start=1968 + _ACTORCALLARGWAITCOMPLETEREPLY._serialized_end=1999 + _GETOBJECTSTATUSREQUEST._serialized_start=2001 + _GETOBJECTSTATUSREQUEST._serialized_end=2094 + _RAYOBJECT._serialized_start=2097 + _RAYOBJECT._serialized_end=2230 + _GETOBJECTSTATUSREPLY._serialized_start=2233 + _GETOBJECTSTATUSREPLY._serialized_end=2485 + _GETOBJECTSTATUSREPLY_OBJECTSTATUS._serialized_start=2429 + _GETOBJECTSTATUSREPLY_OBJECTSTATUS._serialized_end=2485 + _WAITFORACTORREFDELETEDREQUEST._serialized_start=2487 + _WAITFORACTORREFDELETEDREQUEST._serialized_end=2591 + _WAITFORACTORREFDELETEDREPLY._serialized_start=2593 + _WAITFORACTORREFDELETEDREPLY._serialized_end=2622 + _UPDATEOBJECTLOCATIONBATCHREQUEST._serialized_start=2625 + _UPDATEOBJECTLOCATIONBATCHREQUEST._serialized_end=2817 + _UPDATEOBJECTLOCATIONBATCHREPLY._serialized_start=2819 + _UPDATEOBJECTLOCATIONBATCHREPLY._serialized_end=2851 + _OBJECTSPILLEDLOCATIONUPDATE._serialized_start=2853 + _OBJECTSPILLEDLOCATIONUPDATE._serialized_end=2972 + _OBJECTLOCATIONUPDATE._serialized_start=2975 + _OBJECTLOCATIONUPDATE._serialized_end=3333 + _GETOBJECTLOCATIONSOWNERREQUEST._serialized_start=3335 + _GETOBJECTLOCATIONSOWNERREQUEST._serialized_end=3444 + _GETOBJECTLOCATIONSOWNERREPLY._serialized_start=3446 + _GETOBJECTLOCATIONSOWNERREPLY._serialized_end=3570 + _KILLACTORREQUEST._serialized_start=3573 + _KILLACTORREQUEST._serialized_end=3725 + _KILLACTORREPLY._serialized_start=3727 + _KILLACTORREPLY._serialized_end=3743 + _CANCELTASKREQUEST._serialized_start=3746 + _CANCELTASKREQUEST._serialized_end=3910 + _CANCELTASKREPLY._serialized_start=3912 + _CANCELTASKREPLY._serialized_end=4028 + _REMOTECANCELTASKREQUEST._serialized_start=4031 + _REMOTECANCELTASKREQUEST._serialized_end=4159 + _REMOTECANCELTASKREPLY._serialized_start=4161 + _REMOTECANCELTASKREPLY._serialized_end=4184 + _GETCOREWORKERSTATSREQUEST._serialized_start=4187 + _GETCOREWORKERSTATSREQUEST._serialized_end=4389 + _GETCOREWORKERSTATSREPLY._serialized_start=4392 + _GETCOREWORKERSTATSREPLY._serialized_end=4641 + _LOCALGCREQUEST._serialized_start=4643 + _LOCALGCREQUEST._serialized_end=4712 + _LOCALGCREPLY._serialized_start=4714 + _LOCALGCREPLY._serialized_end=4728 + _PLASMAOBJECTREADYREQUEST._serialized_start=4730 + _PLASMAOBJECTREADYREQUEST._serialized_end=4785 + _PLASMAOBJECTREADYREPLY._serialized_start=4787 + _PLASMAOBJECTREADYREPLY._serialized_end=4811 + _DELETEOBJECTSREQUEST._serialized_start=4813 + _DELETEOBJECTSREQUEST._serialized_end=4897 + _DELETEOBJECTSREPLY._serialized_start=4899 + _DELETEOBJECTSREPLY._serialized_end=4919 + _SPILLOBJECTSREQUEST._serialized_start=4922 + _SPILLOBJECTSREQUEST._serialized_end=5088 + _SPILLOBJECTSREPLY._serialized_start=5090 + _SPILLOBJECTSREPLY._serialized_end=5157 + _RESTORESPILLEDOBJECTSREQUEST._serialized_start=5160 + _RESTORESPILLEDOBJECTSREQUEST._serialized_end=5289 + _RESTORESPILLEDOBJECTSREPLY._serialized_start=5291 + _RESTORESPILLEDOBJECTSREPLY._serialized_end=5369 + _DELETESPILLEDOBJECTSREQUEST._serialized_start=5371 + _DELETESPILLEDOBJECTSREQUEST._serialized_end=5448 + _DELETESPILLEDOBJECTSREPLY._serialized_start=5450 + _DELETESPILLEDOBJECTSREPLY._serialized_end=5477 + _EXITREQUEST._serialized_start=5479 + _EXITREQUEST._serialized_end=5523 + _EXITREPLY._serialized_start=5525 + _EXITREPLY._serialized_end=5562 + _ASSIGNOBJECTOWNERREQUEST._serialized_start=5565 + _ASSIGNOBJECTOWNERREQUEST._serialized_end=5793 + _ASSIGNOBJECTOWNERREPLY._serialized_start=5795 + _ASSIGNOBJECTOWNERREPLY._serialized_end=5819 + _RAYLETNOTIFYGCSRESTARTREQUEST._serialized_start=5821 + _RAYLETNOTIFYGCSRESTARTREQUEST._serialized_end=5852 + _RAYLETNOTIFYGCSRESTARTREPLY._serialized_start=5854 + _RAYLETNOTIFYGCSRESTARTREPLY._serialized_end=5883 + _NUMPENDINGTASKSREQUEST._serialized_start=5885 + _NUMPENDINGTASKSREQUEST._serialized_end=5909 + _NUMPENDINGTASKSREPLY._serialized_start=5911 + _NUMPENDINGTASKSREPLY._serialized_end=5977 + _FREEACTOROBJECTREQUEST._serialized_start=5979 + _FREEACTOROBJECTREQUEST._serialized_end=6032 + _FREEACTOROBJECTREPLY._serialized_start=6034 + _FREEACTOROBJECTREPLY._serialized_end=6056 + _REPORTGENERATORITEMRETURNSREQUEST._serialized_start=6059 + _REPORTGENERATORITEMRETURNSREQUEST._serialized_end=6327 + _REPORTGENERATORITEMRETURNSREPLY._serialized_start=6329 + _REPORTGENERATORITEMRETURNSREPLY._serialized_end=6421 + _REGISTERMUTABLEOBJECTREADERREQUEST._serialized_start=6424 + _REGISTERMUTABLEOBJECTREADERREQUEST._serialized_end=6577 + _REGISTERMUTABLEOBJECTREADERREPLY._serialized_start=6579 + _REGISTERMUTABLEOBJECTREADERREPLY._serialized_end=6613 + _COREWORKERSERVICE._serialized_start=6670 + _COREWORKERSERVICE._serialized_end=8902 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/core_worker_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/core_worker_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..e0710ca10a9e0556f453a0130771958360ddab41 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/core_worker_pb2_grpc.py @@ -0,0 +1,859 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import core_worker_pb2 as src_dot_ray_dot_protobuf_dot_core__worker__pb2 +from . import pubsub_pb2 as src_dot_ray_dot_protobuf_dot_pubsub__pb2 + + +class CoreWorkerServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.RayletNotifyGCSRestart = channel.unary_unary( + '/ray.rpc.CoreWorkerService/RayletNotifyGCSRestart', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RayletNotifyGCSRestartRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RayletNotifyGCSRestartReply.FromString, + ) + self.PushTask = channel.unary_unary( + '/ray.rpc.CoreWorkerService/PushTask', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.PushTaskRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.PushTaskReply.FromString, + ) + self.ActorCallArgWaitComplete = channel.unary_unary( + '/ray.rpc.CoreWorkerService/ActorCallArgWaitComplete', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ActorCallArgWaitCompleteRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ActorCallArgWaitCompleteReply.FromString, + ) + self.GetObjectStatus = channel.unary_unary( + '/ray.rpc.CoreWorkerService/GetObjectStatus', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectStatusRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectStatusReply.FromString, + ) + self.WaitForActorRefDeleted = channel.unary_unary( + '/ray.rpc.CoreWorkerService/WaitForActorRefDeleted', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.WaitForActorRefDeletedRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.WaitForActorRefDeletedReply.FromString, + ) + self.PubsubLongPolling = channel.unary_unary( + '/ray.rpc.CoreWorkerService/PubsubLongPolling', + request_serializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingReply.FromString, + ) + self.ReportGeneratorItemReturns = channel.unary_unary( + '/ray.rpc.CoreWorkerService/ReportGeneratorItemReturns', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ReportGeneratorItemReturnsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ReportGeneratorItemReturnsReply.FromString, + ) + self.PubsubCommandBatch = channel.unary_unary( + '/ray.rpc.CoreWorkerService/PubsubCommandBatch', + request_serializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchReply.FromString, + ) + self.UpdateObjectLocationBatch = channel.unary_unary( + '/ray.rpc.CoreWorkerService/UpdateObjectLocationBatch', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.UpdateObjectLocationBatchRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.UpdateObjectLocationBatchReply.FromString, + ) + self.GetObjectLocationsOwner = channel.unary_unary( + '/ray.rpc.CoreWorkerService/GetObjectLocationsOwner', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectLocationsOwnerRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectLocationsOwnerReply.FromString, + ) + self.KillActor = channel.unary_unary( + '/ray.rpc.CoreWorkerService/KillActor', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.KillActorRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.KillActorReply.FromString, + ) + self.CancelTask = channel.unary_unary( + '/ray.rpc.CoreWorkerService/CancelTask', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.CancelTaskRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.CancelTaskReply.FromString, + ) + self.RemoteCancelTask = channel.unary_unary( + '/ray.rpc.CoreWorkerService/RemoteCancelTask', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RemoteCancelTaskRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RemoteCancelTaskReply.FromString, + ) + self.GetCoreWorkerStats = channel.unary_unary( + '/ray.rpc.CoreWorkerService/GetCoreWorkerStats', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetCoreWorkerStatsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetCoreWorkerStatsReply.FromString, + ) + self.LocalGC = channel.unary_unary( + '/ray.rpc.CoreWorkerService/LocalGC', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.LocalGCRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.LocalGCReply.FromString, + ) + self.DeleteObjects = channel.unary_unary( + '/ray.rpc.CoreWorkerService/DeleteObjects', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteObjectsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteObjectsReply.FromString, + ) + self.SpillObjects = channel.unary_unary( + '/ray.rpc.CoreWorkerService/SpillObjects', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.SpillObjectsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.SpillObjectsReply.FromString, + ) + self.RestoreSpilledObjects = channel.unary_unary( + '/ray.rpc.CoreWorkerService/RestoreSpilledObjects', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RestoreSpilledObjectsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RestoreSpilledObjectsReply.FromString, + ) + self.DeleteSpilledObjects = channel.unary_unary( + '/ray.rpc.CoreWorkerService/DeleteSpilledObjects', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteSpilledObjectsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteSpilledObjectsReply.FromString, + ) + self.PlasmaObjectReady = channel.unary_unary( + '/ray.rpc.CoreWorkerService/PlasmaObjectReady', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.PlasmaObjectReadyRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.PlasmaObjectReadyReply.FromString, + ) + self.Exit = channel.unary_unary( + '/ray.rpc.CoreWorkerService/Exit', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ExitRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ExitReply.FromString, + ) + self.AssignObjectOwner = channel.unary_unary( + '/ray.rpc.CoreWorkerService/AssignObjectOwner', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.AssignObjectOwnerRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.AssignObjectOwnerReply.FromString, + ) + self.NumPendingTasks = channel.unary_unary( + '/ray.rpc.CoreWorkerService/NumPendingTasks', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.NumPendingTasksRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.NumPendingTasksReply.FromString, + ) + self.FreeActorObject = channel.unary_unary( + '/ray.rpc.CoreWorkerService/FreeActorObject', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.FreeActorObjectRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.FreeActorObjectReply.FromString, + ) + self.RegisterMutableObjectReader = channel.unary_unary( + '/ray.rpc.CoreWorkerService/RegisterMutableObjectReader', + request_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RegisterMutableObjectReaderRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RegisterMutableObjectReaderReply.FromString, + ) + + +class CoreWorkerServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def RayletNotifyGCSRestart(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PushTask(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ActorCallArgWaitComplete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetObjectStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def WaitForActorRefDeleted(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PubsubLongPolling(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReportGeneratorItemReturns(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PubsubCommandBatch(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateObjectLocationBatch(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetObjectLocationsOwner(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def KillActor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CancelTask(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoteCancelTask(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetCoreWorkerStats(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LocalGC(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteObjects(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SpillObjects(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RestoreSpilledObjects(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteSpilledObjects(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PlasmaObjectReady(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Exit(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AssignObjectOwner(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def NumPendingTasks(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def FreeActorObject(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RegisterMutableObjectReader(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CoreWorkerServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'RayletNotifyGCSRestart': grpc.unary_unary_rpc_method_handler( + servicer.RayletNotifyGCSRestart, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RayletNotifyGCSRestartRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RayletNotifyGCSRestartReply.SerializeToString, + ), + 'PushTask': grpc.unary_unary_rpc_method_handler( + servicer.PushTask, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.PushTaskRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.PushTaskReply.SerializeToString, + ), + 'ActorCallArgWaitComplete': grpc.unary_unary_rpc_method_handler( + servicer.ActorCallArgWaitComplete, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ActorCallArgWaitCompleteRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ActorCallArgWaitCompleteReply.SerializeToString, + ), + 'GetObjectStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetObjectStatus, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectStatusRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectStatusReply.SerializeToString, + ), + 'WaitForActorRefDeleted': grpc.unary_unary_rpc_method_handler( + servicer.WaitForActorRefDeleted, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.WaitForActorRefDeletedRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.WaitForActorRefDeletedReply.SerializeToString, + ), + 'PubsubLongPolling': grpc.unary_unary_rpc_method_handler( + servicer.PubsubLongPolling, + request_deserializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingReply.SerializeToString, + ), + 'ReportGeneratorItemReturns': grpc.unary_unary_rpc_method_handler( + servicer.ReportGeneratorItemReturns, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ReportGeneratorItemReturnsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ReportGeneratorItemReturnsReply.SerializeToString, + ), + 'PubsubCommandBatch': grpc.unary_unary_rpc_method_handler( + servicer.PubsubCommandBatch, + request_deserializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchReply.SerializeToString, + ), + 'UpdateObjectLocationBatch': grpc.unary_unary_rpc_method_handler( + servicer.UpdateObjectLocationBatch, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.UpdateObjectLocationBatchRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.UpdateObjectLocationBatchReply.SerializeToString, + ), + 'GetObjectLocationsOwner': grpc.unary_unary_rpc_method_handler( + servicer.GetObjectLocationsOwner, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectLocationsOwnerRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectLocationsOwnerReply.SerializeToString, + ), + 'KillActor': grpc.unary_unary_rpc_method_handler( + servicer.KillActor, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.KillActorRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.KillActorReply.SerializeToString, + ), + 'CancelTask': grpc.unary_unary_rpc_method_handler( + servicer.CancelTask, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.CancelTaskRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.CancelTaskReply.SerializeToString, + ), + 'RemoteCancelTask': grpc.unary_unary_rpc_method_handler( + servicer.RemoteCancelTask, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RemoteCancelTaskRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RemoteCancelTaskReply.SerializeToString, + ), + 'GetCoreWorkerStats': grpc.unary_unary_rpc_method_handler( + servicer.GetCoreWorkerStats, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetCoreWorkerStatsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetCoreWorkerStatsReply.SerializeToString, + ), + 'LocalGC': grpc.unary_unary_rpc_method_handler( + servicer.LocalGC, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.LocalGCRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.LocalGCReply.SerializeToString, + ), + 'DeleteObjects': grpc.unary_unary_rpc_method_handler( + servicer.DeleteObjects, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteObjectsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteObjectsReply.SerializeToString, + ), + 'SpillObjects': grpc.unary_unary_rpc_method_handler( + servicer.SpillObjects, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.SpillObjectsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.SpillObjectsReply.SerializeToString, + ), + 'RestoreSpilledObjects': grpc.unary_unary_rpc_method_handler( + servicer.RestoreSpilledObjects, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RestoreSpilledObjectsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RestoreSpilledObjectsReply.SerializeToString, + ), + 'DeleteSpilledObjects': grpc.unary_unary_rpc_method_handler( + servicer.DeleteSpilledObjects, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteSpilledObjectsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteSpilledObjectsReply.SerializeToString, + ), + 'PlasmaObjectReady': grpc.unary_unary_rpc_method_handler( + servicer.PlasmaObjectReady, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.PlasmaObjectReadyRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.PlasmaObjectReadyReply.SerializeToString, + ), + 'Exit': grpc.unary_unary_rpc_method_handler( + servicer.Exit, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ExitRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.ExitReply.SerializeToString, + ), + 'AssignObjectOwner': grpc.unary_unary_rpc_method_handler( + servicer.AssignObjectOwner, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.AssignObjectOwnerRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.AssignObjectOwnerReply.SerializeToString, + ), + 'NumPendingTasks': grpc.unary_unary_rpc_method_handler( + servicer.NumPendingTasks, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.NumPendingTasksRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.NumPendingTasksReply.SerializeToString, + ), + 'FreeActorObject': grpc.unary_unary_rpc_method_handler( + servicer.FreeActorObject, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.FreeActorObjectRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.FreeActorObjectReply.SerializeToString, + ), + 'RegisterMutableObjectReader': grpc.unary_unary_rpc_method_handler( + servicer.RegisterMutableObjectReader, + request_deserializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RegisterMutableObjectReaderRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_core__worker__pb2.RegisterMutableObjectReaderReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.CoreWorkerService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CoreWorkerService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def RayletNotifyGCSRestart(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/RayletNotifyGCSRestart', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.RayletNotifyGCSRestartRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.RayletNotifyGCSRestartReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PushTask(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/PushTask', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.PushTaskRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.PushTaskReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ActorCallArgWaitComplete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/ActorCallArgWaitComplete', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.ActorCallArgWaitCompleteRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.ActorCallArgWaitCompleteReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetObjectStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/GetObjectStatus', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectStatusRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectStatusReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def WaitForActorRefDeleted(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/WaitForActorRefDeleted', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.WaitForActorRefDeletedRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.WaitForActorRefDeletedReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PubsubLongPolling(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/PubsubLongPolling', + src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReportGeneratorItemReturns(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/ReportGeneratorItemReturns', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.ReportGeneratorItemReturnsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.ReportGeneratorItemReturnsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PubsubCommandBatch(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/PubsubCommandBatch', + src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateObjectLocationBatch(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/UpdateObjectLocationBatch', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.UpdateObjectLocationBatchRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.UpdateObjectLocationBatchReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetObjectLocationsOwner(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/GetObjectLocationsOwner', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectLocationsOwnerRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetObjectLocationsOwnerReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def KillActor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/KillActor', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.KillActorRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.KillActorReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CancelTask(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/CancelTask', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.CancelTaskRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.CancelTaskReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoteCancelTask(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/RemoteCancelTask', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.RemoteCancelTaskRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.RemoteCancelTaskReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetCoreWorkerStats(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/GetCoreWorkerStats', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetCoreWorkerStatsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.GetCoreWorkerStatsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def LocalGC(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/LocalGC', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.LocalGCRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.LocalGCReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteObjects(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/DeleteObjects', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteObjectsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteObjectsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SpillObjects(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/SpillObjects', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.SpillObjectsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.SpillObjectsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RestoreSpilledObjects(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/RestoreSpilledObjects', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.RestoreSpilledObjectsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.RestoreSpilledObjectsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteSpilledObjects(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/DeleteSpilledObjects', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteSpilledObjectsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.DeleteSpilledObjectsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PlasmaObjectReady(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/PlasmaObjectReady', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.PlasmaObjectReadyRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.PlasmaObjectReadyReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Exit(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/Exit', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.ExitRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.ExitReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AssignObjectOwner(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/AssignObjectOwner', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.AssignObjectOwnerRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.AssignObjectOwnerReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def NumPendingTasks(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/NumPendingTasks', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.NumPendingTasksRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.NumPendingTasksReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def FreeActorObject(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/FreeActorObject', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.FreeActorObjectRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.FreeActorObjectReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RegisterMutableObjectReader(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.CoreWorkerService/RegisterMutableObjectReader', + src_dot_ray_dot_protobuf_dot_core__worker__pb2.RegisterMutableObjectReaderRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_core__worker__pb2.RegisterMutableObjectReaderReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/dependency_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/dependency_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..d917db33407d07f471f5069879183fb6471dab31 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/dependency_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/dependency.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!src/ray/protobuf/dependency.proto\x12\x07ray.rpc\"\"\n\x0ePythonFunction\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03keyb\x06proto3') + + + +_PYTHONFUNCTION = DESCRIPTOR.message_types_by_name['PythonFunction'] +PythonFunction = _reflection.GeneratedProtocolMessageType('PythonFunction', (_message.Message,), { + 'DESCRIPTOR' : _PYTHONFUNCTION, + '__module__' : 'src.ray.protobuf.dependency_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PythonFunction) + }) +_sym_db.RegisterMessage(PythonFunction) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _PYTHONFUNCTION._serialized_start=46 + _PYTHONFUNCTION._serialized_end=80 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/dependency_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/dependency_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/dependency_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/event_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/event_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..0228d9760b5e43d1271e48b1d5b8f34774714614 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/event_pb2.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/event.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1csrc/ray/protobuf/event.proto\x12\x07ray.rpc\"\xf1\x04\n\x05\x45vent\x12\x19\n\x08\x65vent_id\x18\x01 \x01(\tR\x07\x65ventId\x12:\n\x0bsource_type\x18\x02 \x01(\x0e\x32\x19.ray.rpc.Event.SourceTypeR\nsourceType\x12\'\n\x0fsource_hostname\x18\x03 \x01(\tR\x0esourceHostname\x12\x1d\n\nsource_pid\x18\x04 \x01(\x05R\tsourcePid\x12\x33\n\x08severity\x18\x05 \x01(\x0e\x32\x17.ray.rpc.Event.SeverityR\x08severity\x12\x14\n\x05label\x18\x06 \x01(\tR\x05label\x12\x18\n\x07message\x18\x07 \x01(\tR\x07message\x12\x1c\n\ttimestamp\x18\x08 \x01(\x03R\ttimestamp\x12\x45\n\rcustom_fields\x18\t \x03(\x0b\x32 .ray.rpc.Event.CustomFieldsEntryR\x0c\x63ustomFields\x1a?\n\x11\x43ustomFieldsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"o\n\nSourceType\x12\n\n\x06\x43OMMON\x10\x00\x12\x0f\n\x0b\x43ORE_WORKER\x10\x01\x12\x07\n\x03GCS\x10\x02\x12\n\n\x06RAYLET\x10\x03\x12\x15\n\x11\x43LUSTER_LIFECYCLE\x10\x04\x12\x0e\n\nAUTOSCALER\x10\x05\x12\x08\n\x04JOBS\x10\x06\"M\n\x08Severity\x12\x08\n\x04INFO\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\t\n\x05\x46\x41TAL\x10\x03\x12\t\n\x05\x44\x45\x42UG\x10\x04\x12\t\n\x05TRACE\x10\x05\x62\x06proto3') + + + +_EVENT = DESCRIPTOR.message_types_by_name['Event'] +_EVENT_CUSTOMFIELDSENTRY = _EVENT.nested_types_by_name['CustomFieldsEntry'] +_EVENT_SOURCETYPE = _EVENT.enum_types_by_name['SourceType'] +_EVENT_SEVERITY = _EVENT.enum_types_by_name['Severity'] +Event = _reflection.GeneratedProtocolMessageType('Event', (_message.Message,), { + + 'CustomFieldsEntry' : _reflection.GeneratedProtocolMessageType('CustomFieldsEntry', (_message.Message,), { + 'DESCRIPTOR' : _EVENT_CUSTOMFIELDSENTRY, + '__module__' : 'src.ray.protobuf.event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Event.CustomFieldsEntry) + }) + , + 'DESCRIPTOR' : _EVENT, + '__module__' : 'src.ray.protobuf.event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Event) + }) +_sym_db.RegisterMessage(Event) +_sym_db.RegisterMessage(Event.CustomFieldsEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _EVENT_CUSTOMFIELDSENTRY._options = None + _EVENT_CUSTOMFIELDSENTRY._serialized_options = b'8\001' + _EVENT._serialized_start=42 + _EVENT._serialized_end=667 + _EVENT_CUSTOMFIELDSENTRY._serialized_start=412 + _EVENT_CUSTOMFIELDSENTRY._serialized_end=475 + _EVENT_SOURCETYPE._serialized_start=477 + _EVENT_SOURCETYPE._serialized_end=588 + _EVENT_SEVERITY._serialized_start=590 + _EVENT_SEVERITY._serialized_end=667 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/event_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/event_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/event_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_actor_task_definition_event_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_actor_task_definition_event_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..2da9fd8d97d1d43aafdeb63263265cf89c831f4c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_actor_task_definition_event_pb2.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/events_actor_task_definition_event.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import runtime_env_common_pb2 as src_dot_ray_dot_protobuf_dot_runtime__env__common__pb2 +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n9src/ray/protobuf/events_actor_task_definition_event.proto\x12\x0eray.rpc.events\x1a)src/ray/protobuf/runtime_env_common.proto\x1a\x1dsrc/ray/protobuf/common.proto\"\xf2\x05\n\x18\x41\x63torTaskDefinitionEvent\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\x12!\n\x0ctask_attempt\x18\x02 \x01(\x05R\x0btaskAttempt\x12-\n\x08language\x18\x03 \x01(\x0e\x32\x11.ray.rpc.LanguageR\x08language\x12:\n\nactor_func\x18\x04 \x01(\x0b\x32\x1b.ray.rpc.FunctionDescriptorR\tactorFunc\x12&\n\x0f\x61\x63tor_task_name\x18\x05 \x01(\tR\ractorTaskName\x12n\n\x12required_resources\x18\x06 \x03(\x0b\x32?.ray.rpc.events.ActorTaskDefinitionEvent.RequiredResourcesEntryR\x11requiredResources\x12\x41\n\x10runtime_env_info\x18\x07 \x01(\x0b\x32\x17.ray.rpc.RuntimeEnvInfoR\x0eruntimeEnvInfo\x12\x15\n\x06job_id\x18\x08 \x01(\x0cR\x05jobId\x12\x19\n\x08\x61\x63tor_id\x18\t \x01(\x0cR\x07\x61\x63torId\x12$\n\x0eparent_task_id\x18\n \x01(\x0cR\x0cparentTaskId\x12,\n\x12placement_group_id\x18\x0b \x01(\x0cR\x10placementGroupId\x12M\n\x07ref_ids\x18\x0c \x03(\x0b\x32\x34.ray.rpc.events.ActorTaskDefinitionEvent.RefIdsEntryR\x06refIds\x1a\x44\n\x16RequiredResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x39\n\x0bRefIdsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value:\x02\x38\x01\x62\x06proto3') + + + +_ACTORTASKDEFINITIONEVENT = DESCRIPTOR.message_types_by_name['ActorTaskDefinitionEvent'] +_ACTORTASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY = _ACTORTASKDEFINITIONEVENT.nested_types_by_name['RequiredResourcesEntry'] +_ACTORTASKDEFINITIONEVENT_REFIDSENTRY = _ACTORTASKDEFINITIONEVENT.nested_types_by_name['RefIdsEntry'] +ActorTaskDefinitionEvent = _reflection.GeneratedProtocolMessageType('ActorTaskDefinitionEvent', (_message.Message,), { + + 'RequiredResourcesEntry' : _reflection.GeneratedProtocolMessageType('RequiredResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _ACTORTASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.events_actor_task_definition_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.ActorTaskDefinitionEvent.RequiredResourcesEntry) + }) + , + + 'RefIdsEntry' : _reflection.GeneratedProtocolMessageType('RefIdsEntry', (_message.Message,), { + 'DESCRIPTOR' : _ACTORTASKDEFINITIONEVENT_REFIDSENTRY, + '__module__' : 'src.ray.protobuf.events_actor_task_definition_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.ActorTaskDefinitionEvent.RefIdsEntry) + }) + , + 'DESCRIPTOR' : _ACTORTASKDEFINITIONEVENT, + '__module__' : 'src.ray.protobuf.events_actor_task_definition_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.ActorTaskDefinitionEvent) + }) +_sym_db.RegisterMessage(ActorTaskDefinitionEvent) +_sym_db.RegisterMessage(ActorTaskDefinitionEvent.RequiredResourcesEntry) +_sym_db.RegisterMessage(ActorTaskDefinitionEvent.RefIdsEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ACTORTASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY._options = None + _ACTORTASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY._serialized_options = b'8\001' + _ACTORTASKDEFINITIONEVENT_REFIDSENTRY._options = None + _ACTORTASKDEFINITIONEVENT_REFIDSENTRY._serialized_options = b'8\001' + _ACTORTASKDEFINITIONEVENT._serialized_start=152 + _ACTORTASKDEFINITIONEVENT._serialized_end=906 + _ACTORTASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY._serialized_start=779 + _ACTORTASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY._serialized_end=847 + _ACTORTASKDEFINITIONEVENT_REFIDSENTRY._serialized_start=849 + _ACTORTASKDEFINITIONEVENT_REFIDSENTRY._serialized_end=906 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_actor_task_definition_event_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_actor_task_definition_event_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_actor_task_definition_event_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_base_event_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_base_event_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..e319f157389c2ed1b18baeb5d7629c9b3fc274cd --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_base_event_pb2.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/events_base_event.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from . import events_actor_task_definition_event_pb2 as src_dot_ray_dot_protobuf_dot_events__actor__task__definition__event__pb2 +from . import events_task_definition_event_pb2 as src_dot_ray_dot_protobuf_dot_events__task__definition__event__pb2 +from . import events_task_execution_event_pb2 as src_dot_ray_dot_protobuf_dot_events__task__execution__event__pb2 +from . import events_task_profile_events_pb2 as src_dot_ray_dot_protobuf_dot_events__task__profile__events__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(src/ray/protobuf/events_base_event.proto\x12\x0eray.rpc.events\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x39src/ray/protobuf/events_actor_task_definition_event.proto\x1a\x33src/ray/protobuf/events_task_definition_event.proto\x1a\x32src/ray/protobuf/events_task_execution_event.proto\x1a\x31src/ray/protobuf/events_task_profile_events.proto\"\xd9\x08\n\x08RayEvent\x12\x19\n\x08\x65vent_id\x18\x01 \x01(\x0cR\x07\x65ventId\x12\x44\n\x0bsource_type\x18\x02 \x01(\x0e\x32#.ray.rpc.events.RayEvent.SourceTypeR\nsourceType\x12\x41\n\nevent_type\x18\x03 \x01(\x0e\x32\".ray.rpc.events.RayEvent.EventTypeR\teventType\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12=\n\x08severity\x18\x05 \x01(\x0e\x32!.ray.rpc.events.RayEvent.SeverityR\x08severity\x12\x18\n\x07message\x18\x06 \x01(\tR\x07message\x12!\n\x0csession_name\x18\x07 \x01(\tR\x0bsessionName\x12W\n\x15task_definition_event\x18\x08 \x01(\x0b\x32#.ray.rpc.events.TaskDefinitionEventR\x13taskDefinitionEvent\x12T\n\x14task_execution_event\x18\t \x01(\x0b\x32\".ray.rpc.events.TaskExecutionEventR\x12taskExecutionEvent\x12g\n\x1b\x61\x63tor_task_definition_event\x18\n \x01(\x0b\x32(.ray.rpc.events.ActorTaskDefinitionEventR\x18\x61\x63torTaskDefinitionEvent\x12Q\n\x13task_profile_events\x18\x0b \x01(\x0b\x32!.ray.rpc.events.TaskProfileEventsR\x11taskProfileEvents\"\x80\x01\n\nSourceType\x12\x1b\n\x17SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43ORE_WORKER\x10\x01\x12\x07\n\x03GCS\x10\x02\x12\n\n\x06RAYLET\x10\x03\x12\x15\n\x11\x43LUSTER_LIFECYCLE\x10\x04\x12\x0e\n\nAUTOSCALER\x10\x05\x12\x08\n\x04JOBS\x10\x06\"\x95\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15TASK_DEFINITION_EVENT\x10\x01\x12\x18\n\x14TASK_EXECUTION_EVENT\x10\x02\x12\x1f\n\x1b\x41\x43TOR_TASK_DEFINITION_EVENT\x10\x03\x12\x16\n\x12TASK_PROFILE_EVENT\x10\x04\"m\n\x08Severity\x12\x1e\n\x1a\x45VENT_SEVERITY_UNSPECIFIED\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x0b\n\x07WARNING\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\t\n\x05\x46\x41TAL\x10\x06\x62\x06proto3') + + + +_RAYEVENT = DESCRIPTOR.message_types_by_name['RayEvent'] +_RAYEVENT_SOURCETYPE = _RAYEVENT.enum_types_by_name['SourceType'] +_RAYEVENT_EVENTTYPE = _RAYEVENT.enum_types_by_name['EventType'] +_RAYEVENT_SEVERITY = _RAYEVENT.enum_types_by_name['Severity'] +RayEvent = _reflection.GeneratedProtocolMessageType('RayEvent', (_message.Message,), { + 'DESCRIPTOR' : _RAYEVENT, + '__module__' : 'src.ray.protobuf.events_base_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.RayEvent) + }) +_sym_db.RegisterMessage(RayEvent) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _RAYEVENT._serialized_start=309 + _RAYEVENT._serialized_end=1422 + _RAYEVENT_SOURCETYPE._serialized_start=1031 + _RAYEVENT_SOURCETYPE._serialized_end=1159 + _RAYEVENT_EVENTTYPE._serialized_start=1162 + _RAYEVENT_EVENTTYPE._serialized_end=1311 + _RAYEVENT_SEVERITY._serialized_start=1313 + _RAYEVENT_SEVERITY._serialized_end=1422 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_base_event_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_base_event_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_base_event_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_event_aggregator_service_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_event_aggregator_service_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..b1e288b5193151b9301f09e0302ab45349ebc937 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_event_aggregator_service_pb2.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/events_event_aggregator_service.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 +from . import events_base_event_pb2 as src_dot_ray_dot_protobuf_dot_events__base__event__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n6src/ray/protobuf/events_event_aggregator_service.proto\x12\x0eray.rpc.events\x1a\x1dsrc/ray/protobuf/common.proto\x1a(src/ray/protobuf/events_base_event.proto\"^\n\x12TaskEventsMetadata\x12H\n\x15\x64ropped_task_attempts\x18\x02 \x03(\x0b\x32\x14.ray.rpc.TaskAttemptR\x13\x64roppedTaskAttempts\"\x97\x01\n\rRayEventsData\x12\x30\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x18.ray.rpc.events.RayEventR\x06\x65vents\x12T\n\x14task_events_metadata\x18\x02 \x01(\x0b\x32\".ray.rpc.events.TaskEventsMetadataR\x12taskEventsMetadata\"R\n\x10\x41\x64\x64\x45ventsRequest\x12>\n\x0b\x65vents_data\x18\x01 \x01(\x0b\x32\x1d.ray.rpc.events.RayEventsDataR\neventsData\"?\n\x0f\x41\x64\x64\x45ventsStatus\x12\x12\n\x04\x63ode\x18\x01 \x01(\x05R\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\"I\n\x0e\x41\x64\x64\x45ventsReply\x12\x37\n\x06status\x18\x01 \x01(\x0b\x32\x1f.ray.rpc.events.AddEventsStatusR\x06status2g\n\x16\x45ventAggregatorService\x12M\n\tAddEvents\x12 .ray.rpc.events.AddEventsRequest\x1a\x1e.ray.rpc.events.AddEventsReplyb\x06proto3') + + + +_TASKEVENTSMETADATA = DESCRIPTOR.message_types_by_name['TaskEventsMetadata'] +_RAYEVENTSDATA = DESCRIPTOR.message_types_by_name['RayEventsData'] +_ADDEVENTSREQUEST = DESCRIPTOR.message_types_by_name['AddEventsRequest'] +_ADDEVENTSSTATUS = DESCRIPTOR.message_types_by_name['AddEventsStatus'] +_ADDEVENTSREPLY = DESCRIPTOR.message_types_by_name['AddEventsReply'] +TaskEventsMetadata = _reflection.GeneratedProtocolMessageType('TaskEventsMetadata', (_message.Message,), { + 'DESCRIPTOR' : _TASKEVENTSMETADATA, + '__module__' : 'src.ray.protobuf.events_event_aggregator_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.TaskEventsMetadata) + }) +_sym_db.RegisterMessage(TaskEventsMetadata) + +RayEventsData = _reflection.GeneratedProtocolMessageType('RayEventsData', (_message.Message,), { + 'DESCRIPTOR' : _RAYEVENTSDATA, + '__module__' : 'src.ray.protobuf.events_event_aggregator_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.RayEventsData) + }) +_sym_db.RegisterMessage(RayEventsData) + +AddEventsRequest = _reflection.GeneratedProtocolMessageType('AddEventsRequest', (_message.Message,), { + 'DESCRIPTOR' : _ADDEVENTSREQUEST, + '__module__' : 'src.ray.protobuf.events_event_aggregator_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.AddEventsRequest) + }) +_sym_db.RegisterMessage(AddEventsRequest) + +AddEventsStatus = _reflection.GeneratedProtocolMessageType('AddEventsStatus', (_message.Message,), { + 'DESCRIPTOR' : _ADDEVENTSSTATUS, + '__module__' : 'src.ray.protobuf.events_event_aggregator_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.AddEventsStatus) + }) +_sym_db.RegisterMessage(AddEventsStatus) + +AddEventsReply = _reflection.GeneratedProtocolMessageType('AddEventsReply', (_message.Message,), { + 'DESCRIPTOR' : _ADDEVENTSREPLY, + '__module__' : 'src.ray.protobuf.events_event_aggregator_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.AddEventsReply) + }) +_sym_db.RegisterMessage(AddEventsReply) + +_EVENTAGGREGATORSERVICE = DESCRIPTOR.services_by_name['EventAggregatorService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _TASKEVENTSMETADATA._serialized_start=147 + _TASKEVENTSMETADATA._serialized_end=241 + _RAYEVENTSDATA._serialized_start=244 + _RAYEVENTSDATA._serialized_end=395 + _ADDEVENTSREQUEST._serialized_start=397 + _ADDEVENTSREQUEST._serialized_end=479 + _ADDEVENTSSTATUS._serialized_start=481 + _ADDEVENTSSTATUS._serialized_end=544 + _ADDEVENTSREPLY._serialized_start=546 + _ADDEVENTSREPLY._serialized_end=619 + _EVENTAGGREGATORSERVICE._serialized_start=621 + _EVENTAGGREGATORSERVICE._serialized_end=724 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_event_aggregator_service_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_event_aggregator_service_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..185fe95c4204419863f643e339c305db26d24821 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_event_aggregator_service_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import events_event_aggregator_service_pb2 as src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2 + + +class EventAggregatorServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.AddEvents = channel.unary_unary( + '/ray.rpc.events.EventAggregatorService/AddEvents', + request_serializer=src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsReply.FromString, + ) + + +class EventAggregatorServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def AddEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_EventAggregatorServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'AddEvents': grpc.unary_unary_rpc_method_handler( + servicer.AddEvents, + request_deserializer=src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.events.EventAggregatorService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class EventAggregatorService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def AddEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.events.EventAggregatorService/AddEvents', + src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_definition_event_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_definition_event_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..7ade62a6cf9d921c4edd197fe5c88e8ca3a432b8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_definition_event_pb2.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/events_task_definition_event.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import runtime_env_common_pb2 as src_dot_ray_dot_protobuf_dot_runtime__env__common__pb2 +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n3src/ray/protobuf/events_task_definition_event.proto\x12\x0eray.rpc.events\x1a)src/ray/protobuf/runtime_env_common.proto\x1a\x1dsrc/ray/protobuf/common.proto\"\xeb\x05\n\x13TaskDefinitionEvent\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\x12!\n\x0ctask_attempt\x18\x02 \x01(\x05R\x0btaskAttempt\x12.\n\ttask_type\x18\x03 \x01(\x0e\x32\x11.ray.rpc.TaskTypeR\x08taskType\x12-\n\x08language\x18\x04 \x01(\x0e\x32\x11.ray.rpc.LanguageR\x08language\x12\x38\n\ttask_func\x18\x05 \x01(\x0b\x32\x1b.ray.rpc.FunctionDescriptorR\x08taskFunc\x12\x1b\n\ttask_name\x18\x06 \x01(\tR\x08taskName\x12i\n\x12required_resources\x18\x07 \x03(\x0b\x32:.ray.rpc.events.TaskDefinitionEvent.RequiredResourcesEntryR\x11requiredResources\x12\x41\n\x10runtime_env_info\x18\x08 \x01(\x0b\x32\x17.ray.rpc.RuntimeEnvInfoR\x0eruntimeEnvInfo\x12\x15\n\x06job_id\x18\t \x01(\x0cR\x05jobId\x12$\n\x0eparent_task_id\x18\n \x01(\x0cR\x0cparentTaskId\x12,\n\x12placement_group_id\x18\x0b \x01(\x0cR\x10placementGroupId\x12H\n\x07ref_ids\x18\x0c \x03(\x0b\x32/.ray.rpc.events.TaskDefinitionEvent.RefIdsEntryR\x06refIds\x1a\x44\n\x16RequiredResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x39\n\x0bRefIdsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value:\x02\x38\x01\x62\x06proto3') + + + +_TASKDEFINITIONEVENT = DESCRIPTOR.message_types_by_name['TaskDefinitionEvent'] +_TASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY = _TASKDEFINITIONEVENT.nested_types_by_name['RequiredResourcesEntry'] +_TASKDEFINITIONEVENT_REFIDSENTRY = _TASKDEFINITIONEVENT.nested_types_by_name['RefIdsEntry'] +TaskDefinitionEvent = _reflection.GeneratedProtocolMessageType('TaskDefinitionEvent', (_message.Message,), { + + 'RequiredResourcesEntry' : _reflection.GeneratedProtocolMessageType('RequiredResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.events_task_definition_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.TaskDefinitionEvent.RequiredResourcesEntry) + }) + , + + 'RefIdsEntry' : _reflection.GeneratedProtocolMessageType('RefIdsEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKDEFINITIONEVENT_REFIDSENTRY, + '__module__' : 'src.ray.protobuf.events_task_definition_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.TaskDefinitionEvent.RefIdsEntry) + }) + , + 'DESCRIPTOR' : _TASKDEFINITIONEVENT, + '__module__' : 'src.ray.protobuf.events_task_definition_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.TaskDefinitionEvent) + }) +_sym_db.RegisterMessage(TaskDefinitionEvent) +_sym_db.RegisterMessage(TaskDefinitionEvent.RequiredResourcesEntry) +_sym_db.RegisterMessage(TaskDefinitionEvent.RefIdsEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _TASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY._options = None + _TASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY._serialized_options = b'8\001' + _TASKDEFINITIONEVENT_REFIDSENTRY._options = None + _TASKDEFINITIONEVENT_REFIDSENTRY._serialized_options = b'8\001' + _TASKDEFINITIONEVENT._serialized_start=146 + _TASKDEFINITIONEVENT._serialized_end=893 + _TASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY._serialized_start=766 + _TASKDEFINITIONEVENT_REQUIREDRESOURCESENTRY._serialized_end=834 + _TASKDEFINITIONEVENT_REFIDSENTRY._serialized_start=836 + _TASKDEFINITIONEVENT_REFIDSENTRY._serialized_end=893 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_definition_event_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_definition_event_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_definition_event_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_execution_event_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_execution_event_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..bf280ac17fa109cbf529f4a4f9b290d0cd554180 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_execution_event_pb2.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/events_task_execution_event.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2src/ray/protobuf/events_task_execution_event.proto\x12\x0eray.rpc.events\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1dsrc/ray/protobuf/common.proto\"\x8e\x03\n\x12TaskExecutionEvent\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\x12!\n\x0ctask_attempt\x18\x02 \x01(\x05R\x0btaskAttempt\x12P\n\ntask_state\x18\x03 \x03(\x0b\x32\x31.ray.rpc.events.TaskExecutionEvent.TaskStateEntryR\ttaskState\x12;\n\x0eray_error_info\x18\x04 \x01(\x0b\x32\x15.ray.rpc.RayErrorInfoR\x0crayErrorInfo\x12\x17\n\x07node_id\x18\x05 \x01(\x0cR\x06nodeId\x12\x1b\n\tworker_id\x18\x06 \x01(\x0cR\x08workerId\x12\x1d\n\nworker_pid\x18\x07 \x01(\x05R\tworkerPid\x1aX\n\x0eTaskStateEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05value:\x02\x38\x01\x62\x06proto3') + + + +_TASKEXECUTIONEVENT = DESCRIPTOR.message_types_by_name['TaskExecutionEvent'] +_TASKEXECUTIONEVENT_TASKSTATEENTRY = _TASKEXECUTIONEVENT.nested_types_by_name['TaskStateEntry'] +TaskExecutionEvent = _reflection.GeneratedProtocolMessageType('TaskExecutionEvent', (_message.Message,), { + + 'TaskStateEntry' : _reflection.GeneratedProtocolMessageType('TaskStateEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKEXECUTIONEVENT_TASKSTATEENTRY, + '__module__' : 'src.ray.protobuf.events_task_execution_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.TaskExecutionEvent.TaskStateEntry) + }) + , + 'DESCRIPTOR' : _TASKEXECUTIONEVENT, + '__module__' : 'src.ray.protobuf.events_task_execution_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.TaskExecutionEvent) + }) +_sym_db.RegisterMessage(TaskExecutionEvent) +_sym_db.RegisterMessage(TaskExecutionEvent.TaskStateEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _TASKEXECUTIONEVENT_TASKSTATEENTRY._options = None + _TASKEXECUTIONEVENT_TASKSTATEENTRY._serialized_options = b'8\001' + _TASKEXECUTIONEVENT._serialized_start=135 + _TASKEXECUTIONEVENT._serialized_end=533 + _TASKEXECUTIONEVENT_TASKSTATEENTRY._serialized_start=445 + _TASKEXECUTIONEVENT_TASKSTATEENTRY._serialized_end=533 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_execution_event_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_execution_event_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_execution_event_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_profile_events_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_profile_events_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..7425541ef2f6a769b93b8d74fe4683735993ac69 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_profile_events_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/events_task_profile_events.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import profile_events_pb2 as src_dot_ray_dot_protobuf_dot_profile__events__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n1src/ray/protobuf/events_task_profile_events.proto\x12\x0eray.rpc.events\x1a%src/ray/protobuf/profile_events.proto\"\xa9\x01\n\x11TaskProfileEvents\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\x12%\n\x0e\x61ttempt_number\x18\x02 \x01(\x05R\rattemptNumber\x12\x15\n\x06job_id\x18\x03 \x01(\x0cR\x05jobId\x12=\n\x0eprofile_events\x18\x04 \x01(\x0b\x32\x16.ray.rpc.ProfileEventsR\rprofileEventsb\x06proto3') + + + +_TASKPROFILEEVENTS = DESCRIPTOR.message_types_by_name['TaskProfileEvents'] +TaskProfileEvents = _reflection.GeneratedProtocolMessageType('TaskProfileEvents', (_message.Message,), { + 'DESCRIPTOR' : _TASKPROFILEEVENTS, + '__module__' : 'src.ray.protobuf.events_task_profile_events_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.events.TaskProfileEvents) + }) +_sym_db.RegisterMessage(TaskProfileEvents) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _TASKPROFILEEVENTS._serialized_start=109 + _TASKPROFILEEVENTS._serialized_end=278 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_profile_events_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_profile_events_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/events_task_profile_events_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_actor_data_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_actor_data_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..acdb1154a0f54b252c03d98569e7c86c70a5e3b1 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_actor_data_pb2.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/export_actor_data.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(src/ray/protobuf/export_actor_data.proto\x12\x07ray.rpc\x1a\x1dsrc/ray/protobuf/common.proto\"\xa3\x08\n\x0f\x45xportActorData\x12\x19\n\x08\x61\x63tor_id\x18\x01 \x01(\x0cR\x07\x61\x63torId\x12\x15\n\x06job_id\x18\x02 \x01(\x0cR\x05jobId\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32#.ray.rpc.ExportActorData.ActorStateR\x05state\x12\x1f\n\x0bis_detached\x18\x04 \x01(\x08R\nisDetached\x12\x12\n\x04name\x18\x05 \x01(\tR\x04name\x12\x10\n\x03pid\x18\x06 \x01(\rR\x03pid\x12#\n\rray_namespace\x18\x07 \x01(\tR\x0crayNamespace\x12\x34\n\x16serialized_runtime_env\x18\x08 \x01(\tR\x14serializedRuntimeEnv\x12\x1d\n\nclass_name\x18\t \x01(\tR\tclassName\x12\x39\n\x0b\x64\x65\x61th_cause\x18\n \x01(\x0b\x32\x18.ray.rpc.ActorDeathCauseR\ndeathCause\x12^\n\x12required_resources\x18\x0b \x03(\x0b\x32/.ray.rpc.ExportActorData.RequiredResourcesEntryR\x11requiredResources\x12\x1c\n\x07node_id\x18\x0c \x01(\x0cH\x00R\x06nodeId\x88\x01\x01\x12\x31\n\x12placement_group_id\x18\r \x01(\x0cH\x01R\x10placementGroupId\x88\x01\x01\x12\x1b\n\trepr_name\x18\x0e \x01(\tR\x08reprName\x12<\n\x06labels\x18\x0f \x03(\x0b\x32$.ray.rpc.ExportActorData.LabelsEntryR\x06labels\x12R\n\x0elabel_selector\x18\x10 \x03(\x0b\x32+.ray.rpc.ExportActorData.LabelSelectorEntryR\rlabelSelector\x1a\x44\n\x16RequiredResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a@\n\x12LabelSelectorEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"a\n\nActorState\x12\x18\n\x14\x44\x45PENDENCIES_UNREADY\x10\x00\x12\x14\n\x10PENDING_CREATION\x10\x01\x12\t\n\x05\x41LIVE\x10\x02\x12\x0e\n\nRESTARTING\x10\x03\x12\x08\n\x04\x44\x45\x41\x44\x10\x04\x42\n\n\x08_node_idB\x15\n\x13_placement_group_idb\x06proto3') + + + +_EXPORTACTORDATA = DESCRIPTOR.message_types_by_name['ExportActorData'] +_EXPORTACTORDATA_REQUIREDRESOURCESENTRY = _EXPORTACTORDATA.nested_types_by_name['RequiredResourcesEntry'] +_EXPORTACTORDATA_LABELSENTRY = _EXPORTACTORDATA.nested_types_by_name['LabelsEntry'] +_EXPORTACTORDATA_LABELSELECTORENTRY = _EXPORTACTORDATA.nested_types_by_name['LabelSelectorEntry'] +_EXPORTACTORDATA_ACTORSTATE = _EXPORTACTORDATA.enum_types_by_name['ActorState'] +ExportActorData = _reflection.GeneratedProtocolMessageType('ExportActorData', (_message.Message,), { + + 'RequiredResourcesEntry' : _reflection.GeneratedProtocolMessageType('RequiredResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTACTORDATA_REQUIREDRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.export_actor_data_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportActorData.RequiredResourcesEntry) + }) + , + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTACTORDATA_LABELSENTRY, + '__module__' : 'src.ray.protobuf.export_actor_data_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportActorData.LabelsEntry) + }) + , + + 'LabelSelectorEntry' : _reflection.GeneratedProtocolMessageType('LabelSelectorEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTACTORDATA_LABELSELECTORENTRY, + '__module__' : 'src.ray.protobuf.export_actor_data_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportActorData.LabelSelectorEntry) + }) + , + 'DESCRIPTOR' : _EXPORTACTORDATA, + '__module__' : 'src.ray.protobuf.export_actor_data_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportActorData) + }) +_sym_db.RegisterMessage(ExportActorData) +_sym_db.RegisterMessage(ExportActorData.RequiredResourcesEntry) +_sym_db.RegisterMessage(ExportActorData.LabelsEntry) +_sym_db.RegisterMessage(ExportActorData.LabelSelectorEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _EXPORTACTORDATA_REQUIREDRESOURCESENTRY._options = None + _EXPORTACTORDATA_REQUIREDRESOURCESENTRY._serialized_options = b'8\001' + _EXPORTACTORDATA_LABELSENTRY._options = None + _EXPORTACTORDATA_LABELSENTRY._serialized_options = b'8\001' + _EXPORTACTORDATA_LABELSELECTORENTRY._options = None + _EXPORTACTORDATA_LABELSELECTORENTRY._serialized_options = b'8\001' + _EXPORTACTORDATA._serialized_start=85 + _EXPORTACTORDATA._serialized_end=1144 + _EXPORTACTORDATA_REQUIREDRESOURCESENTRY._serialized_start=817 + _EXPORTACTORDATA_REQUIREDRESOURCESENTRY._serialized_end=885 + _EXPORTACTORDATA_LABELSENTRY._serialized_start=887 + _EXPORTACTORDATA_LABELSENTRY._serialized_end=944 + _EXPORTACTORDATA_LABELSELECTORENTRY._serialized_start=946 + _EXPORTACTORDATA_LABELSELECTORENTRY._serialized_end=1010 + _EXPORTACTORDATA_ACTORSTATE._serialized_start=1012 + _EXPORTACTORDATA_ACTORSTATE._serialized_end=1109 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_actor_data_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_actor_data_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_actor_data_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_dataset_metadata_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_dataset_metadata_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..b6b9bcc4459da802474b2f45dd8cada922ea084a --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_dataset_metadata_pb2.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/export_dataset_metadata.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.src/ray/protobuf/export_dataset_metadata.proto\x12\x07ray.rpc\x1a\x1cgoogle/protobuf/struct.proto\".\n\x08SubStage\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x0e\n\x02id\x18\x02 \x01(\tR\x02id\"\xb9\x03\n\x08Operator\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x0e\n\x02id\x18\x02 \x01(\tR\x02id\x12\x12\n\x04uuid\x18\x03 \x01(\tR\x04uuid\x12-\n\x12input_dependencies\x18\x04 \x03(\tR\x11inputDependencies\x12\x30\n\nsub_stages\x18\x05 \x03(\x0b\x32\x11.ray.rpc.SubStageR\tsubStages\x12+\n\x04\x61rgs\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\x04\x61rgs\x12\x30\n\x14\x65xecution_start_time\x18\x07 \x01(\x01R\x12\x65xecutionStartTime\x12,\n\x12\x65xecution_end_time\x18\x08 \x01(\x01R\x10\x65xecutionEndTime\x12\x35\n\x05state\x18\t \x01(\x0e\x32\x1f.ray.rpc.Operator.OperatorStateR\x05state\"P\n\rOperatorState\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0c\n\x08\x46INISHED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07PENDING\x10\x04\";\n\x08Topology\x12/\n\toperators\x18\x01 \x03(\x0b\x32\x11.ray.rpc.OperatorR\toperators\"\xcb\x03\n\x15\x45xportDatasetMetadata\x12-\n\x08topology\x18\x01 \x01(\x0b\x32\x11.ray.rpc.TopologyR\x08topology\x12\x1d\n\ndataset_id\x18\x02 \x01(\tR\tdatasetId\x12\x15\n\x06job_id\x18\x03 \x01(\tR\x05jobId\x12\x1d\n\nstart_time\x18\x04 \x01(\x01R\tstartTime\x12:\n\x0c\x64\x61ta_context\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructR\x0b\x64\x61taContext\x12\x30\n\x14\x65xecution_start_time\x18\x06 \x01(\x01R\x12\x65xecutionStartTime\x12,\n\x12\x65xecution_end_time\x18\x07 \x01(\x01R\x10\x65xecutionEndTime\x12\x41\n\x05state\x18\x08 \x01(\x0e\x32+.ray.rpc.ExportDatasetMetadata.DatasetStateR\x05state\"O\n\x0c\x44\x61tasetState\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0c\n\x08\x46INISHED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07PENDING\x10\x04\x42\x03\xf8\x01\x01\x62\x06proto3') + + + +_SUBSTAGE = DESCRIPTOR.message_types_by_name['SubStage'] +_OPERATOR = DESCRIPTOR.message_types_by_name['Operator'] +_TOPOLOGY = DESCRIPTOR.message_types_by_name['Topology'] +_EXPORTDATASETMETADATA = DESCRIPTOR.message_types_by_name['ExportDatasetMetadata'] +_OPERATOR_OPERATORSTATE = _OPERATOR.enum_types_by_name['OperatorState'] +_EXPORTDATASETMETADATA_DATASETSTATE = _EXPORTDATASETMETADATA.enum_types_by_name['DatasetState'] +SubStage = _reflection.GeneratedProtocolMessageType('SubStage', (_message.Message,), { + 'DESCRIPTOR' : _SUBSTAGE, + '__module__' : 'src.ray.protobuf.export_dataset_metadata_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.SubStage) + }) +_sym_db.RegisterMessage(SubStage) + +Operator = _reflection.GeneratedProtocolMessageType('Operator', (_message.Message,), { + 'DESCRIPTOR' : _OPERATOR, + '__module__' : 'src.ray.protobuf.export_dataset_metadata_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Operator) + }) +_sym_db.RegisterMessage(Operator) + +Topology = _reflection.GeneratedProtocolMessageType('Topology', (_message.Message,), { + 'DESCRIPTOR' : _TOPOLOGY, + '__module__' : 'src.ray.protobuf.export_dataset_metadata_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Topology) + }) +_sym_db.RegisterMessage(Topology) + +ExportDatasetMetadata = _reflection.GeneratedProtocolMessageType('ExportDatasetMetadata', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTDATASETMETADATA, + '__module__' : 'src.ray.protobuf.export_dataset_metadata_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportDatasetMetadata) + }) +_sym_db.RegisterMessage(ExportDatasetMetadata) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\370\001\001' + _SUBSTAGE._serialized_start=89 + _SUBSTAGE._serialized_end=135 + _OPERATOR._serialized_start=138 + _OPERATOR._serialized_end=579 + _OPERATOR_OPERATORSTATE._serialized_start=499 + _OPERATOR_OPERATORSTATE._serialized_end=579 + _TOPOLOGY._serialized_start=581 + _TOPOLOGY._serialized_end=640 + _EXPORTDATASETMETADATA._serialized_start=643 + _EXPORTDATASETMETADATA._serialized_end=1102 + _EXPORTDATASETMETADATA_DATASETSTATE._serialized_start=1023 + _EXPORTDATASETMETADATA_DATASETSTATE._serialized_end=1102 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_dataset_metadata_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_dataset_metadata_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_dataset_metadata_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_driver_job_event_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_driver_job_event_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..ae87707f2013bb2e211e02385d8cb2c45234121c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_driver_job_event_pb2.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/export_driver_job_event.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import export_runtime_env_pb2 as src_dot_ray_dot_protobuf_dot_export__runtime__env__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.src/ray/protobuf/export_driver_job_event.proto\x12\x07ray.rpc\x1a)src/ray/protobuf/export_runtime_env.proto\"\x9f\x04\n\x18\x45xportDriverJobEventData\x12\x15\n\x06job_id\x18\x01 \x01(\x0cR\x05jobId\x12\x17\n\x07is_dead\x18\x02 \x01(\x08R\x06isDead\x12\x1d\n\ndriver_pid\x18\x03 \x01(\x03R\tdriverPid\x12\x43\n\x06\x63onfig\x18\x04 \x01(\x0b\x32+.ray.rpc.ExportDriverJobEventData.JobConfigR\x06\x63onfig\x12\x1d\n\nstart_time\x18\x05 \x01(\x04R\tstartTime\x12\x19\n\x08\x65nd_time\x18\x06 \x01(\x04R\x07\x65ndTime\x12\x1e\n\nentrypoint\x18\x07 \x01(\tR\nentrypoint\x12*\n\x11\x64river_ip_address\x18\x08 \x01(\tR\x0f\x64riverIpAddress\x1a\xe8\x01\n\tJobConfig\x12G\n\x10runtime_env_info\x18\x01 \x01(\x0b\x32\x1d.ray.rpc.ExportRuntimeEnvInfoR\x0eruntimeEnvInfo\x12U\n\x08metadata\x18\x02 \x03(\x0b\x32\x39.ray.rpc.ExportDriverJobEventData.JobConfig.MetadataEntryR\x08metadata\x1a;\n\rMetadataEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x62\x06proto3') + + + +_EXPORTDRIVERJOBEVENTDATA = DESCRIPTOR.message_types_by_name['ExportDriverJobEventData'] +_EXPORTDRIVERJOBEVENTDATA_JOBCONFIG = _EXPORTDRIVERJOBEVENTDATA.nested_types_by_name['JobConfig'] +_EXPORTDRIVERJOBEVENTDATA_JOBCONFIG_METADATAENTRY = _EXPORTDRIVERJOBEVENTDATA_JOBCONFIG.nested_types_by_name['MetadataEntry'] +ExportDriverJobEventData = _reflection.GeneratedProtocolMessageType('ExportDriverJobEventData', (_message.Message,), { + + 'JobConfig' : _reflection.GeneratedProtocolMessageType('JobConfig', (_message.Message,), { + + 'MetadataEntry' : _reflection.GeneratedProtocolMessageType('MetadataEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTDRIVERJOBEVENTDATA_JOBCONFIG_METADATAENTRY, + '__module__' : 'src.ray.protobuf.export_driver_job_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportDriverJobEventData.JobConfig.MetadataEntry) + }) + , + 'DESCRIPTOR' : _EXPORTDRIVERJOBEVENTDATA_JOBCONFIG, + '__module__' : 'src.ray.protobuf.export_driver_job_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportDriverJobEventData.JobConfig) + }) + , + 'DESCRIPTOR' : _EXPORTDRIVERJOBEVENTDATA, + '__module__' : 'src.ray.protobuf.export_driver_job_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportDriverJobEventData) + }) +_sym_db.RegisterMessage(ExportDriverJobEventData) +_sym_db.RegisterMessage(ExportDriverJobEventData.JobConfig) +_sym_db.RegisterMessage(ExportDriverJobEventData.JobConfig.MetadataEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _EXPORTDRIVERJOBEVENTDATA_JOBCONFIG_METADATAENTRY._options = None + _EXPORTDRIVERJOBEVENTDATA_JOBCONFIG_METADATAENTRY._serialized_options = b'8\001' + _EXPORTDRIVERJOBEVENTDATA._serialized_start=103 + _EXPORTDRIVERJOBEVENTDATA._serialized_end=646 + _EXPORTDRIVERJOBEVENTDATA_JOBCONFIG._serialized_start=414 + _EXPORTDRIVERJOBEVENTDATA_JOBCONFIG._serialized_end=646 + _EXPORTDRIVERJOBEVENTDATA_JOBCONFIG_METADATAENTRY._serialized_start=587 + _EXPORTDRIVERJOBEVENTDATA_JOBCONFIG_METADATAENTRY._serialized_end=646 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_driver_job_event_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_driver_job_event_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_driver_job_event_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_event_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_event_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..3f58a61d11347ebef6fd899c60e989f172addea3 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_event_pb2.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/export_event.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import export_task_event_pb2 as src_dot_ray_dot_protobuf_dot_export__task__event__pb2 +from . import export_node_data_pb2 as src_dot_ray_dot_protobuf_dot_export__node__data__pb2 +from . import export_actor_data_pb2 as src_dot_ray_dot_protobuf_dot_export__actor__data__pb2 +from . import export_driver_job_event_pb2 as src_dot_ray_dot_protobuf_dot_export__driver__job__event__pb2 +from . import export_submission_job_event_pb2 as src_dot_ray_dot_protobuf_dot_export__submission__job__event__pb2 +from . import export_train_state_pb2 as src_dot_ray_dot_protobuf_dot_export__train__state__pb2 +from . import export_dataset_metadata_pb2 as src_dot_ray_dot_protobuf_dot_export__dataset__metadata__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#src/ray/protobuf/export_event.proto\x12\x07ray.rpc\x1a(src/ray/protobuf/export_task_event.proto\x1a\'src/ray/protobuf/export_node_data.proto\x1a(src/ray/protobuf/export_actor_data.proto\x1a.src/ray/protobuf/export_driver_job_event.proto\x1a\x32src/ray/protobuf/export_submission_job_event.proto\x1a)src/ray/protobuf/export_train_state.proto\x1a.src/ray/protobuf/export_dataset_metadata.proto\"\xf6\x07\n\x0b\x45xportEvent\x12\x19\n\x08\x65vent_id\x18\x01 \x01(\tR\x07\x65ventId\x12@\n\x0bsource_type\x18\x02 \x01(\x0e\x32\x1f.ray.rpc.ExportEvent.SourceTypeR\nsourceType\x12\x1c\n\ttimestamp\x18\x03 \x01(\x03R\ttimestamp\x12\x46\n\x0ftask_event_data\x18\x04 \x01(\x0b\x32\x1c.ray.rpc.ExportTaskEventDataH\x00R\rtaskEventData\x12\x41\n\x0fnode_event_data\x18\x05 \x01(\x0b\x32\x17.ray.rpc.ExportNodeDataH\x00R\rnodeEventData\x12\x44\n\x10\x61\x63tor_event_data\x18\x06 \x01(\x0b\x32\x18.ray.rpc.ExportActorDataH\x00R\x0e\x61\x63torEventData\x12V\n\x15\x64river_job_event_data\x18\x07 \x01(\x0b\x32!.ray.rpc.ExportDriverJobEventDataH\x00R\x12\x64riverJobEventData\x12\x62\n\x19submission_job_event_data\x18\x08 \x01(\x0b\x32%.ray.rpc.ExportSubmissionJobEventDataH\x00R\x16submissionJobEventData\x12S\n\x14train_run_event_data\x18\t \x01(\x0b\x32 .ray.rpc.ExportTrainRunEventDataH\x00R\x11trainRunEventData\x12i\n\x1ctrain_run_attempt_event_data\x18\n \x01(\x0b\x32\'.ray.rpc.ExportTrainRunAttemptEventDataH\x00R\x18trainRunAttemptEventData\x12K\n\x10\x64\x61taset_metadata\x18\x0b \x01(\x0b\x32\x1e.ray.rpc.ExportDatasetMetadataH\x00R\x0f\x64\x61tasetMetadata\"\xc3\x01\n\nSourceType\x12\x0f\n\x0b\x45XPORT_TASK\x10\x00\x12\x0f\n\x0b\x45XPORT_NODE\x10\x01\x12\x10\n\x0c\x45XPORT_ACTOR\x10\x02\x12\x15\n\x11\x45XPORT_DRIVER_JOB\x10\x03\x12\x19\n\x15\x45XPORT_SUBMISSION_JOB\x10\x04\x12\x14\n\x10\x45XPORT_TRAIN_RUN\x10\x05\x12\x1c\n\x18\x45XPORT_TRAIN_RUN_ATTEMPT\x10\x06\x12\x1b\n\x17\x45XPORT_DATASET_METADATA\x10\x07\x42\x0c\n\nevent_datab\x06proto3') + + + +_EXPORTEVENT = DESCRIPTOR.message_types_by_name['ExportEvent'] +_EXPORTEVENT_SOURCETYPE = _EXPORTEVENT.enum_types_by_name['SourceType'] +ExportEvent = _reflection.GeneratedProtocolMessageType('ExportEvent', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTEVENT, + '__module__' : 'src.ray.protobuf.export_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportEvent) + }) +_sym_db.RegisterMessage(ExportEvent) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _EXPORTEVENT._serialized_start=365 + _EXPORTEVENT._serialized_end=1379 + _EXPORTEVENT_SOURCETYPE._serialized_start=1170 + _EXPORTEVENT_SOURCETYPE._serialized_end=1365 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_event_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_event_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_event_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_node_data_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_node_data_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..75d266a0571e3cb7fda02d85a0a42ab884952e80 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_node_data_pb2.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/export_node_data.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'src/ray/protobuf/export_node_data.proto\x12\x07ray.rpc\"\xa2\x07\n\x0e\x45xportNodeData\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12\x30\n\x14node_manager_address\x18\x02 \x01(\tR\x12nodeManagerAddress\x12:\n\x05state\x18\x03 \x01(\x0e\x32$.ray.rpc.ExportNodeData.GcsNodeStateR\x05state\x12T\n\x0fresources_total\x18\x04 \x03(\x0b\x32+.ray.rpc.ExportNodeData.ResourcesTotalEntryR\x0eresourcesTotal\x12\x1b\n\tnode_name\x18\x05 \x01(\tR\x08nodeName\x12\"\n\rstart_time_ms\x18\x06 \x01(\x04R\x0bstartTimeMs\x12\x1e\n\x0b\x65nd_time_ms\x18\x07 \x01(\x04R\tendTimeMs\x12 \n\x0cis_head_node\x18\x08 \x01(\x08R\nisHeadNode\x12;\n\x06labels\x18\t \x03(\x0b\x32#.ray.rpc.ExportNodeData.LabelsEntryR\x06labels\x12\x44\n\ndeath_info\x18\n \x01(\x0b\x32%.ray.rpc.ExportNodeData.NodeDeathInfoR\tdeathInfo\x1a\x89\x02\n\rNodeDeathInfo\x12\x44\n\x06reason\x18\x01 \x01(\x0e\x32,.ray.rpc.ExportNodeData.NodeDeathInfo.ReasonR\x06reason\x12%\n\x0ereason_message\x18\x02 \x01(\tR\rreasonMessage\"\x8a\x01\n\x06Reason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x18\n\x14\x45XPECTED_TERMINATION\x10\x01\x12\x1a\n\x16UNEXPECTED_TERMINATION\x10\x02\x12\x1e\n\x1a\x41UTOSCALER_DRAIN_PREEMPTED\x10\x03\x12\x19\n\x15\x41UTOSCALER_DRAIN_IDLE\x10\x04\x1a\x41\n\x13ResourcesTotalEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"#\n\x0cGcsNodeState\x12\t\n\x05\x41LIVE\x10\x00\x12\x08\n\x04\x44\x45\x41\x44\x10\x01\x62\x06proto3') + + + +_EXPORTNODEDATA = DESCRIPTOR.message_types_by_name['ExportNodeData'] +_EXPORTNODEDATA_NODEDEATHINFO = _EXPORTNODEDATA.nested_types_by_name['NodeDeathInfo'] +_EXPORTNODEDATA_RESOURCESTOTALENTRY = _EXPORTNODEDATA.nested_types_by_name['ResourcesTotalEntry'] +_EXPORTNODEDATA_LABELSENTRY = _EXPORTNODEDATA.nested_types_by_name['LabelsEntry'] +_EXPORTNODEDATA_NODEDEATHINFO_REASON = _EXPORTNODEDATA_NODEDEATHINFO.enum_types_by_name['Reason'] +_EXPORTNODEDATA_GCSNODESTATE = _EXPORTNODEDATA.enum_types_by_name['GcsNodeState'] +ExportNodeData = _reflection.GeneratedProtocolMessageType('ExportNodeData', (_message.Message,), { + + 'NodeDeathInfo' : _reflection.GeneratedProtocolMessageType('NodeDeathInfo', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTNODEDATA_NODEDEATHINFO, + '__module__' : 'src.ray.protobuf.export_node_data_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportNodeData.NodeDeathInfo) + }) + , + + 'ResourcesTotalEntry' : _reflection.GeneratedProtocolMessageType('ResourcesTotalEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTNODEDATA_RESOURCESTOTALENTRY, + '__module__' : 'src.ray.protobuf.export_node_data_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportNodeData.ResourcesTotalEntry) + }) + , + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTNODEDATA_LABELSENTRY, + '__module__' : 'src.ray.protobuf.export_node_data_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportNodeData.LabelsEntry) + }) + , + 'DESCRIPTOR' : _EXPORTNODEDATA, + '__module__' : 'src.ray.protobuf.export_node_data_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportNodeData) + }) +_sym_db.RegisterMessage(ExportNodeData) +_sym_db.RegisterMessage(ExportNodeData.NodeDeathInfo) +_sym_db.RegisterMessage(ExportNodeData.ResourcesTotalEntry) +_sym_db.RegisterMessage(ExportNodeData.LabelsEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _EXPORTNODEDATA_RESOURCESTOTALENTRY._options = None + _EXPORTNODEDATA_RESOURCESTOTALENTRY._serialized_options = b'8\001' + _EXPORTNODEDATA_LABELSENTRY._options = None + _EXPORTNODEDATA_LABELSENTRY._serialized_options = b'8\001' + _EXPORTNODEDATA._serialized_start=53 + _EXPORTNODEDATA._serialized_end=983 + _EXPORTNODEDATA_NODEDEATHINFO._serialized_start=555 + _EXPORTNODEDATA_NODEDEATHINFO._serialized_end=820 + _EXPORTNODEDATA_NODEDEATHINFO_REASON._serialized_start=682 + _EXPORTNODEDATA_NODEDEATHINFO_REASON._serialized_end=820 + _EXPORTNODEDATA_RESOURCESTOTALENTRY._serialized_start=822 + _EXPORTNODEDATA_RESOURCESTOTALENTRY._serialized_end=887 + _EXPORTNODEDATA_LABELSENTRY._serialized_start=889 + _EXPORTNODEDATA_LABELSENTRY._serialized_end=946 + _EXPORTNODEDATA_GCSNODESTATE._serialized_start=948 + _EXPORTNODEDATA_GCSNODESTATE._serialized_end=983 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_node_data_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_node_data_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_node_data_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_runtime_env_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_runtime_env_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..4e3219e7ad6424ec55bec5cc65768e260f2d3d85 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_runtime_env_pb2.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/export_runtime_env.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)src/ray/protobuf/export_runtime_env.proto\x12\x07ray.rpc\"\xd9\x03\n\x14\x45xportRuntimeEnvInfo\x12\x34\n\x16serialized_runtime_env\x18\x01 \x01(\tR\x14serializedRuntimeEnv\x12@\n\x04uris\x18\x02 \x01(\x0b\x32,.ray.rpc.ExportRuntimeEnvInfo.RuntimeEnvUrisR\x04uris\x12\\\n\x12runtime_env_config\x18\x03 \x01(\x0b\x32..ray.rpc.ExportRuntimeEnvInfo.RuntimeEnvConfigR\x10runtimeEnvConfig\x1a`\n\x0eRuntimeEnvUris\x12&\n\x0fworking_dir_uri\x18\x01 \x01(\tR\rworkingDirUri\x12&\n\x0fpy_modules_uris\x18\x02 \x03(\tR\rpyModulesUris\x1a\x88\x01\n\x10RuntimeEnvConfig\x12\x32\n\x15setup_timeout_seconds\x18\x01 \x01(\x05R\x13setupTimeoutSeconds\x12#\n\reager_install\x18\x02 \x01(\x08R\x0c\x65\x61gerInstall\x12\x1b\n\tlog_files\x18\x03 \x03(\tR\x08logFilesb\x06proto3') + + + +_EXPORTRUNTIMEENVINFO = DESCRIPTOR.message_types_by_name['ExportRuntimeEnvInfo'] +_EXPORTRUNTIMEENVINFO_RUNTIMEENVURIS = _EXPORTRUNTIMEENVINFO.nested_types_by_name['RuntimeEnvUris'] +_EXPORTRUNTIMEENVINFO_RUNTIMEENVCONFIG = _EXPORTRUNTIMEENVINFO.nested_types_by_name['RuntimeEnvConfig'] +ExportRuntimeEnvInfo = _reflection.GeneratedProtocolMessageType('ExportRuntimeEnvInfo', (_message.Message,), { + + 'RuntimeEnvUris' : _reflection.GeneratedProtocolMessageType('RuntimeEnvUris', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTRUNTIMEENVINFO_RUNTIMEENVURIS, + '__module__' : 'src.ray.protobuf.export_runtime_env_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportRuntimeEnvInfo.RuntimeEnvUris) + }) + , + + 'RuntimeEnvConfig' : _reflection.GeneratedProtocolMessageType('RuntimeEnvConfig', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTRUNTIMEENVINFO_RUNTIMEENVCONFIG, + '__module__' : 'src.ray.protobuf.export_runtime_env_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportRuntimeEnvInfo.RuntimeEnvConfig) + }) + , + 'DESCRIPTOR' : _EXPORTRUNTIMEENVINFO, + '__module__' : 'src.ray.protobuf.export_runtime_env_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportRuntimeEnvInfo) + }) +_sym_db.RegisterMessage(ExportRuntimeEnvInfo) +_sym_db.RegisterMessage(ExportRuntimeEnvInfo.RuntimeEnvUris) +_sym_db.RegisterMessage(ExportRuntimeEnvInfo.RuntimeEnvConfig) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _EXPORTRUNTIMEENVINFO._serialized_start=55 + _EXPORTRUNTIMEENVINFO._serialized_end=528 + _EXPORTRUNTIMEENVINFO_RUNTIMEENVURIS._serialized_start=293 + _EXPORTRUNTIMEENVINFO_RUNTIMEENVURIS._serialized_end=389 + _EXPORTRUNTIMEENVINFO_RUNTIMEENVCONFIG._serialized_start=392 + _EXPORTRUNTIMEENVINFO_RUNTIMEENVCONFIG._serialized_end=528 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_runtime_env_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_runtime_env_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_runtime_env_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_submission_job_event_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_submission_job_event_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..82578eb607455bdb76b4d88623de3fd6a2f7f810 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_submission_job_event_pb2.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/export_submission_job_event.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2src/ray/protobuf/export_submission_job_event.proto\x12\x07ray.rpc\"\xf2\x06\n\x1c\x45xportSubmissionJobEventData\x12*\n\x11submission_job_id\x18\x01 \x01(\tR\x0fsubmissionJobId\x12G\n\x06status\x18\x02 \x01(\x0e\x32/.ray.rpc.ExportSubmissionJobEventData.JobStatusR\x06status\x12\x1e\n\nentrypoint\x18\x03 \x01(\tR\nentrypoint\x12\x1d\n\x07message\x18\x04 \x01(\tH\x00R\x07message\x88\x01\x01\x12\"\n\nerror_type\x18\x05 \x01(\tH\x01R\terrorType\x88\x01\x01\x12\"\n\nstart_time\x18\x06 \x01(\x04H\x02R\tstartTime\x88\x01\x01\x12\x1e\n\x08\x65nd_time\x18\x07 \x01(\x04H\x03R\x07\x65ndTime\x88\x01\x01\x12O\n\x08metadata\x18\x08 \x03(\x0b\x32\x33.ray.rpc.ExportSubmissionJobEventData.MetadataEntryR\x08metadata\x12-\n\x10runtime_env_json\x18\t \x01(\tH\x04R\x0eruntimeEnvJson\x88\x01\x01\x12>\n\x19\x64river_agent_http_address\x18\n \x01(\tH\x05R\x16\x64riverAgentHttpAddress\x88\x01\x01\x12)\n\x0e\x64river_node_id\x18\x0b \x01(\tH\x06R\x0c\x64riverNodeId\x88\x01\x01\x12-\n\x10\x64river_exit_code\x18\x0c \x01(\x05H\x07R\x0e\x64riverExitCode\x88\x01\x01\x1a;\n\rMetadataEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"M\n\tJobStatus\x12\x0b\n\x07PENDING\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x42\n\n\x08_messageB\r\n\x0b_error_typeB\r\n\x0b_start_timeB\x0b\n\t_end_timeB\x13\n\x11_runtime_env_jsonB\x1c\n\x1a_driver_agent_http_addressB\x11\n\x0f_driver_node_idB\x13\n\x11_driver_exit_codeb\x06proto3') + + + +_EXPORTSUBMISSIONJOBEVENTDATA = DESCRIPTOR.message_types_by_name['ExportSubmissionJobEventData'] +_EXPORTSUBMISSIONJOBEVENTDATA_METADATAENTRY = _EXPORTSUBMISSIONJOBEVENTDATA.nested_types_by_name['MetadataEntry'] +_EXPORTSUBMISSIONJOBEVENTDATA_JOBSTATUS = _EXPORTSUBMISSIONJOBEVENTDATA.enum_types_by_name['JobStatus'] +ExportSubmissionJobEventData = _reflection.GeneratedProtocolMessageType('ExportSubmissionJobEventData', (_message.Message,), { + + 'MetadataEntry' : _reflection.GeneratedProtocolMessageType('MetadataEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTSUBMISSIONJOBEVENTDATA_METADATAENTRY, + '__module__' : 'src.ray.protobuf.export_submission_job_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportSubmissionJobEventData.MetadataEntry) + }) + , + 'DESCRIPTOR' : _EXPORTSUBMISSIONJOBEVENTDATA, + '__module__' : 'src.ray.protobuf.export_submission_job_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportSubmissionJobEventData) + }) +_sym_db.RegisterMessage(ExportSubmissionJobEventData) +_sym_db.RegisterMessage(ExportSubmissionJobEventData.MetadataEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _EXPORTSUBMISSIONJOBEVENTDATA_METADATAENTRY._options = None + _EXPORTSUBMISSIONJOBEVENTDATA_METADATAENTRY._serialized_options = b'8\001' + _EXPORTSUBMISSIONJOBEVENTDATA._serialized_start=64 + _EXPORTSUBMISSIONJOBEVENTDATA._serialized_end=946 + _EXPORTSUBMISSIONJOBEVENTDATA_METADATAENTRY._serialized_start=662 + _EXPORTSUBMISSIONJOBEVENTDATA_METADATAENTRY._serialized_end=721 + _EXPORTSUBMISSIONJOBEVENTDATA_JOBSTATUS._serialized_start=723 + _EXPORTSUBMISSIONJOBEVENTDATA_JOBSTATUS._serialized_end=800 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_submission_job_event_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_submission_job_event_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_submission_job_event_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_task_event_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_task_event_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..bb6fac4729b89a0a3fc3270e510c177daad14db6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_task_event_pb2.py @@ -0,0 +1,133 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/export_task_event.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 +from . import export_runtime_env_pb2 as src_dot_ray_dot_protobuf_dot_export__runtime__env__pb2 +from . import profile_events_pb2 as src_dot_ray_dot_protobuf_dot_profile__events__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(src/ray/protobuf/export_task_event.proto\x12\x07ray.rpc\x1a\x1dsrc/ray/protobuf/common.proto\x1a)src/ray/protobuf/export_runtime_env.proto\x1a%src/ray/protobuf/profile_events.proto\"\x8d\x12\n\x13\x45xportTaskEventData\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\x12%\n\x0e\x61ttempt_number\x18\x02 \x01(\x05R\rattemptNumber\x12L\n\ttask_info\x18\x03 \x01(\x0b\x32*.ray.rpc.ExportTaskEventData.TaskInfoEntryH\x00R\x08taskInfo\x88\x01\x01\x12V\n\rstate_updates\x18\x04 \x01(\x0b\x32,.ray.rpc.ExportTaskEventData.TaskStateUpdateH\x01R\x0cstateUpdates\x88\x01\x01\x12\x42\n\x0eprofile_events\x18\x05 \x01(\x0b\x32\x16.ray.rpc.ProfileEventsH\x02R\rprofileEvents\x88\x01\x01\x12\x15\n\x06job_id\x18\x06 \x01(\x0cR\x05jobId\x1a\x66\n\x0cRayErrorInfo\x12#\n\rerror_message\x18\x01 \x01(\tR\x0c\x65rrorMessage\x12\x31\n\nerror_type\x18\x02 \x01(\x0e\x32\x12.ray.rpc.ErrorTypeR\terrorType\x1a\xd1\x02\n\x0bTaskLogInfo\x12$\n\x0bstdout_file\x18\x01 \x01(\tH\x00R\nstdoutFile\x88\x01\x01\x12$\n\x0bstderr_file\x18\x02 \x01(\tH\x01R\nstderrFile\x88\x01\x01\x12&\n\x0cstdout_start\x18\x03 \x01(\x05H\x02R\x0bstdoutStart\x88\x01\x01\x12\"\n\nstdout_end\x18\x04 \x01(\x05H\x03R\tstdoutEnd\x88\x01\x01\x12&\n\x0cstderr_start\x18\x05 \x01(\x05H\x04R\x0bstderrStart\x88\x01\x01\x12\"\n\nstderr_end\x18\x06 \x01(\x05H\x05R\tstderrEnd\x88\x01\x01\x42\x0e\n\x0c_stdout_fileB\x0e\n\x0c_stderr_fileB\x0f\n\r_stdout_startB\r\n\x0b_stdout_endB\x0f\n\r_stderr_startB\r\n\x0b_stderr_end\x1a\xc6\x04\n\x0fTaskStateUpdate\x12\x1c\n\x07node_id\x18\x01 \x01(\x0cH\x00R\x06nodeId\x88\x01\x01\x12 \n\tworker_id\x18\x02 \x01(\x0cH\x01R\x08workerId\x88\x01\x01\x12M\n\nerror_info\x18\x03 \x01(\x0b\x32).ray.rpc.ExportTaskEventData.RayErrorInfoH\x02R\terrorInfo\x88\x01\x01\x12Q\n\rtask_log_info\x18\x04 \x01(\x0b\x32(.ray.rpc.ExportTaskEventData.TaskLogInfoH\x03R\x0btaskLogInfo\x88\x01\x01\x12\"\n\nworker_pid\x18\x05 \x01(\x05H\x04R\tworkerPid\x88\x01\x01\x12\x31\n\x12is_debugger_paused\x18\x06 \x01(\x08H\x05R\x10isDebuggerPaused\x88\x01\x01\x12[\n\x0bstate_ts_ns\x18\x07 \x03(\x0b\x32;.ray.rpc.ExportTaskEventData.TaskStateUpdate.StateTsNsEntryR\tstateTsNs\x1a<\n\x0eStateTsNsEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\x42\n\n\x08_node_idB\x0c\n\n_worker_idB\r\n\x0b_error_infoB\x10\n\x0e_task_log_infoB\r\n\x0b_worker_pidB\x15\n\x13_is_debugger_paused\x1a\xfc\x06\n\rTaskInfoEntry\x12%\n\x04type\x18\x01 \x01(\x0e\x32\x11.ray.rpc.TaskTypeR\x04type\x12-\n\x08language\x18\x02 \x01(\x0e\x32\x11.ray.rpc.LanguageR\x08language\x12+\n\x12\x66unc_or_class_name\x18\x03 \x01(\tR\x0f\x66uncOrClassName\x12\x17\n\x07task_id\x18\x04 \x01(\x0cR\x06taskId\x12$\n\x0eparent_task_id\x18\x05 \x01(\x0cR\x0cparentTaskId\x12p\n\x12required_resources\x18\x06 \x03(\x0b\x32\x41.ray.rpc.ExportTaskEventData.TaskInfoEntry.RequiredResourcesEntryR\x11requiredResources\x12G\n\x10runtime_env_info\x18\x07 \x01(\x0b\x32\x1d.ray.rpc.ExportRuntimeEnvInfoR\x0eruntimeEnvInfo\x12\x1e\n\x08\x61\x63tor_id\x18\x08 \x01(\x0cH\x00R\x07\x61\x63torId\x88\x01\x01\x12\x31\n\x12placement_group_id\x18\t \x01(\x0cH\x01R\x10placementGroupId\x88\x01\x01\x12N\n\x06labels\x18\n \x03(\x0b\x32\x36.ray.rpc.ExportTaskEventData.TaskInfoEntry.LabelsEntryR\x06labels\x12\x64\n\x0elabel_selector\x18\x0b \x03(\x0b\x32=.ray.rpc.ExportTaskEventData.TaskInfoEntry.LabelSelectorEntryR\rlabelSelector\x1a\x44\n\x16RequiredResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a@\n\x12LabelSelectorEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\x0b\n\t_actor_idB\x15\n\x13_placement_group_idB\x0c\n\n_task_infoB\x10\n\x0e_state_updatesB\x11\n\x0f_profile_eventsb\x06proto3') + + + +_EXPORTTASKEVENTDATA = DESCRIPTOR.message_types_by_name['ExportTaskEventData'] +_EXPORTTASKEVENTDATA_RAYERRORINFO = _EXPORTTASKEVENTDATA.nested_types_by_name['RayErrorInfo'] +_EXPORTTASKEVENTDATA_TASKLOGINFO = _EXPORTTASKEVENTDATA.nested_types_by_name['TaskLogInfo'] +_EXPORTTASKEVENTDATA_TASKSTATEUPDATE = _EXPORTTASKEVENTDATA.nested_types_by_name['TaskStateUpdate'] +_EXPORTTASKEVENTDATA_TASKSTATEUPDATE_STATETSNSENTRY = _EXPORTTASKEVENTDATA_TASKSTATEUPDATE.nested_types_by_name['StateTsNsEntry'] +_EXPORTTASKEVENTDATA_TASKINFOENTRY = _EXPORTTASKEVENTDATA.nested_types_by_name['TaskInfoEntry'] +_EXPORTTASKEVENTDATA_TASKINFOENTRY_REQUIREDRESOURCESENTRY = _EXPORTTASKEVENTDATA_TASKINFOENTRY.nested_types_by_name['RequiredResourcesEntry'] +_EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSENTRY = _EXPORTTASKEVENTDATA_TASKINFOENTRY.nested_types_by_name['LabelsEntry'] +_EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSELECTORENTRY = _EXPORTTASKEVENTDATA_TASKINFOENTRY.nested_types_by_name['LabelSelectorEntry'] +ExportTaskEventData = _reflection.GeneratedProtocolMessageType('ExportTaskEventData', (_message.Message,), { + + 'RayErrorInfo' : _reflection.GeneratedProtocolMessageType('RayErrorInfo', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTTASKEVENTDATA_RAYERRORINFO, + '__module__' : 'src.ray.protobuf.export_task_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTaskEventData.RayErrorInfo) + }) + , + + 'TaskLogInfo' : _reflection.GeneratedProtocolMessageType('TaskLogInfo', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTTASKEVENTDATA_TASKLOGINFO, + '__module__' : 'src.ray.protobuf.export_task_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTaskEventData.TaskLogInfo) + }) + , + + 'TaskStateUpdate' : _reflection.GeneratedProtocolMessageType('TaskStateUpdate', (_message.Message,), { + + 'StateTsNsEntry' : _reflection.GeneratedProtocolMessageType('StateTsNsEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTTASKEVENTDATA_TASKSTATEUPDATE_STATETSNSENTRY, + '__module__' : 'src.ray.protobuf.export_task_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTaskEventData.TaskStateUpdate.StateTsNsEntry) + }) + , + 'DESCRIPTOR' : _EXPORTTASKEVENTDATA_TASKSTATEUPDATE, + '__module__' : 'src.ray.protobuf.export_task_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTaskEventData.TaskStateUpdate) + }) + , + + 'TaskInfoEntry' : _reflection.GeneratedProtocolMessageType('TaskInfoEntry', (_message.Message,), { + + 'RequiredResourcesEntry' : _reflection.GeneratedProtocolMessageType('RequiredResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTTASKEVENTDATA_TASKINFOENTRY_REQUIREDRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.export_task_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTaskEventData.TaskInfoEntry.RequiredResourcesEntry) + }) + , + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSENTRY, + '__module__' : 'src.ray.protobuf.export_task_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTaskEventData.TaskInfoEntry.LabelsEntry) + }) + , + + 'LabelSelectorEntry' : _reflection.GeneratedProtocolMessageType('LabelSelectorEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSELECTORENTRY, + '__module__' : 'src.ray.protobuf.export_task_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTaskEventData.TaskInfoEntry.LabelSelectorEntry) + }) + , + 'DESCRIPTOR' : _EXPORTTASKEVENTDATA_TASKINFOENTRY, + '__module__' : 'src.ray.protobuf.export_task_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTaskEventData.TaskInfoEntry) + }) + , + 'DESCRIPTOR' : _EXPORTTASKEVENTDATA, + '__module__' : 'src.ray.protobuf.export_task_event_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTaskEventData) + }) +_sym_db.RegisterMessage(ExportTaskEventData) +_sym_db.RegisterMessage(ExportTaskEventData.RayErrorInfo) +_sym_db.RegisterMessage(ExportTaskEventData.TaskLogInfo) +_sym_db.RegisterMessage(ExportTaskEventData.TaskStateUpdate) +_sym_db.RegisterMessage(ExportTaskEventData.TaskStateUpdate.StateTsNsEntry) +_sym_db.RegisterMessage(ExportTaskEventData.TaskInfoEntry) +_sym_db.RegisterMessage(ExportTaskEventData.TaskInfoEntry.RequiredResourcesEntry) +_sym_db.RegisterMessage(ExportTaskEventData.TaskInfoEntry.LabelsEntry) +_sym_db.RegisterMessage(ExportTaskEventData.TaskInfoEntry.LabelSelectorEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _EXPORTTASKEVENTDATA_TASKSTATEUPDATE_STATETSNSENTRY._options = None + _EXPORTTASKEVENTDATA_TASKSTATEUPDATE_STATETSNSENTRY._serialized_options = b'8\001' + _EXPORTTASKEVENTDATA_TASKINFOENTRY_REQUIREDRESOURCESENTRY._options = None + _EXPORTTASKEVENTDATA_TASKINFOENTRY_REQUIREDRESOURCESENTRY._serialized_options = b'8\001' + _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSENTRY._options = None + _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSENTRY._serialized_options = b'8\001' + _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSELECTORENTRY._options = None + _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSELECTORENTRY._serialized_options = b'8\001' + _EXPORTTASKEVENTDATA._serialized_start=167 + _EXPORTTASKEVENTDATA._serialized_end=2484 + _EXPORTTASKEVENTDATA_RAYERRORINFO._serialized_start=511 + _EXPORTTASKEVENTDATA_RAYERRORINFO._serialized_end=613 + _EXPORTTASKEVENTDATA_TASKLOGINFO._serialized_start=616 + _EXPORTTASKEVENTDATA_TASKLOGINFO._serialized_end=953 + _EXPORTTASKEVENTDATA_TASKSTATEUPDATE._serialized_start=956 + _EXPORTTASKEVENTDATA_TASKSTATEUPDATE._serialized_end=1538 + _EXPORTTASKEVENTDATA_TASKSTATEUPDATE_STATETSNSENTRY._serialized_start=1381 + _EXPORTTASKEVENTDATA_TASKSTATEUPDATE_STATETSNSENTRY._serialized_end=1441 + _EXPORTTASKEVENTDATA_TASKINFOENTRY._serialized_start=1541 + _EXPORTTASKEVENTDATA_TASKINFOENTRY._serialized_end=2433 + _EXPORTTASKEVENTDATA_TASKINFOENTRY_REQUIREDRESOURCESENTRY._serialized_start=2204 + _EXPORTTASKEVENTDATA_TASKINFOENTRY_REQUIREDRESOURCESENTRY._serialized_end=2272 + _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSENTRY._serialized_start=2274 + _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSENTRY._serialized_end=2331 + _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSELECTORENTRY._serialized_start=2333 + _EXPORTTASKEVENTDATA_TASKINFOENTRY_LABELSELECTORENTRY._serialized_end=2397 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_task_event_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_task_event_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_task_event_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_train_state_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_train_state_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..16e701da78abf2328cf35475d781c9b5f197c687 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_train_state_pb2.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/export_train_state.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)src/ray/protobuf/export_train_state.proto\x12\x07ray.rpc\"\xb6\x07\n\x17\x45xportTrainRunEventData\x12%\n\x0eschema_version\x18\x01 \x01(\rR\rschemaVersion\x12\x0e\n\x02id\x18\x02 \x01(\tR\x02id\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x15\n\x06job_id\x18\x04 \x01(\x0cR\x05jobId\x12.\n\x13\x63ontroller_actor_id\x18\x05 \x01(\x0cR\x11\x63ontrollerActorId\x12\x42\n\x06status\x18\x06 \x01(\x0e\x32*.ray.rpc.ExportTrainRunEventData.RunStatusR\x06status\x12(\n\rstatus_detail\x18\x07 \x01(\tH\x00R\x0cstatusDetail\x88\x01\x01\x12\"\n\rstart_time_ns\x18\x08 \x01(\x04R\x0bstartTimeNs\x12#\n\x0b\x65nd_time_ns\x18\t \x01(\x04H\x01R\tendTimeNs\x88\x01\x01\x12<\n\x18\x63ontroller_log_file_path\x18\n \x01(\tH\x02R\x15\x63ontrollerLogFilePath\x88\x01\x01\x12*\n\x11ray_train_version\x18\x0b \x01(\rR\x0frayTrainVersion\x12\x61\n\x10train_run_panels\x18\x0c \x03(\x0b\x32\x37.ray.rpc.ExportTrainRunEventData.DashboardPanelMetadataR\x0etrainRunPanels\x12g\n\x13train_worker_panels\x18\r \x03(\x0b\x32\x37.ray.rpc.ExportTrainRunEventData.DashboardPanelMetadataR\x11trainWorkerPanels\x1a>\n\x16\x44\x61shboardPanelMetadata\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n\x05title\x18\x02 \x01(\tR\x05title\"\x9c\x01\n\tRunStatus\x12\x1a\n\x16RUN_STATUS_UNSPECIFIED\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x0e\n\nSCHEDULING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\x0e\n\nRESTARTING\x10\x04\x12\x0c\n\x08RESIZING\x10\x05\x12\x0c\n\x08\x46INISHED\x10\x06\x12\x0b\n\x07\x45RRORED\x10\x07\x12\x0b\n\x07\x41\x42ORTED\x10\x08\x42\x10\n\x0e_status_detailB\x0e\n\x0c_end_time_nsB\x1b\n\x19_controller_log_file_path\"\xf8\n\n\x1e\x45xportTrainRunAttemptEventData\x12%\n\x0eschema_version\x18\x01 \x01(\rR\rschemaVersion\x12\x15\n\x06run_id\x18\x02 \x01(\tR\x05runId\x12\x1d\n\nattempt_id\x18\x03 \x01(\tR\tattemptId\x12P\n\x06status\x18\x04 \x01(\x0e\x32\x38.ray.rpc.ExportTrainRunAttemptEventData.RunAttemptStatusR\x06status\x12(\n\rstatus_detail\x18\x05 \x01(\tH\x00R\x0cstatusDetail\x88\x01\x01\x12\"\n\rstart_time_ns\x18\x06 \x01(\x04R\x0bstartTimeNs\x12#\n\x0b\x65nd_time_ns\x18\x07 \x01(\x04H\x01R\tendTimeNs\x88\x01\x01\x12T\n\tresources\x18\x08 \x03(\x0b\x32\x36.ray.rpc.ExportTrainRunAttemptEventData.TrainResourcesR\tresources\x12M\n\x07workers\x18\t \x03(\x0b\x32\x33.ray.rpc.ExportTrainRunAttemptEventData.TrainWorkerR\x07workers\x12*\n\x11ray_train_version\x18\n \x01(\rR\x0frayTrainVersion\x1a\xb3\x01\n\x0eTrainResources\x12\x63\n\tresources\x18\x01 \x03(\x0b\x32\x45.ray.rpc.ExportTrainRunAttemptEventData.TrainResources.ResourcesEntryR\tresources\x1a<\n\x0eResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\xce\x03\n\x0bTrainWorker\x12\x1d\n\nworld_rank\x18\x01 \x01(\x05R\tworldRank\x12\x1d\n\nlocal_rank\x18\x02 \x01(\x05R\tlocalRank\x12\x1b\n\tnode_rank\x18\x03 \x01(\x05R\x08nodeRank\x12\x19\n\x08\x61\x63tor_id\x18\x04 \x01(\x0cR\x07\x61\x63torId\x12\x17\n\x07node_id\x18\x05 \x01(\x0cR\x06nodeId\x12\x17\n\x07node_ip\x18\x06 \x01(\tR\x06nodeIp\x12\x10\n\x03pid\x18\x07 \x01(\x05R\x03pid\x12\x17\n\x07gpu_ids\x18\x08 \x03(\x05R\x06gpuIds\x12P\n\x06status\x18\t \x01(\x0e\x32\x33.ray.rpc.ExportTrainRunAttemptEventData.ActorStatusH\x00R\x06status\x88\x01\x01\x12T\n\tresources\x18\n \x01(\x0b\x32\x36.ray.rpc.ExportTrainRunAttemptEventData.TrainResourcesR\tresources\x12\'\n\rlog_file_path\x18\x0b \x01(\tH\x01R\x0blogFilePath\x88\x01\x01\x42\t\n\x07_statusB\x10\n\x0e_log_file_path\"x\n\x10RunAttemptStatus\x12\"\n\x1eRUN_ATTEMPT_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0c\n\x08\x46INISHED\x10\x03\x12\x0b\n\x07\x45RRORED\x10\x04\x12\x0b\n\x07\x41\x42ORTED\x10\x05\"@\n\x0b\x41\x63torStatus\x12\x1c\n\x18\x41\x43TOR_STATUS_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LIVE\x10\x01\x12\x08\n\x04\x44\x45\x41\x44\x10\x02\x42\x10\n\x0e_status_detailB\x0e\n\x0c_end_time_nsB\x03\xf8\x01\x01\x62\x06proto3') + + + +_EXPORTTRAINRUNEVENTDATA = DESCRIPTOR.message_types_by_name['ExportTrainRunEventData'] +_EXPORTTRAINRUNEVENTDATA_DASHBOARDPANELMETADATA = _EXPORTTRAINRUNEVENTDATA.nested_types_by_name['DashboardPanelMetadata'] +_EXPORTTRAINRUNATTEMPTEVENTDATA = DESCRIPTOR.message_types_by_name['ExportTrainRunAttemptEventData'] +_EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES = _EXPORTTRAINRUNATTEMPTEVENTDATA.nested_types_by_name['TrainResources'] +_EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES_RESOURCESENTRY = _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES.nested_types_by_name['ResourcesEntry'] +_EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINWORKER = _EXPORTTRAINRUNATTEMPTEVENTDATA.nested_types_by_name['TrainWorker'] +_EXPORTTRAINRUNEVENTDATA_RUNSTATUS = _EXPORTTRAINRUNEVENTDATA.enum_types_by_name['RunStatus'] +_EXPORTTRAINRUNATTEMPTEVENTDATA_RUNATTEMPTSTATUS = _EXPORTTRAINRUNATTEMPTEVENTDATA.enum_types_by_name['RunAttemptStatus'] +_EXPORTTRAINRUNATTEMPTEVENTDATA_ACTORSTATUS = _EXPORTTRAINRUNATTEMPTEVENTDATA.enum_types_by_name['ActorStatus'] +ExportTrainRunEventData = _reflection.GeneratedProtocolMessageType('ExportTrainRunEventData', (_message.Message,), { + + 'DashboardPanelMetadata' : _reflection.GeneratedProtocolMessageType('DashboardPanelMetadata', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTTRAINRUNEVENTDATA_DASHBOARDPANELMETADATA, + '__module__' : 'src.ray.protobuf.export_train_state_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTrainRunEventData.DashboardPanelMetadata) + }) + , + 'DESCRIPTOR' : _EXPORTTRAINRUNEVENTDATA, + '__module__' : 'src.ray.protobuf.export_train_state_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTrainRunEventData) + }) +_sym_db.RegisterMessage(ExportTrainRunEventData) +_sym_db.RegisterMessage(ExportTrainRunEventData.DashboardPanelMetadata) + +ExportTrainRunAttemptEventData = _reflection.GeneratedProtocolMessageType('ExportTrainRunAttemptEventData', (_message.Message,), { + + 'TrainResources' : _reflection.GeneratedProtocolMessageType('TrainResources', (_message.Message,), { + + 'ResourcesEntry' : _reflection.GeneratedProtocolMessageType('ResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES_RESOURCESENTRY, + '__module__' : 'src.ray.protobuf.export_train_state_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTrainRunAttemptEventData.TrainResources.ResourcesEntry) + }) + , + 'DESCRIPTOR' : _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES, + '__module__' : 'src.ray.protobuf.export_train_state_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTrainRunAttemptEventData.TrainResources) + }) + , + + 'TrainWorker' : _reflection.GeneratedProtocolMessageType('TrainWorker', (_message.Message,), { + 'DESCRIPTOR' : _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINWORKER, + '__module__' : 'src.ray.protobuf.export_train_state_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTrainRunAttemptEventData.TrainWorker) + }) + , + 'DESCRIPTOR' : _EXPORTTRAINRUNATTEMPTEVENTDATA, + '__module__' : 'src.ray.protobuf.export_train_state_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ExportTrainRunAttemptEventData) + }) +_sym_db.RegisterMessage(ExportTrainRunAttemptEventData) +_sym_db.RegisterMessage(ExportTrainRunAttemptEventData.TrainResources) +_sym_db.RegisterMessage(ExportTrainRunAttemptEventData.TrainResources.ResourcesEntry) +_sym_db.RegisterMessage(ExportTrainRunAttemptEventData.TrainWorker) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\370\001\001' + _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES_RESOURCESENTRY._options = None + _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES_RESOURCESENTRY._serialized_options = b'8\001' + _EXPORTTRAINRUNEVENTDATA._serialized_start=55 + _EXPORTTRAINRUNEVENTDATA._serialized_end=1005 + _EXPORTTRAINRUNEVENTDATA_DASHBOARDPANELMETADATA._serialized_start=721 + _EXPORTTRAINRUNEVENTDATA_DASHBOARDPANELMETADATA._serialized_end=783 + _EXPORTTRAINRUNEVENTDATA_RUNSTATUS._serialized_start=786 + _EXPORTTRAINRUNEVENTDATA_RUNSTATUS._serialized_end=942 + _EXPORTTRAINRUNATTEMPTEVENTDATA._serialized_start=1008 + _EXPORTTRAINRUNATTEMPTEVENTDATA._serialized_end=2408 + _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES._serialized_start=1542 + _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES._serialized_end=1721 + _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES_RESOURCESENTRY._serialized_start=1661 + _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINRESOURCES_RESOURCESENTRY._serialized_end=1721 + _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINWORKER._serialized_start=1724 + _EXPORTTRAINRUNATTEMPTEVENTDATA_TRAINWORKER._serialized_end=2186 + _EXPORTTRAINRUNATTEMPTEVENTDATA_RUNATTEMPTSTATUS._serialized_start=2188 + _EXPORTTRAINRUNATTEMPTEVENTDATA_RUNATTEMPTSTATUS._serialized_end=2308 + _EXPORTTRAINRUNATTEMPTEVENTDATA_ACTORSTATUS._serialized_start=2310 + _EXPORTTRAINRUNATTEMPTEVENTDATA_ACTORSTATUS._serialized_end=2374 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_train_state_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_train_state_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/export_train_state_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..9260a0b7b9d600fab08e3ce2ad8839e33c1b19e2 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_pb2.py @@ -0,0 +1,528 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/gcs.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 +from . import profile_events_pb2 as src_dot_ray_dot_protobuf_dot_profile__events__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1asrc/ray/protobuf/gcs.proto\x12\x07ray.rpc\x1a\x1dsrc/ray/protobuf/common.proto\x1a%src/ray/protobuf/profile_events.proto\"m\n\x08GcsEntry\x12\x37\n\x0b\x63hange_mode\x18\x01 \x01(\x0e\x32\x16.ray.rpc.GcsChangeModeR\nchangeMode\x12\x0e\n\x02id\x18\x02 \x01(\x0cR\x02id\x12\x18\n\x07\x65ntries\x18\x03 \x03(\x0cR\x07\x65ntries\"\xce\x0c\n\x0e\x41\x63torTableData\x12\x19\n\x08\x61\x63tor_id\x18\x01 \x01(\x0cR\x07\x61\x63torId\x12\x1b\n\tparent_id\x18\x02 \x01(\x0cR\x08parentId\x12\x15\n\x06job_id\x18\x04 \x01(\x0cR\x05jobId\x12\x38\n\x05state\x18\x06 \x01(\x0e\x32\".ray.rpc.ActorTableData.ActorStateR\x05state\x12!\n\x0cmax_restarts\x18\x07 \x01(\x03R\x0bmaxRestarts\x12!\n\x0cnum_restarts\x18\x08 \x01(\x04R\x0bnumRestarts\x12*\n\x07\x61\x64\x64ress\x18\t \x01(\x0b\x32\x10.ray.rpc.AddressR\x07\x61\x64\x64ress\x12\x35\n\rowner_address\x18\n \x01(\x0b\x32\x10.ray.rpc.AddressR\x0cownerAddress\x12\x1f\n\x0bis_detached\x18\x0b \x01(\x08R\nisDetached\x12\x12\n\x04name\x18\x0c \x01(\tR\x04name\x12\x1c\n\ttimestamp\x18\r \x01(\x01R\ttimestamp\x12\x44\n\x10resource_mapping\x18\x0f \x03(\x0b\x32\x19.ray.rpc.ResourceMapEntryR\x0fresourceMapping\x12\x10\n\x03pid\x18\x10 \x01(\rR\x03pid\x12L\n\x13\x66unction_descriptor\x18\x11 \x01(\x0b\x32\x1b.ray.rpc.FunctionDescriptorR\x12\x66unctionDescriptor\x12#\n\rray_namespace\x18\x13 \x01(\tR\x0crayNamespace\x12\x1d\n\nstart_time\x18\x14 \x01(\x04R\tstartTime\x12\x19\n\x08\x65nd_time\x18\x15 \x01(\x04R\x07\x65ndTime\x12\x34\n\x16serialized_runtime_env\x18\x16 \x01(\tR\x14serializedRuntimeEnv\x12\x1d\n\nclass_name\x18\x17 \x01(\tR\tclassName\x12\x39\n\x0b\x64\x65\x61th_cause\x18\x18 \x01(\x0b\x32\x18.ray.rpc.ActorDeathCauseR\ndeathCause\x12]\n\x12required_resources\x18\x1c \x03(\x0b\x32..ray.rpc.ActorTableData.RequiredResourcesEntryR\x11requiredResources\x12\x1c\n\x07node_id\x18\x1d \x01(\x0cH\x00R\x06nodeId\x88\x01\x01\x12\x31\n\x12placement_group_id\x18\x1e \x01(\x0cH\x01R\x10placementGroupId\x88\x01\x01\x12\x1b\n\trepr_name\x18\x1f \x01(\tR\x08reprName\x12\x1c\n\tpreempted\x18 \x01(\x08R\tpreempted\x12Y\n*num_restarts_due_to_lineage_reconstruction\x18! \x01(\x04R%numRestartsDueToLineageReconstruction\x12 \n\tcall_site\x18\" \x01(\tH\x02R\x08\x63\x61llSite\x88\x01\x01\x12Q\n\x0elabel_selector\x18# \x03(\x0b\x32*.ray.rpc.ActorTableData.LabelSelectorEntryR\rlabelSelector\x12K\n#num_restarts_due_to_node_preemption\x18$ \x01(\x04R\x1enumRestartsDueToNodePreemption\x1a\x44\n\x16RequiredResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a@\n\x12LabelSelectorEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"a\n\nActorState\x12\x18\n\x14\x44\x45PENDENCIES_UNREADY\x10\x00\x12\x14\n\x10PENDING_CREATION\x10\x01\x12\t\n\x05\x41LIVE\x10\x02\x12\x0e\n\nRESTARTING\x10\x03\x12\x08\n\x04\x44\x45\x41\x44\x10\x04\x42\n\n\x08_node_idB\x15\n\x13_placement_group_idB\x0c\n\n_call_site\"~\n\x0e\x45rrorTableData\x12\x15\n\x06job_id\x18\x01 \x01(\x0cR\x05jobId\x12\x12\n\x04type\x18\x02 \x01(\tR\x04type\x12#\n\rerror_message\x18\x03 \x01(\tR\x0c\x65rrorMessage\x12\x1c\n\ttimestamp\x18\x04 \x01(\x01R\ttimestamp\"\xd1\x02\n\x0bTaskLogInfo\x12$\n\x0bstdout_file\x18\x01 \x01(\tH\x00R\nstdoutFile\x88\x01\x01\x12$\n\x0bstderr_file\x18\x02 \x01(\tH\x01R\nstderrFile\x88\x01\x01\x12&\n\x0cstdout_start\x18\x03 \x01(\x05H\x02R\x0bstdoutStart\x88\x01\x01\x12\"\n\nstdout_end\x18\x04 \x01(\x05H\x03R\tstdoutEnd\x88\x01\x01\x12&\n\x0cstderr_start\x18\x05 \x01(\x05H\x04R\x0bstderrStart\x88\x01\x01\x12\"\n\nstderr_end\x18\x06 \x01(\x05H\x05R\tstderrEnd\x88\x01\x01\x42\x0e\n\x0c_stdout_fileB\x0e\n\x0c_stderr_fileB\x0f\n\r_stdout_startB\r\n\x0b_stdout_endB\x0f\n\r_stderr_startB\r\n\x0b_stderr_end\"\xcb\x04\n\x0fTaskStateUpdate\x12\x1c\n\x07node_id\x18\x01 \x01(\x0cH\x00R\x06nodeId\x88\x01\x01\x12 \n\tworker_id\x18\x08 \x01(\x0cH\x01R\x08workerId\x88\x01\x01\x12\x39\n\nerror_info\x18\t \x01(\x0b\x32\x15.ray.rpc.RayErrorInfoH\x02R\terrorInfo\x88\x01\x01\x12=\n\rtask_log_info\x18\n \x01(\x0b\x32\x14.ray.rpc.TaskLogInfoH\x03R\x0btaskLogInfo\x88\x01\x01\x12+\n\x0f\x61\x63tor_repr_name\x18\x0b \x01(\tH\x04R\ractorReprName\x88\x01\x01\x12\"\n\nworker_pid\x18\x0c \x01(\x05H\x05R\tworkerPid\x88\x01\x01\x12\x31\n\x12is_debugger_paused\x18\r \x01(\x08H\x06R\x10isDebuggerPaused\x88\x01\x01\x12G\n\x0bstate_ts_ns\x18\x0e \x03(\x0b\x32\'.ray.rpc.TaskStateUpdate.StateTsNsEntryR\tstateTsNs\x1a<\n\x0eStateTsNsEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\x42\n\n\x08_node_idB\x0c\n\n_worker_idB\r\n\x0b_error_infoB\x10\n\x0e_task_log_infoB\x12\n\x10_actor_repr_nameB\r\n\x0b_worker_pidB\x15\n\x13_is_debugger_paused\"\xd8\x02\n\nTaskEvents\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\x12%\n\x0e\x61ttempt_number\x18\x02 \x01(\x05R\rattemptNumber\x12\x38\n\ttask_info\x18\x03 \x01(\x0b\x32\x16.ray.rpc.TaskInfoEntryH\x00R\x08taskInfo\x88\x01\x01\x12\x42\n\rstate_updates\x18\x04 \x01(\x0b\x32\x18.ray.rpc.TaskStateUpdateH\x01R\x0cstateUpdates\x88\x01\x01\x12\x42\n\x0eprofile_events\x18\x05 \x01(\x0b\x32\x16.ray.rpc.ProfileEventsH\x02R\rprofileEvents\x88\x01\x01\x12\x15\n\x06job_id\x18\x06 \x01(\x0cR\x05jobIdB\x0c\n\n_task_infoB\x10\n\x0e_state_updatesB\x11\n\x0f_profile_events\"\xe8\x01\n\rTaskEventData\x12\x39\n\x0e\x65vents_by_task\x18\x01 \x03(\x0b\x32\x13.ray.rpc.TaskEventsR\x0c\x65ventsByTask\x12H\n\x15\x64ropped_task_attempts\x18\x02 \x03(\x0b\x32\x14.ray.rpc.TaskAttemptR\x13\x64roppedTaskAttempts\x12;\n\x1anum_profile_events_dropped\x18\x03 \x01(\x05R\x17numProfileEventsDropped\x12\x15\n\x06job_id\x18\x04 \x01(\x0cR\x05jobId\"\xda\x01\n\x12\x41vailableResources\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12\x64\n\x13resources_available\x18\x02 \x03(\x0b\x32\x33.ray.rpc.AvailableResources.ResourcesAvailableEntryR\x12resourcesAvailable\x1a\x45\n\x17ResourcesAvailableEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\"\xc2\x01\n\x0eTotalResources\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12T\n\x0fresources_total\x18\x02 \x03(\x0b\x32+.ray.rpc.TotalResources.ResourcesTotalEntryR\x0eresourcesTotal\x1a\x41\n\x13ResourcesTotalEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\"\xcc\x01\n\x0cNodeSnapshot\x12\x31\n\x05state\x18\x01 \x01(\x0e\x32\x1b.ray.rpc.NodeSnapshot.StateR\x05state\x12(\n\x10idle_duration_ms\x18\x02 \x01(\x03R\x0eidleDurationMs\x12#\n\rnode_activity\x18\x03 \x03(\tR\x0cnodeActivity\":\n\x05State\x12\r\n\tUNDEFINED\x10\x00\x12\x08\n\x04IDLE\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44RAINING\x10\x03\"\x8a\t\n\x0bGcsNodeInfo\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12\x30\n\x14node_manager_address\x18\x02 \x01(\tR\x12nodeManagerAddress\x12,\n\x12raylet_socket_name\x18\x03 \x01(\tR\x10rayletSocketName\x12\x37\n\x18object_store_socket_name\x18\x04 \x01(\tR\x15objectStoreSocketName\x12*\n\x11node_manager_port\x18\x05 \x01(\x05R\x0fnodeManagerPort\x12.\n\x13object_manager_port\x18\x06 \x01(\x05R\x11objectManagerPort\x12\x37\n\x05state\x18\x07 \x01(\x0e\x32!.ray.rpc.GcsNodeInfo.GcsNodeStateR\x05state\x12\x32\n\x15node_manager_hostname\x18\x08 \x01(\tR\x13nodeManagerHostname\x12.\n\x13metrics_export_port\x18\t \x01(\x05R\x11metricsExportPort\x12\x33\n\x16runtime_env_agent_port\x18\x1b \x01(\x05R\x13runtimeEnvAgentPort\x12Q\n\x0fresources_total\x18\x0b \x03(\x0b\x32(.ray.rpc.GcsNodeInfo.ResourcesTotalEntryR\x0eresourcesTotal\x12\x1b\n\tnode_name\x18\x0c \x01(\tR\x08nodeName\x12\x1f\n\x0binstance_id\x18\r \x01(\tR\ninstanceId\x12$\n\x0enode_type_name\x18\x0e \x01(\tR\x0cnodeTypeName\x12,\n\x12instance_type_name\x18\x0f \x01(\tR\x10instanceTypeName\x12\"\n\rstart_time_ms\x18\x17 \x01(\x04R\x0bstartTimeMs\x12\x1e\n\x0b\x65nd_time_ms\x18\x18 \x01(\x04R\tendTimeMs\x12 \n\x0cis_head_node\x18\x19 \x01(\x08R\nisHeadNode\x12\x38\n\x06labels\x18\x1a \x03(\x0b\x32 .ray.rpc.GcsNodeInfo.LabelsEntryR\x06labels\x12<\n\x0estate_snapshot\x18\x1c \x01(\x0b\x32\x15.ray.rpc.NodeSnapshotR\rstateSnapshot\x12\x35\n\ndeath_info\x18\x1d \x01(\x0b\x32\x16.ray.rpc.NodeDeathInfoR\tdeathInfo\x1a\x41\n\x13ResourcesTotalEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"#\n\x0cGcsNodeState\x12\t\n\x05\x41LIVE\x10\x00\x12\x08\n\x04\x44\x45\x41\x44\x10\x01\"\xb0\x08\n\x0bJobsAPIInfo\x12\x16\n\x06status\x18\x01 \x01(\tR\x06status\x12\x1e\n\nentrypoint\x18\x02 \x01(\tR\nentrypoint\x12\x1d\n\x07message\x18\x03 \x01(\tH\x00R\x07message\x88\x01\x01\x12\"\n\nerror_type\x18\x04 \x01(\tH\x01R\terrorType\x88\x01\x01\x12\"\n\nstart_time\x18\x05 \x01(\x04H\x02R\tstartTime\x88\x01\x01\x12\x1e\n\x08\x65nd_time\x18\x06 \x01(\x04H\x03R\x07\x65ndTime\x88\x01\x01\x12>\n\x08metadata\x18\x07 \x03(\x0b\x32\".ray.rpc.JobsAPIInfo.MetadataEntryR\x08metadata\x12-\n\x10runtime_env_json\x18\x08 \x01(\tH\x04R\x0eruntimeEnvJson\x88\x01\x01\x12\x33\n\x13\x65ntrypoint_num_cpus\x18\t \x01(\x01H\x05R\x11\x65ntrypointNumCpus\x88\x01\x01\x12\x33\n\x13\x65ntrypoint_num_gpus\x18\n \x01(\x01H\x06R\x11\x65ntrypointNumGpus\x88\x01\x01\x12`\n\x14\x65ntrypoint_resources\x18\x0b \x03(\x0b\x32-.ray.rpc.JobsAPIInfo.EntrypointResourcesEntryR\x13\x65ntrypointResources\x12>\n\x19\x64river_agent_http_address\x18\x0c \x01(\tH\x07R\x16\x64riverAgentHttpAddress\x88\x01\x01\x12)\n\x0e\x64river_node_id\x18\r \x01(\tH\x08R\x0c\x64riverNodeId\x88\x01\x01\x12-\n\x10\x64river_exit_code\x18\x0e \x01(\x05H\tR\x0e\x64riverExitCode\x88\x01\x01\x12\x30\n\x11\x65ntrypoint_memory\x18\x0f \x01(\x04H\nR\x10\x65ntrypointMemory\x88\x01\x01\x1a;\n\rMetadataEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a\x46\n\x18\x45ntrypointResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x42\n\n\x08_messageB\r\n\x0b_error_typeB\r\n\x0b_start_timeB\x0b\n\t_end_timeB\x13\n\x11_runtime_env_jsonB\x16\n\x14_entrypoint_num_cpusB\x16\n\x14_entrypoint_num_gpusB\x1c\n\x1a_driver_agent_http_addressB\x11\n\x0f_driver_node_idB\x13\n\x11_driver_exit_codeB\x14\n\x12_entrypoint_memory\"\xd7\x06\n\x0fWorkerTableData\x12\x19\n\x08is_alive\x18\x01 \x01(\x08R\x07isAlive\x12\x37\n\x0eworker_address\x18\x02 \x01(\x0b\x32\x10.ray.rpc.AddressR\rworkerAddress\x12\x1c\n\ttimestamp\x18\x03 \x01(\x03R\ttimestamp\x12\x34\n\x0bworker_type\x18\x05 \x01(\x0e\x32\x13.ray.rpc.WorkerTypeR\nworkerType\x12I\n\x0bworker_info\x18\x06 \x03(\x0b\x32(.ray.rpc.WorkerTableData.WorkerInfoEntryR\nworkerInfo\x12M\n\x17\x63reation_task_exception\x18\x12 \x01(\x0b\x32\x15.ray.rpc.RayExceptionR\x15\x63reationTaskException\x12\x39\n\texit_type\x18\x13 \x01(\x0e\x32\x17.ray.rpc.WorkerExitTypeH\x00R\x08\x65xitType\x88\x01\x01\x12$\n\x0b\x65xit_detail\x18\x14 \x01(\tH\x01R\nexitDetail\x88\x01\x01\x12\x10\n\x03pid\x18\x15 \x01(\rR\x03pid\x12\"\n\rstart_time_ms\x18\x17 \x01(\x04R\x0bstartTimeMs\x12\x1e\n\x0b\x65nd_time_ms\x18\x18 \x01(\x04R\tendTimeMs\x12\x31\n\x15worker_launch_time_ms\x18\x19 \x01(\x04R\x12workerLaunchTimeMs\x12\x35\n\x17worker_launched_time_ms\x18\x1a \x01(\x04R\x14workerLaunchedTimeMs\x12(\n\rdebugger_port\x18\x1b \x01(\rH\x02R\x0c\x64\x65\x62uggerPort\x88\x01\x01\x12\x31\n\x12num_paused_threads\x18\x1c \x01(\rH\x03R\x10numPausedThreads\x88\x01\x01\x1a=\n\x0fWorkerInfoEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value:\x02\x38\x01\x42\x0c\n\n_exit_typeB\x0e\n\x0c_exit_detailB\x10\n\x0e_debugger_portB\x15\n\x13_num_paused_threads\"G\n\x0fWorkerDeltaData\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12\x1b\n\tworker_id\x18\x02 \x01(\x0cR\x08workerId\"3\n\rPubSubMessage\x12\x0e\n\x02id\x18\x01 \x01(\x0cR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\x0cR\x04\x64\x61ta\"\xe8\x02\n\x0eResourceDemand\x12\x38\n\x05shape\x18\x01 \x03(\x0b\x32\".ray.rpc.ResourceDemand.ShapeEntryR\x05shape\x12\x39\n\x19num_ready_requests_queued\x18\x02 \x01(\x04R\x16numReadyRequestsQueued\x12\x43\n\x1enum_infeasible_requests_queued\x18\x03 \x01(\x04R\x1bnumInfeasibleRequestsQueued\x12!\n\x0c\x62\x61\x63klog_size\x18\x04 \x01(\x03R\x0b\x62\x61\x63klogSize\x12?\n\x0flabel_selectors\x18\x05 \x03(\x0b\x32\x16.ray.rpc.LabelSelectorR\x0elabelSelectors\x1a\x38\n\nShapeEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\"R\n\x0cResourceLoad\x12\x42\n\x10resource_demands\x18\x01 \x03(\x0b\x32\x17.ray.rpc.ResourceDemandR\x0fresourceDemands\"\xbc\n\n\rResourcesData\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12_\n\x13resources_available\x18\x02 \x03(\x0b\x32..ray.rpc.ResourcesData.ResourcesAvailableEntryR\x12resourcesAvailable\x12S\n\x0fresources_total\x18\x04 \x03(\x0b\x32*.ray.rpc.ResourcesData.ResourcesTotalEntryR\x0eresourcesTotal\x12M\n\rresource_load\x18\x05 \x03(\x0b\x32(.ray.rpc.ResourcesData.ResourceLoadEntryR\x0cresourceLoad\x12J\n\x16resource_load_by_shape\x18\x07 \x01(\x0b\x32\x15.ray.rpc.ResourceLoadR\x13resourceLoadByShape\x12\x30\n\x14node_manager_address\x18\t \x01(\tR\x12nodeManagerAddress\x12.\n\x13object_pulls_queued\x18\n \x01(\x08R\x11objectPullsQueued\x12\x63\n\x15resources_normal_task\x18\x0b \x03(\x0b\x32/.ray.rpc.ResourcesData.ResourcesNormalTaskEntryR\x13resourcesNormalTask\x12\x41\n\x1dresources_normal_task_changed\x18\x0c \x01(\x08R\x1aresourcesNormalTaskChanged\x12\x45\n\x1fresources_normal_task_timestamp\x18\r \x01(\x03R\x1cresourcesNormalTaskTimestamp\x12\x44\n\x1f\x63luster_full_of_actors_detected\x18\x0e \x01(\x08R\x1b\x63lusterFullOfActorsDetected\x12(\n\x10idle_duration_ms\x18\x0f \x01(\x03R\x0eidleDurationMs\x12\x1f\n\x0bis_draining\x18\x10 \x01(\x08R\nisDraining\x12\x43\n\x1e\x64raining_deadline_timestamp_ms\x18\x12 \x01(\x03R\x1b\x64rainingDeadlineTimestampMs\x12:\n\x06labels\x18\x13 \x03(\x0b\x32\".ray.rpc.ResourcesData.LabelsEntryR\x06labels\x1a\x45\n\x17ResourcesAvailableEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x41\n\x13ResourcesTotalEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a?\n\x11ResourceLoadEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x46\n\x18ResourcesNormalTaskEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01J\x04\x08\x03\x10\x04J\x04\x08\x08\x10\tJ\x04\x08\x11\x10\x12\"\xe1\x01\n\x16ResourceUsageBatchData\x12,\n\x05\x62\x61tch\x18\x01 \x03(\x0b\x32\x16.ray.rpc.ResourcesDataR\x05\x62\x61tch\x12J\n\x16resource_load_by_shape\x18\x02 \x01(\x0b\x32\x15.ray.rpc.ResourceLoadR\x13resourceLoadByShape\x12M\n\x14placement_group_load\x18\x03 \x01(\x0b\x32\x1b.ray.rpc.PlacementGroupLoadR\x12placementGroupLoad\"h\n\x12PlacementGroupLoad\x12R\n\x14placement_group_data\x18\x01 \x03(\x0b\x32 .ray.rpc.PlacementGroupTableDataR\x12placementGroupData\"\xdc\x04\n\x13PlacementGroupStats\x12?\n\x1c\x63reation_request_received_ns\x18\x02 \x01(\x03R\x19\x63reationRequestReceivedNs\x12;\n\x1ascheduling_started_time_ns\x18\x03 \x01(\x03R\x17schedulingStartedTimeNs\x12\x32\n\x15scheduling_latency_us\x18\x04 \x01(\x03R\x13schedulingLatencyUs\x12\x41\n\x1e\x65nd_to_end_creation_latency_us\x18\x05 \x01(\x03R\x19\x65ndToEndCreationLatencyUs\x12-\n\x12scheduling_attempt\x18\x06 \x01(\rR\x11schedulingAttempt\x12\x33\n\x16highest_retry_delay_ms\x18\x07 \x01(\x01R\x13highestRetryDelayMs\x12W\n\x10scheduling_state\x18\x08 \x01(\x0e\x32,.ray.rpc.PlacementGroupStats.SchedulingStateR\x0fschedulingState\"\x92\x01\n\x0fSchedulingState\x12\n\n\x06QUEUED\x10\x00\x12\x0b\n\x07REMOVED\x10\x01\x12\x16\n\x12SCHEDULING_STARTED\x10\x02\x12\x10\n\x0cNO_RESOURCES\x10\x03\x12\x0e\n\nINFEASIBLE\x10\x04\x12\x1e\n\x1a\x46\x41ILED_TO_COMMIT_RESOURCES\x10\x05\x12\x0c\n\x08\x46INISHED\x10\x06\"\xb1\x07\n\x17PlacementGroupTableData\x12,\n\x12placement_group_id\x18\x01 \x01(\x0cR\x10placementGroupId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12)\n\x07\x62undles\x18\x03 \x03(\x0b\x32\x0f.ray.rpc.BundleR\x07\x62undles\x12\x36\n\x08strategy\x18\x04 \x01(\x0e\x32\x1a.ray.rpc.PlacementStrategyR\x08strategy\x12J\n\x05state\x18\x05 \x01(\x0e\x32\x34.ray.rpc.PlacementGroupTableData.PlacementGroupStateR\x05state\x12$\n\x0e\x63reator_job_id\x18\x06 \x01(\x0cR\x0c\x63reatorJobId\x12(\n\x10\x63reator_actor_id\x18\x07 \x01(\x0cR\x0e\x63reatorActorId\x12(\n\x10\x63reator_job_dead\x18\x08 \x01(\x08R\x0e\x63reatorJobDead\x12,\n\x12\x63reator_actor_dead\x18\t \x01(\x08R\x10\x63reatorActorDead\x12\x1f\n\x0bis_detached\x18\n \x01(\x08R\nisDetached\x12#\n\rray_namespace\x18\x0b \x01(\tR\x0crayNamespace\x12\x32\n\x05stats\x18\x0c \x01(\x0b\x32\x1c.ray.rpc.PlacementGroupStatsR\x05stats\x12\x38\n\x19max_cpu_fraction_per_node\x18\r \x01(\x01R\x15maxCpuFractionPerNode\x12-\n\x13soft_target_node_id\x18\x0e \x01(\x0cR\x10softTargetNodeId\x12P\n%placement_group_creation_timestamp_ms\x18\x0f \x01(\x03R!placementGroupCreationTimestampMs\x12j\n3placement_group_final_bundle_placement_timestamp_ms\x18\x10 \x01(\x03R-placementGroupFinalBundlePlacementTimestampMs\"\\\n\x13PlacementGroupState\x12\x0b\n\x07PENDING\x10\x00\x12\x0c\n\x08PREPARED\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x12\x10\n\x0cRESCHEDULING\x10\x04\"\xed\x03\n\x0cJobTableData\x12\x15\n\x06job_id\x18\x01 \x01(\x0cR\x05jobId\x12\x17\n\x07is_dead\x18\x02 \x01(\x08R\x06isDead\x12\x1c\n\ttimestamp\x18\x03 \x01(\x03R\ttimestamp\x12*\n\x11\x64river_ip_address\x18\x04 \x01(\tR\x0f\x64riverIpAddress\x12\x1d\n\ndriver_pid\x18\x05 \x01(\x03R\tdriverPid\x12*\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x12.ray.rpc.JobConfigR\x06\x63onfig\x12\x1d\n\nstart_time\x18\x07 \x01(\x04R\tstartTime\x12\x19\n\x08\x65nd_time\x18\x08 \x01(\x04R\x07\x65ndTime\x12\x1e\n\nentrypoint\x18\t \x01(\tR\nentrypoint\x12\x34\n\x08job_info\x18\n \x01(\x0b\x32\x14.ray.rpc.JobsAPIInfoH\x00R\x07jobInfo\x88\x01\x01\x12-\n\x10is_running_tasks\x18\x0b \x01(\x08H\x01R\x0eisRunningTasks\x88\x01\x01\x12\x37\n\x0e\x64river_address\x18\x0c \x01(\x0b\x32\x10.ray.rpc.AddressR\rdriverAddressB\x0b\n\t_job_infoB\x13\n\x11_is_running_tasks*\xc7\x02\n\x0bTablePrefix\x12\x14\n\x10TABLE_PREFIX_MIN\x10\x00\x12\n\n\x06UNUSED\x10\x01\x12\x08\n\x04TASK\x10\x02\x12\x0f\n\x0bRAYLET_TASK\x10\x03\x12\x08\n\x04NODE\x10\x04\x12\n\n\x06OBJECT\x10\x05\x12\t\n\x05\x41\x43TOR\x10\x06\x12\x0c\n\x08\x46UNCTION\x10\x07\x12\x17\n\x13TASK_RECONSTRUCTION\x10\x08\x12\x18\n\x14RESOURCE_USAGE_BATCH\x10\t\x12\x07\n\x03JOB\x10\n\x12\x0e\n\nTASK_LEASE\x10\x0c\x12\x11\n\rNODE_RESOURCE\x10\r\x12\x10\n\x0c\x44IRECT_ACTOR\x10\x0e\x12\x0b\n\x07WORKERS\x10\x0f\x12\x1c\n\x18PLACEMENT_GROUP_SCHEDULE\x10\x10\x12\x13\n\x0fPLACEMENT_GROUP\x10\x11\x12\x06\n\x02KV\x10\x12\x12\x13\n\x0f\x41\x43TOR_TASK_SPEC\x10\x13*\xbe\x02\n\x0bTablePubsub\x12\x14\n\x10TABLE_PUBSUB_MIN\x10\x00\x12\x0e\n\nNO_PUBLISH\x10\x01\x12\x0f\n\x0bTASK_PUBSUB\x10\x02\x12\x16\n\x12RAYLET_TASK_PUBSUB\x10\x03\x12\x0f\n\x0bNODE_PUBSUB\x10\x04\x12\x11\n\rOBJECT_PUBSUB\x10\x05\x12\x10\n\x0c\x41\x43TOR_PUBSUB\x10\x06\x12\x1f\n\x1bRESOURCE_USAGE_BATCH_PUBSUB\x10\x07\x12\x15\n\x11TASK_LEASE_PUBSUB\x10\x08\x12\x0e\n\nJOB_PUBSUB\x10\t\x12\x18\n\x14NODE_RESOURCE_PUBSUB\x10\n\x12\x17\n\x13\x44IRECT_ACTOR_PUBSUB\x10\x0b\x12\x19\n\x15WORKER_FAILURE_PUBSUB\x10\x0c\x12\x14\n\x10TABLE_PUBSUB_MAX\x10\r*.\n\rGcsChangeMode\x12\x11\n\rAPPEND_OR_ADD\x10\x00\x12\n\n\x06REMOVE\x10\x01\x42\x1a\n\x18io.ray.runtime.generatedb\x06proto3') + +_TABLEPREFIX = DESCRIPTOR.enum_types_by_name['TablePrefix'] +TablePrefix = enum_type_wrapper.EnumTypeWrapper(_TABLEPREFIX) +_TABLEPUBSUB = DESCRIPTOR.enum_types_by_name['TablePubsub'] +TablePubsub = enum_type_wrapper.EnumTypeWrapper(_TABLEPUBSUB) +_GCSCHANGEMODE = DESCRIPTOR.enum_types_by_name['GcsChangeMode'] +GcsChangeMode = enum_type_wrapper.EnumTypeWrapper(_GCSCHANGEMODE) +TABLE_PREFIX_MIN = 0 +UNUSED = 1 +TASK = 2 +RAYLET_TASK = 3 +NODE = 4 +OBJECT = 5 +ACTOR = 6 +FUNCTION = 7 +TASK_RECONSTRUCTION = 8 +RESOURCE_USAGE_BATCH = 9 +JOB = 10 +TASK_LEASE = 12 +NODE_RESOURCE = 13 +DIRECT_ACTOR = 14 +WORKERS = 15 +PLACEMENT_GROUP_SCHEDULE = 16 +PLACEMENT_GROUP = 17 +KV = 18 +ACTOR_TASK_SPEC = 19 +TABLE_PUBSUB_MIN = 0 +NO_PUBLISH = 1 +TASK_PUBSUB = 2 +RAYLET_TASK_PUBSUB = 3 +NODE_PUBSUB = 4 +OBJECT_PUBSUB = 5 +ACTOR_PUBSUB = 6 +RESOURCE_USAGE_BATCH_PUBSUB = 7 +TASK_LEASE_PUBSUB = 8 +JOB_PUBSUB = 9 +NODE_RESOURCE_PUBSUB = 10 +DIRECT_ACTOR_PUBSUB = 11 +WORKER_FAILURE_PUBSUB = 12 +TABLE_PUBSUB_MAX = 13 +APPEND_OR_ADD = 0 +REMOVE = 1 + + +_GCSENTRY = DESCRIPTOR.message_types_by_name['GcsEntry'] +_ACTORTABLEDATA = DESCRIPTOR.message_types_by_name['ActorTableData'] +_ACTORTABLEDATA_REQUIREDRESOURCESENTRY = _ACTORTABLEDATA.nested_types_by_name['RequiredResourcesEntry'] +_ACTORTABLEDATA_LABELSELECTORENTRY = _ACTORTABLEDATA.nested_types_by_name['LabelSelectorEntry'] +_ERRORTABLEDATA = DESCRIPTOR.message_types_by_name['ErrorTableData'] +_TASKLOGINFO = DESCRIPTOR.message_types_by_name['TaskLogInfo'] +_TASKSTATEUPDATE = DESCRIPTOR.message_types_by_name['TaskStateUpdate'] +_TASKSTATEUPDATE_STATETSNSENTRY = _TASKSTATEUPDATE.nested_types_by_name['StateTsNsEntry'] +_TASKEVENTS = DESCRIPTOR.message_types_by_name['TaskEvents'] +_TASKEVENTDATA = DESCRIPTOR.message_types_by_name['TaskEventData'] +_AVAILABLERESOURCES = DESCRIPTOR.message_types_by_name['AvailableResources'] +_AVAILABLERESOURCES_RESOURCESAVAILABLEENTRY = _AVAILABLERESOURCES.nested_types_by_name['ResourcesAvailableEntry'] +_TOTALRESOURCES = DESCRIPTOR.message_types_by_name['TotalResources'] +_TOTALRESOURCES_RESOURCESTOTALENTRY = _TOTALRESOURCES.nested_types_by_name['ResourcesTotalEntry'] +_NODESNAPSHOT = DESCRIPTOR.message_types_by_name['NodeSnapshot'] +_GCSNODEINFO = DESCRIPTOR.message_types_by_name['GcsNodeInfo'] +_GCSNODEINFO_RESOURCESTOTALENTRY = _GCSNODEINFO.nested_types_by_name['ResourcesTotalEntry'] +_GCSNODEINFO_LABELSENTRY = _GCSNODEINFO.nested_types_by_name['LabelsEntry'] +_JOBSAPIINFO = DESCRIPTOR.message_types_by_name['JobsAPIInfo'] +_JOBSAPIINFO_METADATAENTRY = _JOBSAPIINFO.nested_types_by_name['MetadataEntry'] +_JOBSAPIINFO_ENTRYPOINTRESOURCESENTRY = _JOBSAPIINFO.nested_types_by_name['EntrypointResourcesEntry'] +_WORKERTABLEDATA = DESCRIPTOR.message_types_by_name['WorkerTableData'] +_WORKERTABLEDATA_WORKERINFOENTRY = _WORKERTABLEDATA.nested_types_by_name['WorkerInfoEntry'] +_WORKERDELTADATA = DESCRIPTOR.message_types_by_name['WorkerDeltaData'] +_PUBSUBMESSAGE = DESCRIPTOR.message_types_by_name['PubSubMessage'] +_RESOURCEDEMAND = DESCRIPTOR.message_types_by_name['ResourceDemand'] +_RESOURCEDEMAND_SHAPEENTRY = _RESOURCEDEMAND.nested_types_by_name['ShapeEntry'] +_RESOURCELOAD = DESCRIPTOR.message_types_by_name['ResourceLoad'] +_RESOURCESDATA = DESCRIPTOR.message_types_by_name['ResourcesData'] +_RESOURCESDATA_RESOURCESAVAILABLEENTRY = _RESOURCESDATA.nested_types_by_name['ResourcesAvailableEntry'] +_RESOURCESDATA_RESOURCESTOTALENTRY = _RESOURCESDATA.nested_types_by_name['ResourcesTotalEntry'] +_RESOURCESDATA_RESOURCELOADENTRY = _RESOURCESDATA.nested_types_by_name['ResourceLoadEntry'] +_RESOURCESDATA_RESOURCESNORMALTASKENTRY = _RESOURCESDATA.nested_types_by_name['ResourcesNormalTaskEntry'] +_RESOURCESDATA_LABELSENTRY = _RESOURCESDATA.nested_types_by_name['LabelsEntry'] +_RESOURCEUSAGEBATCHDATA = DESCRIPTOR.message_types_by_name['ResourceUsageBatchData'] +_PLACEMENTGROUPLOAD = DESCRIPTOR.message_types_by_name['PlacementGroupLoad'] +_PLACEMENTGROUPSTATS = DESCRIPTOR.message_types_by_name['PlacementGroupStats'] +_PLACEMENTGROUPTABLEDATA = DESCRIPTOR.message_types_by_name['PlacementGroupTableData'] +_JOBTABLEDATA = DESCRIPTOR.message_types_by_name['JobTableData'] +_ACTORTABLEDATA_ACTORSTATE = _ACTORTABLEDATA.enum_types_by_name['ActorState'] +_NODESNAPSHOT_STATE = _NODESNAPSHOT.enum_types_by_name['State'] +_GCSNODEINFO_GCSNODESTATE = _GCSNODEINFO.enum_types_by_name['GcsNodeState'] +_PLACEMENTGROUPSTATS_SCHEDULINGSTATE = _PLACEMENTGROUPSTATS.enum_types_by_name['SchedulingState'] +_PLACEMENTGROUPTABLEDATA_PLACEMENTGROUPSTATE = _PLACEMENTGROUPTABLEDATA.enum_types_by_name['PlacementGroupState'] +GcsEntry = _reflection.GeneratedProtocolMessageType('GcsEntry', (_message.Message,), { + 'DESCRIPTOR' : _GCSENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsEntry) + }) +_sym_db.RegisterMessage(GcsEntry) + +ActorTableData = _reflection.GeneratedProtocolMessageType('ActorTableData', (_message.Message,), { + + 'RequiredResourcesEntry' : _reflection.GeneratedProtocolMessageType('RequiredResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _ACTORTABLEDATA_REQUIREDRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorTableData.RequiredResourcesEntry) + }) + , + + 'LabelSelectorEntry' : _reflection.GeneratedProtocolMessageType('LabelSelectorEntry', (_message.Message,), { + 'DESCRIPTOR' : _ACTORTABLEDATA_LABELSELECTORENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorTableData.LabelSelectorEntry) + }) + , + 'DESCRIPTOR' : _ACTORTABLEDATA, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ActorTableData) + }) +_sym_db.RegisterMessage(ActorTableData) +_sym_db.RegisterMessage(ActorTableData.RequiredResourcesEntry) +_sym_db.RegisterMessage(ActorTableData.LabelSelectorEntry) + +ErrorTableData = _reflection.GeneratedProtocolMessageType('ErrorTableData', (_message.Message,), { + 'DESCRIPTOR' : _ERRORTABLEDATA, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ErrorTableData) + }) +_sym_db.RegisterMessage(ErrorTableData) + +TaskLogInfo = _reflection.GeneratedProtocolMessageType('TaskLogInfo', (_message.Message,), { + 'DESCRIPTOR' : _TASKLOGINFO, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskLogInfo) + }) +_sym_db.RegisterMessage(TaskLogInfo) + +TaskStateUpdate = _reflection.GeneratedProtocolMessageType('TaskStateUpdate', (_message.Message,), { + + 'StateTsNsEntry' : _reflection.GeneratedProtocolMessageType('StateTsNsEntry', (_message.Message,), { + 'DESCRIPTOR' : _TASKSTATEUPDATE_STATETSNSENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskStateUpdate.StateTsNsEntry) + }) + , + 'DESCRIPTOR' : _TASKSTATEUPDATE, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskStateUpdate) + }) +_sym_db.RegisterMessage(TaskStateUpdate) +_sym_db.RegisterMessage(TaskStateUpdate.StateTsNsEntry) + +TaskEvents = _reflection.GeneratedProtocolMessageType('TaskEvents', (_message.Message,), { + 'DESCRIPTOR' : _TASKEVENTS, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskEvents) + }) +_sym_db.RegisterMessage(TaskEvents) + +TaskEventData = _reflection.GeneratedProtocolMessageType('TaskEventData', (_message.Message,), { + 'DESCRIPTOR' : _TASKEVENTDATA, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskEventData) + }) +_sym_db.RegisterMessage(TaskEventData) + +AvailableResources = _reflection.GeneratedProtocolMessageType('AvailableResources', (_message.Message,), { + + 'ResourcesAvailableEntry' : _reflection.GeneratedProtocolMessageType('ResourcesAvailableEntry', (_message.Message,), { + 'DESCRIPTOR' : _AVAILABLERESOURCES_RESOURCESAVAILABLEENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AvailableResources.ResourcesAvailableEntry) + }) + , + 'DESCRIPTOR' : _AVAILABLERESOURCES, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AvailableResources) + }) +_sym_db.RegisterMessage(AvailableResources) +_sym_db.RegisterMessage(AvailableResources.ResourcesAvailableEntry) + +TotalResources = _reflection.GeneratedProtocolMessageType('TotalResources', (_message.Message,), { + + 'ResourcesTotalEntry' : _reflection.GeneratedProtocolMessageType('ResourcesTotalEntry', (_message.Message,), { + 'DESCRIPTOR' : _TOTALRESOURCES_RESOURCESTOTALENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TotalResources.ResourcesTotalEntry) + }) + , + 'DESCRIPTOR' : _TOTALRESOURCES, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TotalResources) + }) +_sym_db.RegisterMessage(TotalResources) +_sym_db.RegisterMessage(TotalResources.ResourcesTotalEntry) + +NodeSnapshot = _reflection.GeneratedProtocolMessageType('NodeSnapshot', (_message.Message,), { + 'DESCRIPTOR' : _NODESNAPSHOT, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NodeSnapshot) + }) +_sym_db.RegisterMessage(NodeSnapshot) + +GcsNodeInfo = _reflection.GeneratedProtocolMessageType('GcsNodeInfo', (_message.Message,), { + + 'ResourcesTotalEntry' : _reflection.GeneratedProtocolMessageType('ResourcesTotalEntry', (_message.Message,), { + 'DESCRIPTOR' : _GCSNODEINFO_RESOURCESTOTALENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsNodeInfo.ResourcesTotalEntry) + }) + , + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _GCSNODEINFO_LABELSENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsNodeInfo.LabelsEntry) + }) + , + 'DESCRIPTOR' : _GCSNODEINFO, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsNodeInfo) + }) +_sym_db.RegisterMessage(GcsNodeInfo) +_sym_db.RegisterMessage(GcsNodeInfo.ResourcesTotalEntry) +_sym_db.RegisterMessage(GcsNodeInfo.LabelsEntry) + +JobsAPIInfo = _reflection.GeneratedProtocolMessageType('JobsAPIInfo', (_message.Message,), { + + 'MetadataEntry' : _reflection.GeneratedProtocolMessageType('MetadataEntry', (_message.Message,), { + 'DESCRIPTOR' : _JOBSAPIINFO_METADATAENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.JobsAPIInfo.MetadataEntry) + }) + , + + 'EntrypointResourcesEntry' : _reflection.GeneratedProtocolMessageType('EntrypointResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _JOBSAPIINFO_ENTRYPOINTRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.JobsAPIInfo.EntrypointResourcesEntry) + }) + , + 'DESCRIPTOR' : _JOBSAPIINFO, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.JobsAPIInfo) + }) +_sym_db.RegisterMessage(JobsAPIInfo) +_sym_db.RegisterMessage(JobsAPIInfo.MetadataEntry) +_sym_db.RegisterMessage(JobsAPIInfo.EntrypointResourcesEntry) + +WorkerTableData = _reflection.GeneratedProtocolMessageType('WorkerTableData', (_message.Message,), { + + 'WorkerInfoEntry' : _reflection.GeneratedProtocolMessageType('WorkerInfoEntry', (_message.Message,), { + 'DESCRIPTOR' : _WORKERTABLEDATA_WORKERINFOENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerTableData.WorkerInfoEntry) + }) + , + 'DESCRIPTOR' : _WORKERTABLEDATA, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerTableData) + }) +_sym_db.RegisterMessage(WorkerTableData) +_sym_db.RegisterMessage(WorkerTableData.WorkerInfoEntry) + +WorkerDeltaData = _reflection.GeneratedProtocolMessageType('WorkerDeltaData', (_message.Message,), { + 'DESCRIPTOR' : _WORKERDELTADATA, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerDeltaData) + }) +_sym_db.RegisterMessage(WorkerDeltaData) + +PubSubMessage = _reflection.GeneratedProtocolMessageType('PubSubMessage', (_message.Message,), { + 'DESCRIPTOR' : _PUBSUBMESSAGE, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PubSubMessage) + }) +_sym_db.RegisterMessage(PubSubMessage) + +ResourceDemand = _reflection.GeneratedProtocolMessageType('ResourceDemand', (_message.Message,), { + + 'ShapeEntry' : _reflection.GeneratedProtocolMessageType('ShapeEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCEDEMAND_SHAPEENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourceDemand.ShapeEntry) + }) + , + 'DESCRIPTOR' : _RESOURCEDEMAND, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourceDemand) + }) +_sym_db.RegisterMessage(ResourceDemand) +_sym_db.RegisterMessage(ResourceDemand.ShapeEntry) + +ResourceLoad = _reflection.GeneratedProtocolMessageType('ResourceLoad', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCELOAD, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourceLoad) + }) +_sym_db.RegisterMessage(ResourceLoad) + +ResourcesData = _reflection.GeneratedProtocolMessageType('ResourcesData', (_message.Message,), { + + 'ResourcesAvailableEntry' : _reflection.GeneratedProtocolMessageType('ResourcesAvailableEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCESDATA_RESOURCESAVAILABLEENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourcesData.ResourcesAvailableEntry) + }) + , + + 'ResourcesTotalEntry' : _reflection.GeneratedProtocolMessageType('ResourcesTotalEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCESDATA_RESOURCESTOTALENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourcesData.ResourcesTotalEntry) + }) + , + + 'ResourceLoadEntry' : _reflection.GeneratedProtocolMessageType('ResourceLoadEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCESDATA_RESOURCELOADENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourcesData.ResourceLoadEntry) + }) + , + + 'ResourcesNormalTaskEntry' : _reflection.GeneratedProtocolMessageType('ResourcesNormalTaskEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCESDATA_RESOURCESNORMALTASKENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourcesData.ResourcesNormalTaskEntry) + }) + , + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCESDATA_LABELSENTRY, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourcesData.LabelsEntry) + }) + , + 'DESCRIPTOR' : _RESOURCESDATA, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourcesData) + }) +_sym_db.RegisterMessage(ResourcesData) +_sym_db.RegisterMessage(ResourcesData.ResourcesAvailableEntry) +_sym_db.RegisterMessage(ResourcesData.ResourcesTotalEntry) +_sym_db.RegisterMessage(ResourcesData.ResourceLoadEntry) +_sym_db.RegisterMessage(ResourcesData.ResourcesNormalTaskEntry) +_sym_db.RegisterMessage(ResourcesData.LabelsEntry) + +ResourceUsageBatchData = _reflection.GeneratedProtocolMessageType('ResourceUsageBatchData', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCEUSAGEBATCHDATA, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ResourceUsageBatchData) + }) +_sym_db.RegisterMessage(ResourceUsageBatchData) + +PlacementGroupLoad = _reflection.GeneratedProtocolMessageType('PlacementGroupLoad', (_message.Message,), { + 'DESCRIPTOR' : _PLACEMENTGROUPLOAD, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PlacementGroupLoad) + }) +_sym_db.RegisterMessage(PlacementGroupLoad) + +PlacementGroupStats = _reflection.GeneratedProtocolMessageType('PlacementGroupStats', (_message.Message,), { + 'DESCRIPTOR' : _PLACEMENTGROUPSTATS, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PlacementGroupStats) + }) +_sym_db.RegisterMessage(PlacementGroupStats) + +PlacementGroupTableData = _reflection.GeneratedProtocolMessageType('PlacementGroupTableData', (_message.Message,), { + 'DESCRIPTOR' : _PLACEMENTGROUPTABLEDATA, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PlacementGroupTableData) + }) +_sym_db.RegisterMessage(PlacementGroupTableData) + +JobTableData = _reflection.GeneratedProtocolMessageType('JobTableData', (_message.Message,), { + 'DESCRIPTOR' : _JOBTABLEDATA, + '__module__' : 'src.ray.protobuf.gcs_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.JobTableData) + }) +_sym_db.RegisterMessage(JobTableData) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\030io.ray.runtime.generated' + _ACTORTABLEDATA_REQUIREDRESOURCESENTRY._options = None + _ACTORTABLEDATA_REQUIREDRESOURCESENTRY._serialized_options = b'8\001' + _ACTORTABLEDATA_LABELSELECTORENTRY._options = None + _ACTORTABLEDATA_LABELSELECTORENTRY._serialized_options = b'8\001' + _TASKSTATEUPDATE_STATETSNSENTRY._options = None + _TASKSTATEUPDATE_STATETSNSENTRY._serialized_options = b'8\001' + _AVAILABLERESOURCES_RESOURCESAVAILABLEENTRY._options = None + _AVAILABLERESOURCES_RESOURCESAVAILABLEENTRY._serialized_options = b'8\001' + _TOTALRESOURCES_RESOURCESTOTALENTRY._options = None + _TOTALRESOURCES_RESOURCESTOTALENTRY._serialized_options = b'8\001' + _GCSNODEINFO_RESOURCESTOTALENTRY._options = None + _GCSNODEINFO_RESOURCESTOTALENTRY._serialized_options = b'8\001' + _GCSNODEINFO_LABELSENTRY._options = None + _GCSNODEINFO_LABELSENTRY._serialized_options = b'8\001' + _JOBSAPIINFO_METADATAENTRY._options = None + _JOBSAPIINFO_METADATAENTRY._serialized_options = b'8\001' + _JOBSAPIINFO_ENTRYPOINTRESOURCESENTRY._options = None + _JOBSAPIINFO_ENTRYPOINTRESOURCESENTRY._serialized_options = b'8\001' + _WORKERTABLEDATA_WORKERINFOENTRY._options = None + _WORKERTABLEDATA_WORKERINFOENTRY._serialized_options = b'8\001' + _RESOURCEDEMAND_SHAPEENTRY._options = None + _RESOURCEDEMAND_SHAPEENTRY._serialized_options = b'8\001' + _RESOURCESDATA_RESOURCESAVAILABLEENTRY._options = None + _RESOURCESDATA_RESOURCESAVAILABLEENTRY._serialized_options = b'8\001' + _RESOURCESDATA_RESOURCESTOTALENTRY._options = None + _RESOURCESDATA_RESOURCESTOTALENTRY._serialized_options = b'8\001' + _RESOURCESDATA_RESOURCELOADENTRY._options = None + _RESOURCESDATA_RESOURCELOADENTRY._serialized_options = b'8\001' + _RESOURCESDATA_RESOURCESNORMALTASKENTRY._options = None + _RESOURCESDATA_RESOURCESNORMALTASKENTRY._serialized_options = b'8\001' + _RESOURCESDATA_LABELSENTRY._options = None + _RESOURCESDATA_LABELSENTRY._serialized_options = b'8\001' + _TABLEPREFIX._serialized_start=11502 + _TABLEPREFIX._serialized_end=11829 + _TABLEPUBSUB._serialized_start=11832 + _TABLEPUBSUB._serialized_end=12150 + _GCSCHANGEMODE._serialized_start=12152 + _GCSCHANGEMODE._serialized_end=12198 + _GCSENTRY._serialized_start=109 + _GCSENTRY._serialized_end=218 + _ACTORTABLEDATA._serialized_start=221 + _ACTORTABLEDATA._serialized_end=1835 + _ACTORTABLEDATA_REQUIREDRESOURCESENTRY._serialized_start=1553 + _ACTORTABLEDATA_REQUIREDRESOURCESENTRY._serialized_end=1621 + _ACTORTABLEDATA_LABELSELECTORENTRY._serialized_start=1623 + _ACTORTABLEDATA_LABELSELECTORENTRY._serialized_end=1687 + _ACTORTABLEDATA_ACTORSTATE._serialized_start=1689 + _ACTORTABLEDATA_ACTORSTATE._serialized_end=1786 + _ERRORTABLEDATA._serialized_start=1837 + _ERRORTABLEDATA._serialized_end=1963 + _TASKLOGINFO._serialized_start=1966 + _TASKLOGINFO._serialized_end=2303 + _TASKSTATEUPDATE._serialized_start=2306 + _TASKSTATEUPDATE._serialized_end=2893 + _TASKSTATEUPDATE_STATETSNSENTRY._serialized_start=2716 + _TASKSTATEUPDATE_STATETSNSENTRY._serialized_end=2776 + _TASKEVENTS._serialized_start=2896 + _TASKEVENTS._serialized_end=3240 + _TASKEVENTDATA._serialized_start=3243 + _TASKEVENTDATA._serialized_end=3475 + _AVAILABLERESOURCES._serialized_start=3478 + _AVAILABLERESOURCES._serialized_end=3696 + _AVAILABLERESOURCES_RESOURCESAVAILABLEENTRY._serialized_start=3627 + _AVAILABLERESOURCES_RESOURCESAVAILABLEENTRY._serialized_end=3696 + _TOTALRESOURCES._serialized_start=3699 + _TOTALRESOURCES._serialized_end=3893 + _TOTALRESOURCES_RESOURCESTOTALENTRY._serialized_start=3828 + _TOTALRESOURCES_RESOURCESTOTALENTRY._serialized_end=3893 + _NODESNAPSHOT._serialized_start=3896 + _NODESNAPSHOT._serialized_end=4100 + _NODESNAPSHOT_STATE._serialized_start=4042 + _NODESNAPSHOT_STATE._serialized_end=4100 + _GCSNODEINFO._serialized_start=4103 + _GCSNODEINFO._serialized_end=5265 + _GCSNODEINFO_RESOURCESTOTALENTRY._serialized_start=3828 + _GCSNODEINFO_RESOURCESTOTALENTRY._serialized_end=3893 + _GCSNODEINFO_LABELSENTRY._serialized_start=5171 + _GCSNODEINFO_LABELSENTRY._serialized_end=5228 + _GCSNODEINFO_GCSNODESTATE._serialized_start=5230 + _GCSNODEINFO_GCSNODESTATE._serialized_end=5265 + _JOBSAPIINFO._serialized_start=5268 + _JOBSAPIINFO._serialized_end=6340 + _JOBSAPIINFO_METADATAENTRY._serialized_start=5993 + _JOBSAPIINFO_METADATAENTRY._serialized_end=6052 + _JOBSAPIINFO_ENTRYPOINTRESOURCESENTRY._serialized_start=6054 + _JOBSAPIINFO_ENTRYPOINTRESOURCESENTRY._serialized_end=6124 + _WORKERTABLEDATA._serialized_start=6343 + _WORKERTABLEDATA._serialized_end=7198 + _WORKERTABLEDATA_WORKERINFOENTRY._serialized_start=7066 + _WORKERTABLEDATA_WORKERINFOENTRY._serialized_end=7127 + _WORKERDELTADATA._serialized_start=7200 + _WORKERDELTADATA._serialized_end=7271 + _PUBSUBMESSAGE._serialized_start=7273 + _PUBSUBMESSAGE._serialized_end=7324 + _RESOURCEDEMAND._serialized_start=7327 + _RESOURCEDEMAND._serialized_end=7687 + _RESOURCEDEMAND_SHAPEENTRY._serialized_start=7631 + _RESOURCEDEMAND_SHAPEENTRY._serialized_end=7687 + _RESOURCELOAD._serialized_start=7689 + _RESOURCELOAD._serialized_end=7771 + _RESOURCESDATA._serialized_start=7774 + _RESOURCESDATA._serialized_end=9114 + _RESOURCESDATA_RESOURCESAVAILABLEENTRY._serialized_start=3627 + _RESOURCESDATA_RESOURCESAVAILABLEENTRY._serialized_end=3696 + _RESOURCESDATA_RESOURCESTOTALENTRY._serialized_start=3828 + _RESOURCESDATA_RESOURCESTOTALENTRY._serialized_end=3893 + _RESOURCESDATA_RESOURCELOADENTRY._serialized_start=8902 + _RESOURCESDATA_RESOURCELOADENTRY._serialized_end=8965 + _RESOURCESDATA_RESOURCESNORMALTASKENTRY._serialized_start=8967 + _RESOURCESDATA_RESOURCESNORMALTASKENTRY._serialized_end=9037 + _RESOURCESDATA_LABELSENTRY._serialized_start=5171 + _RESOURCESDATA_LABELSENTRY._serialized_end=5228 + _RESOURCEUSAGEBATCHDATA._serialized_start=9117 + _RESOURCEUSAGEBATCHDATA._serialized_end=9342 + _PLACEMENTGROUPLOAD._serialized_start=9344 + _PLACEMENTGROUPLOAD._serialized_end=9448 + _PLACEMENTGROUPSTATS._serialized_start=9451 + _PLACEMENTGROUPSTATS._serialized_end=10055 + _PLACEMENTGROUPSTATS_SCHEDULINGSTATE._serialized_start=9909 + _PLACEMENTGROUPSTATS_SCHEDULINGSTATE._serialized_end=10055 + _PLACEMENTGROUPTABLEDATA._serialized_start=10058 + _PLACEMENTGROUPTABLEDATA._serialized_end=11003 + _PLACEMENTGROUPTABLEDATA_PLACEMENTGROUPSTATE._serialized_start=10911 + _PLACEMENTGROUPTABLEDATA_PLACEMENTGROUPSTATE._serialized_end=11003 + _JOBTABLEDATA._serialized_start=11006 + _JOBTABLEDATA._serialized_end=11499 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_service_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_service_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..8fdb6842c1581ebe56c313e3fd539196ac98e70c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_service_pb2.py @@ -0,0 +1,1233 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/gcs_service.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 +from . import gcs_pb2 as src_dot_ray_dot_protobuf_dot_gcs__pb2 +from . import pubsub_pb2 as src_dot_ray_dot_protobuf_dot_pubsub__pb2 +from . import events_event_aggregator_service_pb2 as src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"src/ray/protobuf/gcs_service.proto\x12\x07ray.rpc\x1a\x1dsrc/ray/protobuf/common.proto\x1a\x1asrc/ray/protobuf/gcs.proto\x1a\x1dsrc/ray/protobuf/pubsub.proto\x1a\x36src/ray/protobuf/events_event_aggregator_service.proto\":\n\rAddJobRequest\x12)\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x15.ray.rpc.JobTableDataR\x04\x64\x61ta\"9\n\x0b\x41\x64\x64JobReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"/\n\x16MarkJobFinishedRequest\x12\x15\n\x06job_id\x18\x01 \x01(\x0cR\x05jobId\"B\n\x14MarkJobFinishedReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"\xd9\x02\n\x14GetAllJobInfoRequest\x12\x19\n\x05limit\x18\x01 \x01(\x05H\x00R\x05limit\x88\x01\x01\x12\x34\n\x14job_or_submission_id\x18\x02 \x01(\tH\x01R\x11jobOrSubmissionId\x88\x01\x01\x12G\n\x1eskip_submission_job_info_field\x18\x03 \x01(\x08H\x02R\x1askipSubmissionJobInfoField\x88\x01\x01\x12\x41\n\x1bskip_is_running_tasks_field\x18\x04 \x01(\x08H\x03R\x17skipIsRunningTasksField\x88\x01\x01\x42\x08\n\x06_limitB\x17\n\x15_job_or_submission_idB!\n\x1f_skip_submission_job_info_fieldB\x1e\n\x1c_skip_is_running_tasks_field\"{\n\x12GetAllJobInfoReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x39\n\rjob_info_list\x18\x02 \x03(\x0b\x32\x15.ray.rpc.JobTableDataR\x0bjobInfoList\"M\n\x15ReportJobErrorRequest\x12\x34\n\tjob_error\x18\x01 \x01(\x0b\x32\x17.ray.rpc.ErrorTableDataR\x08jobError\"A\n\x13ReportJobErrorReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"\x15\n\x13GetNextJobIDRequest\"V\n\x11GetNextJobIDReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x15\n\x06job_id\x18\x02 \x01(\x05R\x05jobId\"D\n\x13GetActorInfoRequest\x12\x19\n\x08\x61\x63tor_id\x18\x01 \x01(\x0cR\x07\x61\x63torId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"\x82\x01\n\x11GetActorInfoReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x41\n\x10\x61\x63tor_table_data\x18\x02 \x01(\x0b\x32\x17.ray.rpc.ActorTableDataR\x0e\x61\x63torTableData\"S\n\x18GetNamedActorInfoRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12#\n\rray_namespace\x18\x02 \x01(\tR\x0crayNamespace\"\xb7\x01\n\x16GetNamedActorInfoReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x41\n\x10\x61\x63tor_table_data\x18\x02 \x01(\x0b\x32\x17.ray.rpc.ActorTableDataR\x0e\x61\x63torTableData\x12.\n\ttask_spec\x18\x03 \x01(\x0b\x32\x11.ray.rpc.TaskSpecR\x08taskSpec\"d\n\x16ListNamedActorsRequest\x12%\n\x0e\x61ll_namespaces\x18\x01 \x01(\x08R\rallNamespaces\x12#\n\rray_namespace\x18\x02 \x01(\tR\x0crayNamespace\"\x87\x01\n\x14ListNamedActorsReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x43\n\x11named_actors_list\x18\x02 \x03(\x0b\x32\x17.ray.rpc.NamedActorInfoR\x0fnamedActorsList\"\xe0\x02\n\x16GetAllActorInfoRequest\x12$\n\x0eshow_dead_jobs\x18\x01 \x01(\x08R\x0cshowDeadJobs\x12\x19\n\x05limit\x18\x02 \x01(\x03H\x00R\x05limit\x88\x01\x01\x12\x46\n\x07\x66ilters\x18\x03 \x01(\x0b\x32\'.ray.rpc.GetAllActorInfoRequest.FiltersH\x01R\x07\x66ilters\x88\x01\x01\x1a\xa6\x01\n\x07\x46ilters\x12\x1e\n\x08\x61\x63tor_id\x18\x01 \x01(\x0cH\x00R\x07\x61\x63torId\x88\x01\x01\x12\x1a\n\x06job_id\x18\x02 \x01(\x0cH\x01R\x05jobId\x88\x01\x01\x12=\n\x05state\x18\x03 \x01(\x0e\x32\".ray.rpc.ActorTableData.ActorStateH\x02R\x05state\x88\x01\x01\x42\x0b\n\t_actor_idB\t\n\x07_job_idB\x08\n\x06_stateB\x08\n\x06_limitB\n\n\x08_filters\"\xbe\x01\n\x14GetAllActorInfoReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x41\n\x10\x61\x63tor_table_data\x18\x02 \x03(\x0b\x32\x17.ray.rpc.ActorTableDataR\x0e\x61\x63torTableData\x12\x14\n\x05total\x18\x03 \x01(\x03R\x05total\x12!\n\x0cnum_filtered\x18\x04 \x01(\x03R\x0bnumFiltered\"q\n\x16KillActorViaGcsRequest\x12\x19\n\x08\x61\x63tor_id\x18\x01 \x01(\x0cR\x07\x61\x63torId\x12\x1d\n\nforce_kill\x18\x02 \x01(\x08R\tforceKill\x12\x1d\n\nno_restart\x18\x03 \x01(\x08R\tnoRestart\"B\n\x14KillActorViaGcsReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"\x94\x01\n\x1cReportActorOutOfScopeRequest\x12\x19\n\x08\x61\x63tor_id\x18\x01 \x01(\x0cR\x07\x61\x63torId\x12Y\n*num_restarts_due_to_lineage_reconstruction\x18\x02 \x01(\x04R%numRestartsDueToLineageReconstruction\"H\n\x1aReportActorOutOfScopeReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"\x15\n\x13GetClusterIdRequest\"^\n\x11GetClusterIdReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x1d\n\ncluster_id\x18\x02 \x01(\x0cR\tclusterId\"H\n\x13RegisterNodeRequest\x12\x31\n\tnode_info\x18\x01 \x01(\x0b\x32\x14.ray.rpc.GcsNodeInfoR\x08nodeInfo\"?\n\x11RegisterNodeReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"p\n\x15UnregisterNodeRequest\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12>\n\x0fnode_death_info\x18\x02 \x01(\x0b\x32\x16.ray.rpc.NodeDeathInfoR\rnodeDeathInfo\"A\n\x13UnregisterNodeReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"\xf2\x02\n\x15GetAllNodeInfoRequest\x12\x19\n\x05limit\x18\x01 \x01(\x03H\x00R\x05limit\x88\x01\x01\x12R\n\x0enode_selectors\x18\x02 \x03(\x0b\x32+.ray.rpc.GetAllNodeInfoRequest.NodeSelectorR\rnodeSelectors\x12I\n\x0cstate_filter\x18\x03 \x01(\x0e\x32!.ray.rpc.GcsNodeInfo.GcsNodeStateH\x01R\x0bstateFilter\x88\x01\x01\x1a\x83\x01\n\x0cNodeSelector\x12\x19\n\x07node_id\x18\x01 \x01(\x0cH\x00R\x06nodeId\x12\x1d\n\tnode_name\x18\x02 \x01(\tH\x00R\x08nodeName\x12(\n\x0fnode_ip_address\x18\x03 \x01(\tH\x00R\rnodeIpAddressB\x0f\n\rnode_selectorB\x08\n\x06_limitB\x0f\n\r_state_filter\"\xb6\x01\n\x13GetAllNodeInfoReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12:\n\x0enode_info_list\x18\x02 \x03(\x0b\x32\x14.ray.rpc.GcsNodeInfoR\x0cnodeInfoList\x12\x14\n\x05total\x18\x03 \x01(\x03R\x05total\x12!\n\x0cnum_filtered\x18\x04 \x01(\x03R\x0bnumFiltered\".\n\x11\x43heckAliveRequest\x12\x19\n\x08node_ids\x18\x01 \x03(\x0cR\x07nodeIds\"\x81\x01\n\x0f\x43heckAliveReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x1f\n\x0bray_version\x18\x02 \x01(\tR\nrayVersion\x12!\n\x0craylet_alive\x18\x03 \x03(\x08R\x0brayletAlive\"\x1a\n\x18GetInternalConfigRequest\"\\\n\x16GetInternalConfigReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x16\n\x06\x63onfig\x18\x02 \x01(\tR\x06\x63onfig\"B\n\x14\x44\x65leteResourcesReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"!\n\x1fGetAllAvailableResourcesRequest\"\x8f\x01\n\x1dGetAllAvailableResourcesReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x42\n\x0eresources_list\x18\x02 \x03(\x0b\x32\x1b.ray.rpc.AvailableResourcesR\rresourcesList\"\x1d\n\x1bGetAllTotalResourcesRequest\"\x87\x01\n\x19GetAllTotalResourcesReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12>\n\x0eresources_list\x18\x02 \x03(\x0b\x32\x17.ray.rpc.TotalResourcesR\rresourcesList\"]\n\x1aReportWorkerFailureRequest\x12?\n\x0eworker_failure\x18\x01 \x01(\x0b\x32\x18.ray.rpc.WorkerTableDataR\rworkerFailure\"F\n\x18ReportWorkerFailureReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"3\n\x14GetWorkerInfoRequest\x12\x1b\n\tworker_id\x18\x01 \x01(\x0cR\x08workerId\"\x86\x01\n\x12GetWorkerInfoReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x44\n\x11worker_table_data\x18\x02 \x01(\x0b\x32\x18.ray.rpc.WorkerTableDataR\x0fworkerTableData\"\x9c\x02\n\x17GetAllWorkerInfoRequest\x12\x19\n\x05limit\x18\x01 \x01(\x03H\x00R\x05limit\x88\x01\x01\x12G\n\x07\x66ilters\x18\x02 \x01(\x0b\x32(.ray.rpc.GetAllWorkerInfoRequest.FiltersH\x01R\x07\x66ilters\x88\x01\x01\x1a\x86\x01\n\x07\x46ilters\x12\x35\n\x14\x65xist_paused_threads\x18\x01 \x01(\x08H\x00R\x12\x65xistPausedThreads\x88\x01\x01\x12\x1e\n\x08is_alive\x18\x02 \x01(\x08H\x01R\x07isAlive\x88\x01\x01\x42\x17\n\x15_exist_paused_threadsB\x0b\n\t_is_aliveB\x08\n\x06_limitB\n\n\x08_filters\"\xc2\x01\n\x15GetAllWorkerInfoReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x44\n\x11worker_table_data\x18\x02 \x03(\x0b\x32\x18.ray.rpc.WorkerTableDataR\x0fworkerTableData\x12\x14\n\x05total\x18\x03 \x01(\x03R\x05total\x12!\n\x0cnum_filtered\x18\x04 \x01(\x03R\x0bnumFiltered\"Q\n\x14\x41\x64\x64WorkerInfoRequest\x12\x39\n\x0bworker_data\x18\x01 \x01(\x0b\x32\x18.ray.rpc.WorkerTableDataR\nworkerData\"@\n\x12\x41\x64\x64WorkerInfoReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"c\n\x1fUpdateWorkerDebuggerPortRequest\x12\x1b\n\tworker_id\x18\x01 \x01(\x0cR\x08workerId\x12#\n\rdebugger_port\x18\x02 \x01(\rR\x0c\x64\x65\x62uggerPort\"K\n\x1dUpdateWorkerDebuggerPortReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"{\n#UpdateWorkerNumPausedThreadsRequest\x12\x1b\n\tworker_id\x18\x01 \x01(\x0cR\x08workerId\x12\x37\n\x18num_paused_threads_delta\x18\x02 \x01(\x05R\x15numPausedThreadsDelta\"O\n!UpdateWorkerNumPausedThreadsReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"D\n\x12\x43reateActorRequest\x12.\n\ttask_spec\x18\x01 \x01(\x0b\x32\x11.ray.rpc.TaskSpecR\x08taskSpec\"\x89\x02\n\x10\x43reateActorReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x35\n\ractor_address\x18\x02 \x01(\x0b\x32\x10.ray.rpc.AddressR\x0c\x61\x63torAddress\x12\x42\n\rborrowed_refs\x18\x03 \x03(\x0b\x32\x1d.ray.rpc.ObjectReferenceCountR\x0c\x62orrowedRefs\x12>\n\x0b\x64\x65\x61th_cause\x18\x04 \x01(\x0b\x32\x18.ray.rpc.ActorDeathCauseH\x00R\ndeathCause\x88\x01\x01\x42\x0e\n\x0c_death_cause\"F\n\x14RegisterActorRequest\x12.\n\ttask_spec\x18\x01 \x01(\x0b\x32\x11.ray.rpc.TaskSpecR\x08taskSpec\"@\n\x12RegisterActorReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"\xa3\x01\n+RestartActorForLineageReconstructionRequest\x12\x19\n\x08\x61\x63tor_id\x18\x01 \x01(\x0cR\x07\x61\x63torId\x12Y\n*num_restarts_due_to_lineage_reconstruction\x18\x02 \x01(\x04R%numRestartsDueToLineageReconstruction\"W\n)RestartActorForLineageReconstructionReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"l\n\x1b\x43reatePlacementGroupRequest\x12M\n\x14placement_group_spec\x18\x01 \x01(\x0b\x32\x1b.ray.rpc.PlacementGroupSpecR\x12placementGroupSpec\"G\n\x19\x43reatePlacementGroupReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"K\n\x1bRemovePlacementGroupRequest\x12,\n\x12placement_group_id\x18\x01 \x01(\x0cR\x10placementGroupId\"G\n\x19RemovePlacementGroupReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"H\n\x18GetPlacementGroupRequest\x12,\n\x12placement_group_id\x18\x01 \x01(\x0cR\x10placementGroupId\"\xa3\x01\n\x16GetPlacementGroupReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12]\n\x1aplacement_group_table_data\x18\x02 \x01(\x0b\x32 .ray.rpc.PlacementGroupTableDataR\x17placementGroupTableData\"B\n\x1bGetAllPlacementGroupRequest\x12\x19\n\x05limit\x18\x01 \x01(\x03H\x00R\x05limit\x88\x01\x01\x42\x08\n\x06_limit\"\xbc\x01\n\x19GetAllPlacementGroupReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12]\n\x1aplacement_group_table_data\x18\x02 \x03(\x0b\x32 .ray.rpc.PlacementGroupTableDataR\x17placementGroupTableData\x12\x14\n\x05total\x18\x03 \x01(\x03R\x05total\"S\n#WaitPlacementGroupUntilReadyRequest\x12,\n\x12placement_group_id\x18\x01 \x01(\x0cR\x10placementGroupId\"O\n!WaitPlacementGroupUntilReadyReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"X\n\x1dGetNamedPlacementGroupRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12#\n\rray_namespace\x18\x02 \x01(\tR\x0crayNamespace\"\xa8\x01\n\x1bGetNamedPlacementGroupReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12]\n\x1aplacement_group_table_data\x18\x02 \x01(\x0b\x32 .ray.rpc.PlacementGroupTableDataR\x17placementGroupTableData\"(\n\rDrainNodeData\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\"R\n\x10\x44rainNodeRequest\x12>\n\x0f\x64rain_node_data\x18\x01 \x03(\x0b\x32\x16.ray.rpc.DrainNodeDataR\rdrainNodeData\"*\n\x0f\x44rainNodeStatus\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\"\x82\x01\n\x0e\x44rainNodeReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x44\n\x11\x64rain_node_status\x18\x02 \x03(\x0b\x32\x18.ray.rpc.DrainNodeStatusR\x0f\x64rainNodeStatus\"F\n\x14InternalKVGetRequest\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03key\x12\x1c\n\tnamespace\x18\x02 \x01(\x0cR\tnamespace\"V\n\x12InternalKVGetReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value\"M\n\x19InternalKVMultiGetRequest\x12\x12\n\x04keys\x18\x01 \x03(\x0cR\x04keys\x12\x1c\n\tnamespace\x18\x02 \x01(\x0cR\tnamespace\"7\n\rMapFieldEntry\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value\"w\n\x17InternalKVMultiGetReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x30\n\x07results\x18\x02 \x03(\x0b\x32\x16.ray.rpc.MapFieldEntryR\x07results\"z\n\x14InternalKVPutRequest\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value\x12\x1c\n\toverwrite\x18\x03 \x01(\x08R\toverwrite\x12\x1c\n\tnamespace\x18\x04 \x01(\x0cR\tnamespace\"V\n\x12InternalKVPutReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x14\n\x05\x61\x64\x64\x65\x64\x18\x02 \x01(\x08R\x05\x61\x64\x64\x65\x64\"j\n\x14InternalKVDelRequest\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03key\x12\x1c\n\tnamespace\x18\x02 \x01(\x0cR\tnamespace\x12\"\n\rdel_by_prefix\x18\x03 \x01(\x08R\x0b\x64\x65lByPrefix\"a\n\x12InternalKVDelReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x1f\n\x0b\x64\x65leted_num\x18\x02 \x01(\x05R\ndeletedNum\"I\n\x17InternalKVExistsRequest\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03key\x12\x1c\n\tnamespace\x18\x02 \x01(\x0cR\tnamespace\"[\n\x15InternalKVExistsReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x16\n\x06\x65xists\x18\x02 \x01(\x08R\x06\x65xists\"M\n\x15InternalKVKeysRequest\x12\x16\n\x06prefix\x18\x01 \x01(\x0cR\x06prefix\x12\x1c\n\tnamespace\x18\x02 \x01(\x0cR\tnamespace\"[\n\x13InternalKVKeysReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x18\n\x07results\x18\x02 \x03(\x0cR\x07results\"N\n\x17PinRuntimeEnvURIRequest\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12!\n\x0c\x65xpiration_s\x18\x02 \x01(\x05R\x0b\x65xpirationS\"C\n\x15PinRuntimeEnvURIReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"K\n\x11GcsPublishRequest\x12\x36\n\x0cpub_messages\x18\x01 \x03(\x0b\x32\x13.ray.rpc.PubMessageR\x0bpubMessages\"=\n\x0fGcsPublishReply\x12*\n\x06status\x18\x64 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"\x9d\x01\n\x18GcsSubscriberPollRequest\x12#\n\rsubscriber_id\x18\x01 \x01(\x0cR\x0csubscriberId\x12\x39\n\x19max_processed_sequence_id\x18\x02 \x01(\x03R\x16maxProcessedSequenceId\x12!\n\x0cpublisher_id\x18\x03 \x01(\x0cR\x0bpublisherId\"\x9f\x01\n\x16GcsSubscriberPollReply\x12\x36\n\x0cpub_messages\x18\x01 \x03(\x0b\x32\x13.ray.rpc.PubMessageR\x0bpubMessages\x12!\n\x0cpublisher_id\x18\x02 \x01(\x0cR\x0bpublisherId\x12*\n\x06status\x18\x64 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"\x92\x01\n GcsSubscriberCommandBatchRequest\x12#\n\rsubscriber_id\x18\x01 \x01(\x0cR\x0csubscriberId\x12,\n\x08\x63ommands\x18\x02 \x03(\x0b\x32\x10.ray.rpc.CommandR\x08\x63ommands\x12\x1b\n\tsender_id\x18\x03 \x01(\x0cR\x08senderId\"L\n\x1eGcsSubscriberCommandBatchReply\x12*\n\x06status\x18\x64 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"E\n\x1eGcsUnregisterSubscriberRequest\x12#\n\rsubscriber_id\x18\x01 \x01(\x0cR\x0csubscriberId\"\x1e\n\x1cGcsUnregisterSubscriberReply\"\x1c\n\x1aGetAllResourceUsageRequest\"\xe9\x01\n\x18GetAllResourceUsageReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12O\n\x13resource_usage_data\x18\x02 \x01(\x0b\x32\x1f.ray.rpc.ResourceUsageBatchDataR\x11resourceUsageData\x12P\n&cluster_full_of_actors_detected_by_gcs\x18\x03 \x01(\x08R clusterFullOfActorsDetectedByGcs\"\x19\n\x17GetDrainingNodesRequest\"l\n\x0c\x44rainingNode\x12\x17\n\x07node_id\x18\x01 \x01(\x0cR\x06nodeId\x12\x43\n\x1e\x64raining_deadline_timestamp_ms\x18\x02 \x01(\x03R\x1b\x64rainingDeadlineTimestampMs\"\x81\x01\n\x15GetDrainingNodesReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12<\n\x0e\x64raining_nodes\x18\x02 \x03(\x0b\x32\x15.ray.rpc.DrainingNodeR\rdrainingNodes\"9\n\tGcsStatus\x12\x12\n\x04\x63ode\x18\x01 \x01(\x05R\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\"E\n\x17\x41\x64\x64TaskEventDataRequest\x12*\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x16.ray.rpc.TaskEventDataR\x04\x64\x61ta\"C\n\x15\x41\x64\x64TaskEventDataReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\"\xfe\x08\n\x14GetTaskEventsRequest\x12\x19\n\x05limit\x18\x03 \x01(\x03H\x00R\x05limit\x88\x01\x01\x12\x44\n\x07\x66ilters\x18\x04 \x01(\x0b\x32%.ray.rpc.GetTaskEventsRequest.FiltersH\x01R\x07\x66ilters\x88\x01\x01\x1a\xee\x07\n\x07\x46ilters\x12R\n\x0bjob_filters\x18\x01 \x03(\x0b\x32\x31.ray.rpc.GetTaskEventsRequest.Filters.JobIdFilterR\njobFilters\x12U\n\x0ctask_filters\x18\x02 \x03(\x0b\x32\x32.ray.rpc.GetTaskEventsRequest.Filters.TaskIdFilterR\x0btaskFilters\x12X\n\ractor_filters\x18\x03 \x03(\x0b\x32\x33.ray.rpc.GetTaskEventsRequest.Filters.ActorIdFilterR\x0c\x61\x63torFilters\x12`\n\x11task_name_filters\x18\x04 \x03(\x0b\x32\x34.ray.rpc.GetTaskEventsRequest.Filters.TaskNameFilterR\x0ftaskNameFilters\x12*\n\x0e\x65xclude_driver\x18\x05 \x01(\x08H\x00R\rexcludeDriver\x88\x01\x01\x12V\n\rstate_filters\x18\x06 \x03(\x0b\x32\x31.ray.rpc.GetTaskEventsRequest.Filters.StateFilterR\x0cstateFilters\x1a\\\n\x0bJobIdFilter\x12\x36\n\tpredicate\x18\x01 \x01(\x0e\x32\x18.ray.rpc.FilterPredicateR\tpredicate\x12\x15\n\x06job_id\x18\x02 \x01(\x0cR\x05jobId\x1a_\n\x0cTaskIdFilter\x12\x36\n\tpredicate\x18\x01 \x01(\x0e\x32\x18.ray.rpc.FilterPredicateR\tpredicate\x12\x17\n\x07task_id\x18\x02 \x01(\x0cR\x06taskId\x1a\x62\n\rActorIdFilter\x12\x36\n\tpredicate\x18\x01 \x01(\x0e\x32\x18.ray.rpc.FilterPredicateR\tpredicate\x12\x19\n\x08\x61\x63tor_id\x18\x02 \x01(\x0cR\x07\x61\x63torId\x1a\x65\n\x0eTaskNameFilter\x12\x36\n\tpredicate\x18\x01 \x01(\x0e\x32\x18.ray.rpc.FilterPredicateR\tpredicate\x12\x1b\n\ttask_name\x18\x02 \x01(\tR\x08taskName\x1a[\n\x0bStateFilter\x12\x36\n\tpredicate\x18\x01 \x01(\x0e\x32\x18.ray.rpc.FilterPredicateR\tpredicate\x12\x14\n\x05state\x18\x02 \x01(\tR\x05stateB\x11\n\x0f_exclude_driverB\x08\n\x06_limitB\n\n\x08_filters\"\x83\x03\n\x12GetTaskEventsReply\x12*\n\x06status\x18\x01 \x01(\x0b\x32\x12.ray.rpc.GcsStatusR\x06status\x12\x39\n\x0e\x65vents_by_task\x18\x02 \x03(\x0b\x32\x13.ray.rpc.TaskEventsR\x0c\x65ventsByTask\x12\x44\n\x1fnum_profile_task_events_dropped\x18\x03 \x01(\x05R\x1bnumProfileTaskEventsDropped\x12\x42\n\x1enum_status_task_events_dropped\x18\x04 \x01(\x05R\x1anumStatusTaskEventsDropped\x12(\n\x10num_total_stored\x18\x05 \x01(\x03R\x0enumTotalStored\x12-\n\x13num_filtered_on_gcs\x18\x06 \x01(\x03R\x10numFilteredOnGcs\x12#\n\rnum_truncated\x18\x07 \x01(\x03R\x0cnumTruncated*C\n\x15GcsServiceFailureType\x12\x12\n\x0eRPC_DISCONNECT\x10\x00\x12\x16\n\x12GCS_SERVER_RESTART\x10\x01*+\n\x0f\x46ilterPredicate\x12\t\n\x05\x45QUAL\x10\x00\x12\r\n\tNOT_EQUAL\x10\x01\x32\x85\x03\n\x11JobInfoGcsService\x12\x36\n\x06\x41\x64\x64Job\x12\x16.ray.rpc.AddJobRequest\x1a\x14.ray.rpc.AddJobReply\x12Q\n\x0fMarkJobFinished\x12\x1f.ray.rpc.MarkJobFinishedRequest\x1a\x1d.ray.rpc.MarkJobFinishedReply\x12K\n\rGetAllJobInfo\x12\x1d.ray.rpc.GetAllJobInfoRequest\x1a\x1b.ray.rpc.GetAllJobInfoReply\x12N\n\x0eReportJobError\x12\x1e.ray.rpc.ReportJobErrorRequest\x1a\x1c.ray.rpc.ReportJobErrorReply\x12H\n\x0cGetNextJobID\x12\x1c.ray.rpc.GetNextJobIDRequest\x1a\x1a.ray.rpc.GetNextJobIDReply2\xbd\x06\n\x13\x41\x63torInfoGcsService\x12K\n\rRegisterActor\x12\x1d.ray.rpc.RegisterActorRequest\x1a\x1b.ray.rpc.RegisterActorReply\x12\x90\x01\n$RestartActorForLineageReconstruction\x12\x34.ray.rpc.RestartActorForLineageReconstructionRequest\x1a\x32.ray.rpc.RestartActorForLineageReconstructionReply\x12\x45\n\x0b\x43reateActor\x12\x1b.ray.rpc.CreateActorRequest\x1a\x19.ray.rpc.CreateActorReply\x12H\n\x0cGetActorInfo\x12\x1c.ray.rpc.GetActorInfoRequest\x1a\x1a.ray.rpc.GetActorInfoReply\x12W\n\x11GetNamedActorInfo\x12!.ray.rpc.GetNamedActorInfoRequest\x1a\x1f.ray.rpc.GetNamedActorInfoReply\x12Q\n\x0fListNamedActors\x12\x1f.ray.rpc.ListNamedActorsRequest\x1a\x1d.ray.rpc.ListNamedActorsReply\x12Q\n\x0fGetAllActorInfo\x12\x1f.ray.rpc.GetAllActorInfoRequest\x1a\x1d.ray.rpc.GetAllActorInfoReply\x12Q\n\x0fKillActorViaGcs\x12\x1f.ray.rpc.KillActorViaGcsRequest\x1a\x1d.ray.rpc.KillActorViaGcsReply\x12\x63\n\x15ReportActorOutOfScope\x12%.ray.rpc.ReportActorOutOfScopeRequest\x1a#.ray.rpc.ReportActorOutOfScopeReply2\xcd\x04\n\x14WorkerInfoGcsService\x12]\n\x13ReportWorkerFailure\x12#.ray.rpc.ReportWorkerFailureRequest\x1a!.ray.rpc.ReportWorkerFailureReply\x12K\n\rGetWorkerInfo\x12\x1d.ray.rpc.GetWorkerInfoRequest\x1a\x1b.ray.rpc.GetWorkerInfoReply\x12T\n\x10GetAllWorkerInfo\x12 .ray.rpc.GetAllWorkerInfoRequest\x1a\x1e.ray.rpc.GetAllWorkerInfoReply\x12K\n\rAddWorkerInfo\x12\x1d.ray.rpc.AddWorkerInfoRequest\x1a\x1b.ray.rpc.AddWorkerInfoReply\x12l\n\x18UpdateWorkerDebuggerPort\x12(.ray.rpc.UpdateWorkerDebuggerPortRequest\x1a&.ray.rpc.UpdateWorkerDebuggerPortReply\x12x\n\x1cUpdateWorkerNumPausedThreads\x12,.ray.rpc.UpdateWorkerNumPausedThreadsRequest\x1a*.ray.rpc.UpdateWorkerNumPausedThreadsReply2\xff\x04\n\x1cPlacementGroupInfoGcsService\x12`\n\x14\x43reatePlacementGroup\x12$.ray.rpc.CreatePlacementGroupRequest\x1a\".ray.rpc.CreatePlacementGroupReply\x12`\n\x14RemovePlacementGroup\x12$.ray.rpc.RemovePlacementGroupRequest\x1a\".ray.rpc.RemovePlacementGroupReply\x12W\n\x11GetPlacementGroup\x12!.ray.rpc.GetPlacementGroupRequest\x1a\x1f.ray.rpc.GetPlacementGroupReply\x12\x66\n\x16GetNamedPlacementGroup\x12&.ray.rpc.GetNamedPlacementGroupRequest\x1a$.ray.rpc.GetNamedPlacementGroupReply\x12`\n\x14GetAllPlacementGroup\x12$.ray.rpc.GetAllPlacementGroupRequest\x1a\".ray.rpc.GetAllPlacementGroupReply\x12x\n\x1cWaitPlacementGroupUntilReady\x12,.ray.rpc.WaitPlacementGroupUntilReadyRequest\x1a*.ray.rpc.WaitPlacementGroupUntilReadyReply2\xd8\x04\n\x14InternalKVGcsService\x12K\n\rInternalKVGet\x12\x1d.ray.rpc.InternalKVGetRequest\x1a\x1b.ray.rpc.InternalKVGetReply\x12Z\n\x12InternalKVMultiGet\x12\".ray.rpc.InternalKVMultiGetRequest\x1a .ray.rpc.InternalKVMultiGetReply\x12K\n\rInternalKVPut\x12\x1d.ray.rpc.InternalKVPutRequest\x1a\x1b.ray.rpc.InternalKVPutReply\x12K\n\rInternalKVDel\x12\x1d.ray.rpc.InternalKVDelRequest\x1a\x1b.ray.rpc.InternalKVDelReply\x12T\n\x10InternalKVExists\x12 .ray.rpc.InternalKVExistsRequest\x1a\x1e.ray.rpc.InternalKVExistsReply\x12N\n\x0eInternalKVKeys\x12\x1e.ray.rpc.InternalKVKeysRequest\x1a\x1c.ray.rpc.InternalKVKeysReply\x12W\n\x11GetInternalConfig\x12!.ray.rpc.GetInternalConfigRequest\x1a\x1f.ray.rpc.GetInternalConfigReply2l\n\x14RuntimeEnvGcsService\x12T\n\x10PinRuntimeEnvURI\x12 .ray.rpc.PinRuntimeEnvURIRequest\x1a\x1e.ray.rpc.PinRuntimeEnvURIReply2\x93\x03\n\x18InternalPubSubGcsService\x12\x42\n\nGcsPublish\x12\x1a.ray.rpc.GcsPublishRequest\x1a\x18.ray.rpc.GcsPublishReply\x12W\n\x11GcsSubscriberPoll\x12!.ray.rpc.GcsSubscriberPollRequest\x1a\x1f.ray.rpc.GcsSubscriberPollReply\x12o\n\x19GcsSubscriberCommandBatch\x12).ray.rpc.GcsSubscriberCommandBatchRequest\x1a\'.ray.rpc.GcsSubscriberCommandBatchReply\x12i\n\x17GcsUnregisterSubscriber\x12\'.ray.rpc.GcsUnregisterSubscriberRequest\x1a%.ray.rpc.GcsUnregisterSubscriberReply2\xa1\x03\n\x1aNodeResourceInfoGcsService\x12l\n\x18GetAllAvailableResources\x12(.ray.rpc.GetAllAvailableResourcesRequest\x1a&.ray.rpc.GetAllAvailableResourcesReply\x12`\n\x14GetAllTotalResources\x12$.ray.rpc.GetAllTotalResourcesRequest\x1a\".ray.rpc.GetAllTotalResourcesReply\x12]\n\x13GetAllResourceUsage\x12#.ray.rpc.GetAllResourceUsageRequest\x1a!.ray.rpc.GetAllResourceUsageReply\x12T\n\x10GetDrainingNodes\x12 .ray.rpc.GetDrainingNodesRequest\x1a\x1e.ray.rpc.GetDrainingNodesReply2\xcd\x03\n\x12NodeInfoGcsService\x12H\n\x0cGetClusterId\x12\x1c.ray.rpc.GetClusterIdRequest\x1a\x1a.ray.rpc.GetClusterIdReply\x12H\n\x0cRegisterNode\x12\x1c.ray.rpc.RegisterNodeRequest\x1a\x1a.ray.rpc.RegisterNodeReply\x12N\n\x0eUnregisterNode\x12\x1e.ray.rpc.UnregisterNodeRequest\x1a\x1c.ray.rpc.UnregisterNodeReply\x12?\n\tDrainNode\x12\x19.ray.rpc.DrainNodeRequest\x1a\x17.ray.rpc.DrainNodeReply\x12N\n\x0eGetAllNodeInfo\x12\x1e.ray.rpc.GetAllNodeInfoRequest\x1a\x1c.ray.rpc.GetAllNodeInfoReply\x12\x42\n\nCheckAlive\x12\x1a.ray.rpc.CheckAliveRequest\x1a\x18.ray.rpc.CheckAliveReply2\xb7\x01\n\x12TaskInfoGcsService\x12T\n\x10\x41\x64\x64TaskEventData\x12 .ray.rpc.AddTaskEventDataRequest\x1a\x1e.ray.rpc.AddTaskEventDataReply\x12K\n\rGetTaskEvents\x12\x1d.ray.rpc.GetTaskEventsRequest\x1a\x1b.ray.rpc.GetTaskEventsReply2i\n\x18RayEventExportGcsService\x12M\n\tAddEvents\x12 .ray.rpc.events.AddEventsRequest\x1a\x1e.ray.rpc.events.AddEventsReplyb\x06proto3') + +_GCSSERVICEFAILURETYPE = DESCRIPTOR.enum_types_by_name['GcsServiceFailureType'] +GcsServiceFailureType = enum_type_wrapper.EnumTypeWrapper(_GCSSERVICEFAILURETYPE) +_FILTERPREDICATE = DESCRIPTOR.enum_types_by_name['FilterPredicate'] +FilterPredicate = enum_type_wrapper.EnumTypeWrapper(_FILTERPREDICATE) +RPC_DISCONNECT = 0 +GCS_SERVER_RESTART = 1 +EQUAL = 0 +NOT_EQUAL = 1 + + +_ADDJOBREQUEST = DESCRIPTOR.message_types_by_name['AddJobRequest'] +_ADDJOBREPLY = DESCRIPTOR.message_types_by_name['AddJobReply'] +_MARKJOBFINISHEDREQUEST = DESCRIPTOR.message_types_by_name['MarkJobFinishedRequest'] +_MARKJOBFINISHEDREPLY = DESCRIPTOR.message_types_by_name['MarkJobFinishedReply'] +_GETALLJOBINFOREQUEST = DESCRIPTOR.message_types_by_name['GetAllJobInfoRequest'] +_GETALLJOBINFOREPLY = DESCRIPTOR.message_types_by_name['GetAllJobInfoReply'] +_REPORTJOBERRORREQUEST = DESCRIPTOR.message_types_by_name['ReportJobErrorRequest'] +_REPORTJOBERRORREPLY = DESCRIPTOR.message_types_by_name['ReportJobErrorReply'] +_GETNEXTJOBIDREQUEST = DESCRIPTOR.message_types_by_name['GetNextJobIDRequest'] +_GETNEXTJOBIDREPLY = DESCRIPTOR.message_types_by_name['GetNextJobIDReply'] +_GETACTORINFOREQUEST = DESCRIPTOR.message_types_by_name['GetActorInfoRequest'] +_GETACTORINFOREPLY = DESCRIPTOR.message_types_by_name['GetActorInfoReply'] +_GETNAMEDACTORINFOREQUEST = DESCRIPTOR.message_types_by_name['GetNamedActorInfoRequest'] +_GETNAMEDACTORINFOREPLY = DESCRIPTOR.message_types_by_name['GetNamedActorInfoReply'] +_LISTNAMEDACTORSREQUEST = DESCRIPTOR.message_types_by_name['ListNamedActorsRequest'] +_LISTNAMEDACTORSREPLY = DESCRIPTOR.message_types_by_name['ListNamedActorsReply'] +_GETALLACTORINFOREQUEST = DESCRIPTOR.message_types_by_name['GetAllActorInfoRequest'] +_GETALLACTORINFOREQUEST_FILTERS = _GETALLACTORINFOREQUEST.nested_types_by_name['Filters'] +_GETALLACTORINFOREPLY = DESCRIPTOR.message_types_by_name['GetAllActorInfoReply'] +_KILLACTORVIAGCSREQUEST = DESCRIPTOR.message_types_by_name['KillActorViaGcsRequest'] +_KILLACTORVIAGCSREPLY = DESCRIPTOR.message_types_by_name['KillActorViaGcsReply'] +_REPORTACTOROUTOFSCOPEREQUEST = DESCRIPTOR.message_types_by_name['ReportActorOutOfScopeRequest'] +_REPORTACTOROUTOFSCOPEREPLY = DESCRIPTOR.message_types_by_name['ReportActorOutOfScopeReply'] +_GETCLUSTERIDREQUEST = DESCRIPTOR.message_types_by_name['GetClusterIdRequest'] +_GETCLUSTERIDREPLY = DESCRIPTOR.message_types_by_name['GetClusterIdReply'] +_REGISTERNODEREQUEST = DESCRIPTOR.message_types_by_name['RegisterNodeRequest'] +_REGISTERNODEREPLY = DESCRIPTOR.message_types_by_name['RegisterNodeReply'] +_UNREGISTERNODEREQUEST = DESCRIPTOR.message_types_by_name['UnregisterNodeRequest'] +_UNREGISTERNODEREPLY = DESCRIPTOR.message_types_by_name['UnregisterNodeReply'] +_GETALLNODEINFOREQUEST = DESCRIPTOR.message_types_by_name['GetAllNodeInfoRequest'] +_GETALLNODEINFOREQUEST_NODESELECTOR = _GETALLNODEINFOREQUEST.nested_types_by_name['NodeSelector'] +_GETALLNODEINFOREPLY = DESCRIPTOR.message_types_by_name['GetAllNodeInfoReply'] +_CHECKALIVEREQUEST = DESCRIPTOR.message_types_by_name['CheckAliveRequest'] +_CHECKALIVEREPLY = DESCRIPTOR.message_types_by_name['CheckAliveReply'] +_GETINTERNALCONFIGREQUEST = DESCRIPTOR.message_types_by_name['GetInternalConfigRequest'] +_GETINTERNALCONFIGREPLY = DESCRIPTOR.message_types_by_name['GetInternalConfigReply'] +_DELETERESOURCESREPLY = DESCRIPTOR.message_types_by_name['DeleteResourcesReply'] +_GETALLAVAILABLERESOURCESREQUEST = DESCRIPTOR.message_types_by_name['GetAllAvailableResourcesRequest'] +_GETALLAVAILABLERESOURCESREPLY = DESCRIPTOR.message_types_by_name['GetAllAvailableResourcesReply'] +_GETALLTOTALRESOURCESREQUEST = DESCRIPTOR.message_types_by_name['GetAllTotalResourcesRequest'] +_GETALLTOTALRESOURCESREPLY = DESCRIPTOR.message_types_by_name['GetAllTotalResourcesReply'] +_REPORTWORKERFAILUREREQUEST = DESCRIPTOR.message_types_by_name['ReportWorkerFailureRequest'] +_REPORTWORKERFAILUREREPLY = DESCRIPTOR.message_types_by_name['ReportWorkerFailureReply'] +_GETWORKERINFOREQUEST = DESCRIPTOR.message_types_by_name['GetWorkerInfoRequest'] +_GETWORKERINFOREPLY = DESCRIPTOR.message_types_by_name['GetWorkerInfoReply'] +_GETALLWORKERINFOREQUEST = DESCRIPTOR.message_types_by_name['GetAllWorkerInfoRequest'] +_GETALLWORKERINFOREQUEST_FILTERS = _GETALLWORKERINFOREQUEST.nested_types_by_name['Filters'] +_GETALLWORKERINFOREPLY = DESCRIPTOR.message_types_by_name['GetAllWorkerInfoReply'] +_ADDWORKERINFOREQUEST = DESCRIPTOR.message_types_by_name['AddWorkerInfoRequest'] +_ADDWORKERINFOREPLY = DESCRIPTOR.message_types_by_name['AddWorkerInfoReply'] +_UPDATEWORKERDEBUGGERPORTREQUEST = DESCRIPTOR.message_types_by_name['UpdateWorkerDebuggerPortRequest'] +_UPDATEWORKERDEBUGGERPORTREPLY = DESCRIPTOR.message_types_by_name['UpdateWorkerDebuggerPortReply'] +_UPDATEWORKERNUMPAUSEDTHREADSREQUEST = DESCRIPTOR.message_types_by_name['UpdateWorkerNumPausedThreadsRequest'] +_UPDATEWORKERNUMPAUSEDTHREADSREPLY = DESCRIPTOR.message_types_by_name['UpdateWorkerNumPausedThreadsReply'] +_CREATEACTORREQUEST = DESCRIPTOR.message_types_by_name['CreateActorRequest'] +_CREATEACTORREPLY = DESCRIPTOR.message_types_by_name['CreateActorReply'] +_REGISTERACTORREQUEST = DESCRIPTOR.message_types_by_name['RegisterActorRequest'] +_REGISTERACTORREPLY = DESCRIPTOR.message_types_by_name['RegisterActorReply'] +_RESTARTACTORFORLINEAGERECONSTRUCTIONREQUEST = DESCRIPTOR.message_types_by_name['RestartActorForLineageReconstructionRequest'] +_RESTARTACTORFORLINEAGERECONSTRUCTIONREPLY = DESCRIPTOR.message_types_by_name['RestartActorForLineageReconstructionReply'] +_CREATEPLACEMENTGROUPREQUEST = DESCRIPTOR.message_types_by_name['CreatePlacementGroupRequest'] +_CREATEPLACEMENTGROUPREPLY = DESCRIPTOR.message_types_by_name['CreatePlacementGroupReply'] +_REMOVEPLACEMENTGROUPREQUEST = DESCRIPTOR.message_types_by_name['RemovePlacementGroupRequest'] +_REMOVEPLACEMENTGROUPREPLY = DESCRIPTOR.message_types_by_name['RemovePlacementGroupReply'] +_GETPLACEMENTGROUPREQUEST = DESCRIPTOR.message_types_by_name['GetPlacementGroupRequest'] +_GETPLACEMENTGROUPREPLY = DESCRIPTOR.message_types_by_name['GetPlacementGroupReply'] +_GETALLPLACEMENTGROUPREQUEST = DESCRIPTOR.message_types_by_name['GetAllPlacementGroupRequest'] +_GETALLPLACEMENTGROUPREPLY = DESCRIPTOR.message_types_by_name['GetAllPlacementGroupReply'] +_WAITPLACEMENTGROUPUNTILREADYREQUEST = DESCRIPTOR.message_types_by_name['WaitPlacementGroupUntilReadyRequest'] +_WAITPLACEMENTGROUPUNTILREADYREPLY = DESCRIPTOR.message_types_by_name['WaitPlacementGroupUntilReadyReply'] +_GETNAMEDPLACEMENTGROUPREQUEST = DESCRIPTOR.message_types_by_name['GetNamedPlacementGroupRequest'] +_GETNAMEDPLACEMENTGROUPREPLY = DESCRIPTOR.message_types_by_name['GetNamedPlacementGroupReply'] +_DRAINNODEDATA = DESCRIPTOR.message_types_by_name['DrainNodeData'] +_DRAINNODEREQUEST = DESCRIPTOR.message_types_by_name['DrainNodeRequest'] +_DRAINNODESTATUS = DESCRIPTOR.message_types_by_name['DrainNodeStatus'] +_DRAINNODEREPLY = DESCRIPTOR.message_types_by_name['DrainNodeReply'] +_INTERNALKVGETREQUEST = DESCRIPTOR.message_types_by_name['InternalKVGetRequest'] +_INTERNALKVGETREPLY = DESCRIPTOR.message_types_by_name['InternalKVGetReply'] +_INTERNALKVMULTIGETREQUEST = DESCRIPTOR.message_types_by_name['InternalKVMultiGetRequest'] +_MAPFIELDENTRY = DESCRIPTOR.message_types_by_name['MapFieldEntry'] +_INTERNALKVMULTIGETREPLY = DESCRIPTOR.message_types_by_name['InternalKVMultiGetReply'] +_INTERNALKVPUTREQUEST = DESCRIPTOR.message_types_by_name['InternalKVPutRequest'] +_INTERNALKVPUTREPLY = DESCRIPTOR.message_types_by_name['InternalKVPutReply'] +_INTERNALKVDELREQUEST = DESCRIPTOR.message_types_by_name['InternalKVDelRequest'] +_INTERNALKVDELREPLY = DESCRIPTOR.message_types_by_name['InternalKVDelReply'] +_INTERNALKVEXISTSREQUEST = DESCRIPTOR.message_types_by_name['InternalKVExistsRequest'] +_INTERNALKVEXISTSREPLY = DESCRIPTOR.message_types_by_name['InternalKVExistsReply'] +_INTERNALKVKEYSREQUEST = DESCRIPTOR.message_types_by_name['InternalKVKeysRequest'] +_INTERNALKVKEYSREPLY = DESCRIPTOR.message_types_by_name['InternalKVKeysReply'] +_PINRUNTIMEENVURIREQUEST = DESCRIPTOR.message_types_by_name['PinRuntimeEnvURIRequest'] +_PINRUNTIMEENVURIREPLY = DESCRIPTOR.message_types_by_name['PinRuntimeEnvURIReply'] +_GCSPUBLISHREQUEST = DESCRIPTOR.message_types_by_name['GcsPublishRequest'] +_GCSPUBLISHREPLY = DESCRIPTOR.message_types_by_name['GcsPublishReply'] +_GCSSUBSCRIBERPOLLREQUEST = DESCRIPTOR.message_types_by_name['GcsSubscriberPollRequest'] +_GCSSUBSCRIBERPOLLREPLY = DESCRIPTOR.message_types_by_name['GcsSubscriberPollReply'] +_GCSSUBSCRIBERCOMMANDBATCHREQUEST = DESCRIPTOR.message_types_by_name['GcsSubscriberCommandBatchRequest'] +_GCSSUBSCRIBERCOMMANDBATCHREPLY = DESCRIPTOR.message_types_by_name['GcsSubscriberCommandBatchReply'] +_GCSUNREGISTERSUBSCRIBERREQUEST = DESCRIPTOR.message_types_by_name['GcsUnregisterSubscriberRequest'] +_GCSUNREGISTERSUBSCRIBERREPLY = DESCRIPTOR.message_types_by_name['GcsUnregisterSubscriberReply'] +_GETALLRESOURCEUSAGEREQUEST = DESCRIPTOR.message_types_by_name['GetAllResourceUsageRequest'] +_GETALLRESOURCEUSAGEREPLY = DESCRIPTOR.message_types_by_name['GetAllResourceUsageReply'] +_GETDRAININGNODESREQUEST = DESCRIPTOR.message_types_by_name['GetDrainingNodesRequest'] +_DRAININGNODE = DESCRIPTOR.message_types_by_name['DrainingNode'] +_GETDRAININGNODESREPLY = DESCRIPTOR.message_types_by_name['GetDrainingNodesReply'] +_GCSSTATUS = DESCRIPTOR.message_types_by_name['GcsStatus'] +_ADDTASKEVENTDATAREQUEST = DESCRIPTOR.message_types_by_name['AddTaskEventDataRequest'] +_ADDTASKEVENTDATAREPLY = DESCRIPTOR.message_types_by_name['AddTaskEventDataReply'] +_GETTASKEVENTSREQUEST = DESCRIPTOR.message_types_by_name['GetTaskEventsRequest'] +_GETTASKEVENTSREQUEST_FILTERS = _GETTASKEVENTSREQUEST.nested_types_by_name['Filters'] +_GETTASKEVENTSREQUEST_FILTERS_JOBIDFILTER = _GETTASKEVENTSREQUEST_FILTERS.nested_types_by_name['JobIdFilter'] +_GETTASKEVENTSREQUEST_FILTERS_TASKIDFILTER = _GETTASKEVENTSREQUEST_FILTERS.nested_types_by_name['TaskIdFilter'] +_GETTASKEVENTSREQUEST_FILTERS_ACTORIDFILTER = _GETTASKEVENTSREQUEST_FILTERS.nested_types_by_name['ActorIdFilter'] +_GETTASKEVENTSREQUEST_FILTERS_TASKNAMEFILTER = _GETTASKEVENTSREQUEST_FILTERS.nested_types_by_name['TaskNameFilter'] +_GETTASKEVENTSREQUEST_FILTERS_STATEFILTER = _GETTASKEVENTSREQUEST_FILTERS.nested_types_by_name['StateFilter'] +_GETTASKEVENTSREPLY = DESCRIPTOR.message_types_by_name['GetTaskEventsReply'] +AddJobRequest = _reflection.GeneratedProtocolMessageType('AddJobRequest', (_message.Message,), { + 'DESCRIPTOR' : _ADDJOBREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AddJobRequest) + }) +_sym_db.RegisterMessage(AddJobRequest) + +AddJobReply = _reflection.GeneratedProtocolMessageType('AddJobReply', (_message.Message,), { + 'DESCRIPTOR' : _ADDJOBREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AddJobReply) + }) +_sym_db.RegisterMessage(AddJobReply) + +MarkJobFinishedRequest = _reflection.GeneratedProtocolMessageType('MarkJobFinishedRequest', (_message.Message,), { + 'DESCRIPTOR' : _MARKJOBFINISHEDREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.MarkJobFinishedRequest) + }) +_sym_db.RegisterMessage(MarkJobFinishedRequest) + +MarkJobFinishedReply = _reflection.GeneratedProtocolMessageType('MarkJobFinishedReply', (_message.Message,), { + 'DESCRIPTOR' : _MARKJOBFINISHEDREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.MarkJobFinishedReply) + }) +_sym_db.RegisterMessage(MarkJobFinishedReply) + +GetAllJobInfoRequest = _reflection.GeneratedProtocolMessageType('GetAllJobInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETALLJOBINFOREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllJobInfoRequest) + }) +_sym_db.RegisterMessage(GetAllJobInfoRequest) + +GetAllJobInfoReply = _reflection.GeneratedProtocolMessageType('GetAllJobInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _GETALLJOBINFOREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllJobInfoReply) + }) +_sym_db.RegisterMessage(GetAllJobInfoReply) + +ReportJobErrorRequest = _reflection.GeneratedProtocolMessageType('ReportJobErrorRequest', (_message.Message,), { + 'DESCRIPTOR' : _REPORTJOBERRORREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportJobErrorRequest) + }) +_sym_db.RegisterMessage(ReportJobErrorRequest) + +ReportJobErrorReply = _reflection.GeneratedProtocolMessageType('ReportJobErrorReply', (_message.Message,), { + 'DESCRIPTOR' : _REPORTJOBERRORREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportJobErrorReply) + }) +_sym_db.RegisterMessage(ReportJobErrorReply) + +GetNextJobIDRequest = _reflection.GeneratedProtocolMessageType('GetNextJobIDRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETNEXTJOBIDREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetNextJobIDRequest) + }) +_sym_db.RegisterMessage(GetNextJobIDRequest) + +GetNextJobIDReply = _reflection.GeneratedProtocolMessageType('GetNextJobIDReply', (_message.Message,), { + 'DESCRIPTOR' : _GETNEXTJOBIDREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetNextJobIDReply) + }) +_sym_db.RegisterMessage(GetNextJobIDReply) + +GetActorInfoRequest = _reflection.GeneratedProtocolMessageType('GetActorInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETACTORINFOREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetActorInfoRequest) + }) +_sym_db.RegisterMessage(GetActorInfoRequest) + +GetActorInfoReply = _reflection.GeneratedProtocolMessageType('GetActorInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _GETACTORINFOREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetActorInfoReply) + }) +_sym_db.RegisterMessage(GetActorInfoReply) + +GetNamedActorInfoRequest = _reflection.GeneratedProtocolMessageType('GetNamedActorInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETNAMEDACTORINFOREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetNamedActorInfoRequest) + }) +_sym_db.RegisterMessage(GetNamedActorInfoRequest) + +GetNamedActorInfoReply = _reflection.GeneratedProtocolMessageType('GetNamedActorInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _GETNAMEDACTORINFOREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetNamedActorInfoReply) + }) +_sym_db.RegisterMessage(GetNamedActorInfoReply) + +ListNamedActorsRequest = _reflection.GeneratedProtocolMessageType('ListNamedActorsRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTNAMEDACTORSREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ListNamedActorsRequest) + }) +_sym_db.RegisterMessage(ListNamedActorsRequest) + +ListNamedActorsReply = _reflection.GeneratedProtocolMessageType('ListNamedActorsReply', (_message.Message,), { + 'DESCRIPTOR' : _LISTNAMEDACTORSREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ListNamedActorsReply) + }) +_sym_db.RegisterMessage(ListNamedActorsReply) + +GetAllActorInfoRequest = _reflection.GeneratedProtocolMessageType('GetAllActorInfoRequest', (_message.Message,), { + + 'Filters' : _reflection.GeneratedProtocolMessageType('Filters', (_message.Message,), { + 'DESCRIPTOR' : _GETALLACTORINFOREQUEST_FILTERS, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllActorInfoRequest.Filters) + }) + , + 'DESCRIPTOR' : _GETALLACTORINFOREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllActorInfoRequest) + }) +_sym_db.RegisterMessage(GetAllActorInfoRequest) +_sym_db.RegisterMessage(GetAllActorInfoRequest.Filters) + +GetAllActorInfoReply = _reflection.GeneratedProtocolMessageType('GetAllActorInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _GETALLACTORINFOREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllActorInfoReply) + }) +_sym_db.RegisterMessage(GetAllActorInfoReply) + +KillActorViaGcsRequest = _reflection.GeneratedProtocolMessageType('KillActorViaGcsRequest', (_message.Message,), { + 'DESCRIPTOR' : _KILLACTORVIAGCSREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KillActorViaGcsRequest) + }) +_sym_db.RegisterMessage(KillActorViaGcsRequest) + +KillActorViaGcsReply = _reflection.GeneratedProtocolMessageType('KillActorViaGcsReply', (_message.Message,), { + 'DESCRIPTOR' : _KILLACTORVIAGCSREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KillActorViaGcsReply) + }) +_sym_db.RegisterMessage(KillActorViaGcsReply) + +ReportActorOutOfScopeRequest = _reflection.GeneratedProtocolMessageType('ReportActorOutOfScopeRequest', (_message.Message,), { + 'DESCRIPTOR' : _REPORTACTOROUTOFSCOPEREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportActorOutOfScopeRequest) + }) +_sym_db.RegisterMessage(ReportActorOutOfScopeRequest) + +ReportActorOutOfScopeReply = _reflection.GeneratedProtocolMessageType('ReportActorOutOfScopeReply', (_message.Message,), { + 'DESCRIPTOR' : _REPORTACTOROUTOFSCOPEREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportActorOutOfScopeReply) + }) +_sym_db.RegisterMessage(ReportActorOutOfScopeReply) + +GetClusterIdRequest = _reflection.GeneratedProtocolMessageType('GetClusterIdRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETCLUSTERIDREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetClusterIdRequest) + }) +_sym_db.RegisterMessage(GetClusterIdRequest) + +GetClusterIdReply = _reflection.GeneratedProtocolMessageType('GetClusterIdReply', (_message.Message,), { + 'DESCRIPTOR' : _GETCLUSTERIDREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetClusterIdReply) + }) +_sym_db.RegisterMessage(GetClusterIdReply) + +RegisterNodeRequest = _reflection.GeneratedProtocolMessageType('RegisterNodeRequest', (_message.Message,), { + 'DESCRIPTOR' : _REGISTERNODEREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RegisterNodeRequest) + }) +_sym_db.RegisterMessage(RegisterNodeRequest) + +RegisterNodeReply = _reflection.GeneratedProtocolMessageType('RegisterNodeReply', (_message.Message,), { + 'DESCRIPTOR' : _REGISTERNODEREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RegisterNodeReply) + }) +_sym_db.RegisterMessage(RegisterNodeReply) + +UnregisterNodeRequest = _reflection.GeneratedProtocolMessageType('UnregisterNodeRequest', (_message.Message,), { + 'DESCRIPTOR' : _UNREGISTERNODEREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UnregisterNodeRequest) + }) +_sym_db.RegisterMessage(UnregisterNodeRequest) + +UnregisterNodeReply = _reflection.GeneratedProtocolMessageType('UnregisterNodeReply', (_message.Message,), { + 'DESCRIPTOR' : _UNREGISTERNODEREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UnregisterNodeReply) + }) +_sym_db.RegisterMessage(UnregisterNodeReply) + +GetAllNodeInfoRequest = _reflection.GeneratedProtocolMessageType('GetAllNodeInfoRequest', (_message.Message,), { + + 'NodeSelector' : _reflection.GeneratedProtocolMessageType('NodeSelector', (_message.Message,), { + 'DESCRIPTOR' : _GETALLNODEINFOREQUEST_NODESELECTOR, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllNodeInfoRequest.NodeSelector) + }) + , + 'DESCRIPTOR' : _GETALLNODEINFOREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllNodeInfoRequest) + }) +_sym_db.RegisterMessage(GetAllNodeInfoRequest) +_sym_db.RegisterMessage(GetAllNodeInfoRequest.NodeSelector) + +GetAllNodeInfoReply = _reflection.GeneratedProtocolMessageType('GetAllNodeInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _GETALLNODEINFOREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllNodeInfoReply) + }) +_sym_db.RegisterMessage(GetAllNodeInfoReply) + +CheckAliveRequest = _reflection.GeneratedProtocolMessageType('CheckAliveRequest', (_message.Message,), { + 'DESCRIPTOR' : _CHECKALIVEREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CheckAliveRequest) + }) +_sym_db.RegisterMessage(CheckAliveRequest) + +CheckAliveReply = _reflection.GeneratedProtocolMessageType('CheckAliveReply', (_message.Message,), { + 'DESCRIPTOR' : _CHECKALIVEREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CheckAliveReply) + }) +_sym_db.RegisterMessage(CheckAliveReply) + +GetInternalConfigRequest = _reflection.GeneratedProtocolMessageType('GetInternalConfigRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETINTERNALCONFIGREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetInternalConfigRequest) + }) +_sym_db.RegisterMessage(GetInternalConfigRequest) + +GetInternalConfigReply = _reflection.GeneratedProtocolMessageType('GetInternalConfigReply', (_message.Message,), { + 'DESCRIPTOR' : _GETINTERNALCONFIGREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetInternalConfigReply) + }) +_sym_db.RegisterMessage(GetInternalConfigReply) + +DeleteResourcesReply = _reflection.GeneratedProtocolMessageType('DeleteResourcesReply', (_message.Message,), { + 'DESCRIPTOR' : _DELETERESOURCESREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DeleteResourcesReply) + }) +_sym_db.RegisterMessage(DeleteResourcesReply) + +GetAllAvailableResourcesRequest = _reflection.GeneratedProtocolMessageType('GetAllAvailableResourcesRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETALLAVAILABLERESOURCESREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllAvailableResourcesRequest) + }) +_sym_db.RegisterMessage(GetAllAvailableResourcesRequest) + +GetAllAvailableResourcesReply = _reflection.GeneratedProtocolMessageType('GetAllAvailableResourcesReply', (_message.Message,), { + 'DESCRIPTOR' : _GETALLAVAILABLERESOURCESREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllAvailableResourcesReply) + }) +_sym_db.RegisterMessage(GetAllAvailableResourcesReply) + +GetAllTotalResourcesRequest = _reflection.GeneratedProtocolMessageType('GetAllTotalResourcesRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETALLTOTALRESOURCESREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllTotalResourcesRequest) + }) +_sym_db.RegisterMessage(GetAllTotalResourcesRequest) + +GetAllTotalResourcesReply = _reflection.GeneratedProtocolMessageType('GetAllTotalResourcesReply', (_message.Message,), { + 'DESCRIPTOR' : _GETALLTOTALRESOURCESREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllTotalResourcesReply) + }) +_sym_db.RegisterMessage(GetAllTotalResourcesReply) + +ReportWorkerFailureRequest = _reflection.GeneratedProtocolMessageType('ReportWorkerFailureRequest', (_message.Message,), { + 'DESCRIPTOR' : _REPORTWORKERFAILUREREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportWorkerFailureRequest) + }) +_sym_db.RegisterMessage(ReportWorkerFailureRequest) + +ReportWorkerFailureReply = _reflection.GeneratedProtocolMessageType('ReportWorkerFailureReply', (_message.Message,), { + 'DESCRIPTOR' : _REPORTWORKERFAILUREREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportWorkerFailureReply) + }) +_sym_db.RegisterMessage(ReportWorkerFailureReply) + +GetWorkerInfoRequest = _reflection.GeneratedProtocolMessageType('GetWorkerInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETWORKERINFOREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetWorkerInfoRequest) + }) +_sym_db.RegisterMessage(GetWorkerInfoRequest) + +GetWorkerInfoReply = _reflection.GeneratedProtocolMessageType('GetWorkerInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _GETWORKERINFOREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetWorkerInfoReply) + }) +_sym_db.RegisterMessage(GetWorkerInfoReply) + +GetAllWorkerInfoRequest = _reflection.GeneratedProtocolMessageType('GetAllWorkerInfoRequest', (_message.Message,), { + + 'Filters' : _reflection.GeneratedProtocolMessageType('Filters', (_message.Message,), { + 'DESCRIPTOR' : _GETALLWORKERINFOREQUEST_FILTERS, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllWorkerInfoRequest.Filters) + }) + , + 'DESCRIPTOR' : _GETALLWORKERINFOREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllWorkerInfoRequest) + }) +_sym_db.RegisterMessage(GetAllWorkerInfoRequest) +_sym_db.RegisterMessage(GetAllWorkerInfoRequest.Filters) + +GetAllWorkerInfoReply = _reflection.GeneratedProtocolMessageType('GetAllWorkerInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _GETALLWORKERINFOREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllWorkerInfoReply) + }) +_sym_db.RegisterMessage(GetAllWorkerInfoReply) + +AddWorkerInfoRequest = _reflection.GeneratedProtocolMessageType('AddWorkerInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _ADDWORKERINFOREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AddWorkerInfoRequest) + }) +_sym_db.RegisterMessage(AddWorkerInfoRequest) + +AddWorkerInfoReply = _reflection.GeneratedProtocolMessageType('AddWorkerInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _ADDWORKERINFOREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AddWorkerInfoReply) + }) +_sym_db.RegisterMessage(AddWorkerInfoReply) + +UpdateWorkerDebuggerPortRequest = _reflection.GeneratedProtocolMessageType('UpdateWorkerDebuggerPortRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEWORKERDEBUGGERPORTREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UpdateWorkerDebuggerPortRequest) + }) +_sym_db.RegisterMessage(UpdateWorkerDebuggerPortRequest) + +UpdateWorkerDebuggerPortReply = _reflection.GeneratedProtocolMessageType('UpdateWorkerDebuggerPortReply', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEWORKERDEBUGGERPORTREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UpdateWorkerDebuggerPortReply) + }) +_sym_db.RegisterMessage(UpdateWorkerDebuggerPortReply) + +UpdateWorkerNumPausedThreadsRequest = _reflection.GeneratedProtocolMessageType('UpdateWorkerNumPausedThreadsRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEWORKERNUMPAUSEDTHREADSREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UpdateWorkerNumPausedThreadsRequest) + }) +_sym_db.RegisterMessage(UpdateWorkerNumPausedThreadsRequest) + +UpdateWorkerNumPausedThreadsReply = _reflection.GeneratedProtocolMessageType('UpdateWorkerNumPausedThreadsReply', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEWORKERNUMPAUSEDTHREADSREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UpdateWorkerNumPausedThreadsReply) + }) +_sym_db.RegisterMessage(UpdateWorkerNumPausedThreadsReply) + +CreateActorRequest = _reflection.GeneratedProtocolMessageType('CreateActorRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATEACTORREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CreateActorRequest) + }) +_sym_db.RegisterMessage(CreateActorRequest) + +CreateActorReply = _reflection.GeneratedProtocolMessageType('CreateActorReply', (_message.Message,), { + 'DESCRIPTOR' : _CREATEACTORREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CreateActorReply) + }) +_sym_db.RegisterMessage(CreateActorReply) + +RegisterActorRequest = _reflection.GeneratedProtocolMessageType('RegisterActorRequest', (_message.Message,), { + 'DESCRIPTOR' : _REGISTERACTORREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RegisterActorRequest) + }) +_sym_db.RegisterMessage(RegisterActorRequest) + +RegisterActorReply = _reflection.GeneratedProtocolMessageType('RegisterActorReply', (_message.Message,), { + 'DESCRIPTOR' : _REGISTERACTORREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RegisterActorReply) + }) +_sym_db.RegisterMessage(RegisterActorReply) + +RestartActorForLineageReconstructionRequest = _reflection.GeneratedProtocolMessageType('RestartActorForLineageReconstructionRequest', (_message.Message,), { + 'DESCRIPTOR' : _RESTARTACTORFORLINEAGERECONSTRUCTIONREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RestartActorForLineageReconstructionRequest) + }) +_sym_db.RegisterMessage(RestartActorForLineageReconstructionRequest) + +RestartActorForLineageReconstructionReply = _reflection.GeneratedProtocolMessageType('RestartActorForLineageReconstructionReply', (_message.Message,), { + 'DESCRIPTOR' : _RESTARTACTORFORLINEAGERECONSTRUCTIONREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RestartActorForLineageReconstructionReply) + }) +_sym_db.RegisterMessage(RestartActorForLineageReconstructionReply) + +CreatePlacementGroupRequest = _reflection.GeneratedProtocolMessageType('CreatePlacementGroupRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATEPLACEMENTGROUPREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CreatePlacementGroupRequest) + }) +_sym_db.RegisterMessage(CreatePlacementGroupRequest) + +CreatePlacementGroupReply = _reflection.GeneratedProtocolMessageType('CreatePlacementGroupReply', (_message.Message,), { + 'DESCRIPTOR' : _CREATEPLACEMENTGROUPREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CreatePlacementGroupReply) + }) +_sym_db.RegisterMessage(CreatePlacementGroupReply) + +RemovePlacementGroupRequest = _reflection.GeneratedProtocolMessageType('RemovePlacementGroupRequest', (_message.Message,), { + 'DESCRIPTOR' : _REMOVEPLACEMENTGROUPREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RemovePlacementGroupRequest) + }) +_sym_db.RegisterMessage(RemovePlacementGroupRequest) + +RemovePlacementGroupReply = _reflection.GeneratedProtocolMessageType('RemovePlacementGroupReply', (_message.Message,), { + 'DESCRIPTOR' : _REMOVEPLACEMENTGROUPREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RemovePlacementGroupReply) + }) +_sym_db.RegisterMessage(RemovePlacementGroupReply) + +GetPlacementGroupRequest = _reflection.GeneratedProtocolMessageType('GetPlacementGroupRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETPLACEMENTGROUPREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetPlacementGroupRequest) + }) +_sym_db.RegisterMessage(GetPlacementGroupRequest) + +GetPlacementGroupReply = _reflection.GeneratedProtocolMessageType('GetPlacementGroupReply', (_message.Message,), { + 'DESCRIPTOR' : _GETPLACEMENTGROUPREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetPlacementGroupReply) + }) +_sym_db.RegisterMessage(GetPlacementGroupReply) + +GetAllPlacementGroupRequest = _reflection.GeneratedProtocolMessageType('GetAllPlacementGroupRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETALLPLACEMENTGROUPREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllPlacementGroupRequest) + }) +_sym_db.RegisterMessage(GetAllPlacementGroupRequest) + +GetAllPlacementGroupReply = _reflection.GeneratedProtocolMessageType('GetAllPlacementGroupReply', (_message.Message,), { + 'DESCRIPTOR' : _GETALLPLACEMENTGROUPREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllPlacementGroupReply) + }) +_sym_db.RegisterMessage(GetAllPlacementGroupReply) + +WaitPlacementGroupUntilReadyRequest = _reflection.GeneratedProtocolMessageType('WaitPlacementGroupUntilReadyRequest', (_message.Message,), { + 'DESCRIPTOR' : _WAITPLACEMENTGROUPUNTILREADYREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WaitPlacementGroupUntilReadyRequest) + }) +_sym_db.RegisterMessage(WaitPlacementGroupUntilReadyRequest) + +WaitPlacementGroupUntilReadyReply = _reflection.GeneratedProtocolMessageType('WaitPlacementGroupUntilReadyReply', (_message.Message,), { + 'DESCRIPTOR' : _WAITPLACEMENTGROUPUNTILREADYREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WaitPlacementGroupUntilReadyReply) + }) +_sym_db.RegisterMessage(WaitPlacementGroupUntilReadyReply) + +GetNamedPlacementGroupRequest = _reflection.GeneratedProtocolMessageType('GetNamedPlacementGroupRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETNAMEDPLACEMENTGROUPREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetNamedPlacementGroupRequest) + }) +_sym_db.RegisterMessage(GetNamedPlacementGroupRequest) + +GetNamedPlacementGroupReply = _reflection.GeneratedProtocolMessageType('GetNamedPlacementGroupReply', (_message.Message,), { + 'DESCRIPTOR' : _GETNAMEDPLACEMENTGROUPREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetNamedPlacementGroupReply) + }) +_sym_db.RegisterMessage(GetNamedPlacementGroupReply) + +DrainNodeData = _reflection.GeneratedProtocolMessageType('DrainNodeData', (_message.Message,), { + 'DESCRIPTOR' : _DRAINNODEDATA, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DrainNodeData) + }) +_sym_db.RegisterMessage(DrainNodeData) + +DrainNodeRequest = _reflection.GeneratedProtocolMessageType('DrainNodeRequest', (_message.Message,), { + 'DESCRIPTOR' : _DRAINNODEREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DrainNodeRequest) + }) +_sym_db.RegisterMessage(DrainNodeRequest) + +DrainNodeStatus = _reflection.GeneratedProtocolMessageType('DrainNodeStatus', (_message.Message,), { + 'DESCRIPTOR' : _DRAINNODESTATUS, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DrainNodeStatus) + }) +_sym_db.RegisterMessage(DrainNodeStatus) + +DrainNodeReply = _reflection.GeneratedProtocolMessageType('DrainNodeReply', (_message.Message,), { + 'DESCRIPTOR' : _DRAINNODEREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DrainNodeReply) + }) +_sym_db.RegisterMessage(DrainNodeReply) + +InternalKVGetRequest = _reflection.GeneratedProtocolMessageType('InternalKVGetRequest', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVGETREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVGetRequest) + }) +_sym_db.RegisterMessage(InternalKVGetRequest) + +InternalKVGetReply = _reflection.GeneratedProtocolMessageType('InternalKVGetReply', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVGETREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVGetReply) + }) +_sym_db.RegisterMessage(InternalKVGetReply) + +InternalKVMultiGetRequest = _reflection.GeneratedProtocolMessageType('InternalKVMultiGetRequest', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVMULTIGETREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVMultiGetRequest) + }) +_sym_db.RegisterMessage(InternalKVMultiGetRequest) + +MapFieldEntry = _reflection.GeneratedProtocolMessageType('MapFieldEntry', (_message.Message,), { + 'DESCRIPTOR' : _MAPFIELDENTRY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.MapFieldEntry) + }) +_sym_db.RegisterMessage(MapFieldEntry) + +InternalKVMultiGetReply = _reflection.GeneratedProtocolMessageType('InternalKVMultiGetReply', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVMULTIGETREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVMultiGetReply) + }) +_sym_db.RegisterMessage(InternalKVMultiGetReply) + +InternalKVPutRequest = _reflection.GeneratedProtocolMessageType('InternalKVPutRequest', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVPUTREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVPutRequest) + }) +_sym_db.RegisterMessage(InternalKVPutRequest) + +InternalKVPutReply = _reflection.GeneratedProtocolMessageType('InternalKVPutReply', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVPUTREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVPutReply) + }) +_sym_db.RegisterMessage(InternalKVPutReply) + +InternalKVDelRequest = _reflection.GeneratedProtocolMessageType('InternalKVDelRequest', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVDELREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVDelRequest) + }) +_sym_db.RegisterMessage(InternalKVDelRequest) + +InternalKVDelReply = _reflection.GeneratedProtocolMessageType('InternalKVDelReply', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVDELREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVDelReply) + }) +_sym_db.RegisterMessage(InternalKVDelReply) + +InternalKVExistsRequest = _reflection.GeneratedProtocolMessageType('InternalKVExistsRequest', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVEXISTSREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVExistsRequest) + }) +_sym_db.RegisterMessage(InternalKVExistsRequest) + +InternalKVExistsReply = _reflection.GeneratedProtocolMessageType('InternalKVExistsReply', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVEXISTSREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVExistsReply) + }) +_sym_db.RegisterMessage(InternalKVExistsReply) + +InternalKVKeysRequest = _reflection.GeneratedProtocolMessageType('InternalKVKeysRequest', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVKEYSREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVKeysRequest) + }) +_sym_db.RegisterMessage(InternalKVKeysRequest) + +InternalKVKeysReply = _reflection.GeneratedProtocolMessageType('InternalKVKeysReply', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALKVKEYSREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InternalKVKeysReply) + }) +_sym_db.RegisterMessage(InternalKVKeysReply) + +PinRuntimeEnvURIRequest = _reflection.GeneratedProtocolMessageType('PinRuntimeEnvURIRequest', (_message.Message,), { + 'DESCRIPTOR' : _PINRUNTIMEENVURIREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PinRuntimeEnvURIRequest) + }) +_sym_db.RegisterMessage(PinRuntimeEnvURIRequest) + +PinRuntimeEnvURIReply = _reflection.GeneratedProtocolMessageType('PinRuntimeEnvURIReply', (_message.Message,), { + 'DESCRIPTOR' : _PINRUNTIMEENVURIREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PinRuntimeEnvURIReply) + }) +_sym_db.RegisterMessage(PinRuntimeEnvURIReply) + +GcsPublishRequest = _reflection.GeneratedProtocolMessageType('GcsPublishRequest', (_message.Message,), { + 'DESCRIPTOR' : _GCSPUBLISHREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsPublishRequest) + }) +_sym_db.RegisterMessage(GcsPublishRequest) + +GcsPublishReply = _reflection.GeneratedProtocolMessageType('GcsPublishReply', (_message.Message,), { + 'DESCRIPTOR' : _GCSPUBLISHREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsPublishReply) + }) +_sym_db.RegisterMessage(GcsPublishReply) + +GcsSubscriberPollRequest = _reflection.GeneratedProtocolMessageType('GcsSubscriberPollRequest', (_message.Message,), { + 'DESCRIPTOR' : _GCSSUBSCRIBERPOLLREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsSubscriberPollRequest) + }) +_sym_db.RegisterMessage(GcsSubscriberPollRequest) + +GcsSubscriberPollReply = _reflection.GeneratedProtocolMessageType('GcsSubscriberPollReply', (_message.Message,), { + 'DESCRIPTOR' : _GCSSUBSCRIBERPOLLREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsSubscriberPollReply) + }) +_sym_db.RegisterMessage(GcsSubscriberPollReply) + +GcsSubscriberCommandBatchRequest = _reflection.GeneratedProtocolMessageType('GcsSubscriberCommandBatchRequest', (_message.Message,), { + 'DESCRIPTOR' : _GCSSUBSCRIBERCOMMANDBATCHREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsSubscriberCommandBatchRequest) + }) +_sym_db.RegisterMessage(GcsSubscriberCommandBatchRequest) + +GcsSubscriberCommandBatchReply = _reflection.GeneratedProtocolMessageType('GcsSubscriberCommandBatchReply', (_message.Message,), { + 'DESCRIPTOR' : _GCSSUBSCRIBERCOMMANDBATCHREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsSubscriberCommandBatchReply) + }) +_sym_db.RegisterMessage(GcsSubscriberCommandBatchReply) + +GcsUnregisterSubscriberRequest = _reflection.GeneratedProtocolMessageType('GcsUnregisterSubscriberRequest', (_message.Message,), { + 'DESCRIPTOR' : _GCSUNREGISTERSUBSCRIBERREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsUnregisterSubscriberRequest) + }) +_sym_db.RegisterMessage(GcsUnregisterSubscriberRequest) + +GcsUnregisterSubscriberReply = _reflection.GeneratedProtocolMessageType('GcsUnregisterSubscriberReply', (_message.Message,), { + 'DESCRIPTOR' : _GCSUNREGISTERSUBSCRIBERREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsUnregisterSubscriberReply) + }) +_sym_db.RegisterMessage(GcsUnregisterSubscriberReply) + +GetAllResourceUsageRequest = _reflection.GeneratedProtocolMessageType('GetAllResourceUsageRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETALLRESOURCEUSAGEREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllResourceUsageRequest) + }) +_sym_db.RegisterMessage(GetAllResourceUsageRequest) + +GetAllResourceUsageReply = _reflection.GeneratedProtocolMessageType('GetAllResourceUsageReply', (_message.Message,), { + 'DESCRIPTOR' : _GETALLRESOURCEUSAGEREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetAllResourceUsageReply) + }) +_sym_db.RegisterMessage(GetAllResourceUsageReply) + +GetDrainingNodesRequest = _reflection.GeneratedProtocolMessageType('GetDrainingNodesRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETDRAININGNODESREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetDrainingNodesRequest) + }) +_sym_db.RegisterMessage(GetDrainingNodesRequest) + +DrainingNode = _reflection.GeneratedProtocolMessageType('DrainingNode', (_message.Message,), { + 'DESCRIPTOR' : _DRAININGNODE, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DrainingNode) + }) +_sym_db.RegisterMessage(DrainingNode) + +GetDrainingNodesReply = _reflection.GeneratedProtocolMessageType('GetDrainingNodesReply', (_message.Message,), { + 'DESCRIPTOR' : _GETDRAININGNODESREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetDrainingNodesReply) + }) +_sym_db.RegisterMessage(GetDrainingNodesReply) + +GcsStatus = _reflection.GeneratedProtocolMessageType('GcsStatus', (_message.Message,), { + 'DESCRIPTOR' : _GCSSTATUS, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GcsStatus) + }) +_sym_db.RegisterMessage(GcsStatus) + +AddTaskEventDataRequest = _reflection.GeneratedProtocolMessageType('AddTaskEventDataRequest', (_message.Message,), { + 'DESCRIPTOR' : _ADDTASKEVENTDATAREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AddTaskEventDataRequest) + }) +_sym_db.RegisterMessage(AddTaskEventDataRequest) + +AddTaskEventDataReply = _reflection.GeneratedProtocolMessageType('AddTaskEventDataReply', (_message.Message,), { + 'DESCRIPTOR' : _ADDTASKEVENTDATAREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AddTaskEventDataReply) + }) +_sym_db.RegisterMessage(AddTaskEventDataReply) + +GetTaskEventsRequest = _reflection.GeneratedProtocolMessageType('GetTaskEventsRequest', (_message.Message,), { + + 'Filters' : _reflection.GeneratedProtocolMessageType('Filters', (_message.Message,), { + + 'JobIdFilter' : _reflection.GeneratedProtocolMessageType('JobIdFilter', (_message.Message,), { + 'DESCRIPTOR' : _GETTASKEVENTSREQUEST_FILTERS_JOBIDFILTER, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskEventsRequest.Filters.JobIdFilter) + }) + , + + 'TaskIdFilter' : _reflection.GeneratedProtocolMessageType('TaskIdFilter', (_message.Message,), { + 'DESCRIPTOR' : _GETTASKEVENTSREQUEST_FILTERS_TASKIDFILTER, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskEventsRequest.Filters.TaskIdFilter) + }) + , + + 'ActorIdFilter' : _reflection.GeneratedProtocolMessageType('ActorIdFilter', (_message.Message,), { + 'DESCRIPTOR' : _GETTASKEVENTSREQUEST_FILTERS_ACTORIDFILTER, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskEventsRequest.Filters.ActorIdFilter) + }) + , + + 'TaskNameFilter' : _reflection.GeneratedProtocolMessageType('TaskNameFilter', (_message.Message,), { + 'DESCRIPTOR' : _GETTASKEVENTSREQUEST_FILTERS_TASKNAMEFILTER, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskEventsRequest.Filters.TaskNameFilter) + }) + , + + 'StateFilter' : _reflection.GeneratedProtocolMessageType('StateFilter', (_message.Message,), { + 'DESCRIPTOR' : _GETTASKEVENTSREQUEST_FILTERS_STATEFILTER, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskEventsRequest.Filters.StateFilter) + }) + , + 'DESCRIPTOR' : _GETTASKEVENTSREQUEST_FILTERS, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskEventsRequest.Filters) + }) + , + 'DESCRIPTOR' : _GETTASKEVENTSREQUEST, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskEventsRequest) + }) +_sym_db.RegisterMessage(GetTaskEventsRequest) +_sym_db.RegisterMessage(GetTaskEventsRequest.Filters) +_sym_db.RegisterMessage(GetTaskEventsRequest.Filters.JobIdFilter) +_sym_db.RegisterMessage(GetTaskEventsRequest.Filters.TaskIdFilter) +_sym_db.RegisterMessage(GetTaskEventsRequest.Filters.ActorIdFilter) +_sym_db.RegisterMessage(GetTaskEventsRequest.Filters.TaskNameFilter) +_sym_db.RegisterMessage(GetTaskEventsRequest.Filters.StateFilter) + +GetTaskEventsReply = _reflection.GeneratedProtocolMessageType('GetTaskEventsReply', (_message.Message,), { + 'DESCRIPTOR' : _GETTASKEVENTSREPLY, + '__module__' : 'src.ray.protobuf.gcs_service_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskEventsReply) + }) +_sym_db.RegisterMessage(GetTaskEventsReply) + +_JOBINFOGCSSERVICE = DESCRIPTOR.services_by_name['JobInfoGcsService'] +_ACTORINFOGCSSERVICE = DESCRIPTOR.services_by_name['ActorInfoGcsService'] +_WORKERINFOGCSSERVICE = DESCRIPTOR.services_by_name['WorkerInfoGcsService'] +_PLACEMENTGROUPINFOGCSSERVICE = DESCRIPTOR.services_by_name['PlacementGroupInfoGcsService'] +_INTERNALKVGCSSERVICE = DESCRIPTOR.services_by_name['InternalKVGcsService'] +_RUNTIMEENVGCSSERVICE = DESCRIPTOR.services_by_name['RuntimeEnvGcsService'] +_INTERNALPUBSUBGCSSERVICE = DESCRIPTOR.services_by_name['InternalPubSubGcsService'] +_NODERESOURCEINFOGCSSERVICE = DESCRIPTOR.services_by_name['NodeResourceInfoGcsService'] +_NODEINFOGCSSERVICE = DESCRIPTOR.services_by_name['NodeInfoGcsService'] +_TASKINFOGCSSERVICE = DESCRIPTOR.services_by_name['TaskInfoGcsService'] +_RAYEVENTEXPORTGCSSERVICE = DESCRIPTOR.services_by_name['RayEventExportGcsService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _GCSSERVICEFAILURETYPE._serialized_start=12607 + _GCSSERVICEFAILURETYPE._serialized_end=12674 + _FILTERPREDICATE._serialized_start=12676 + _FILTERPREDICATE._serialized_end=12719 + _ADDJOBREQUEST._serialized_start=193 + _ADDJOBREQUEST._serialized_end=251 + _ADDJOBREPLY._serialized_start=253 + _ADDJOBREPLY._serialized_end=310 + _MARKJOBFINISHEDREQUEST._serialized_start=312 + _MARKJOBFINISHEDREQUEST._serialized_end=359 + _MARKJOBFINISHEDREPLY._serialized_start=361 + _MARKJOBFINISHEDREPLY._serialized_end=427 + _GETALLJOBINFOREQUEST._serialized_start=430 + _GETALLJOBINFOREQUEST._serialized_end=775 + _GETALLJOBINFOREPLY._serialized_start=777 + _GETALLJOBINFOREPLY._serialized_end=900 + _REPORTJOBERRORREQUEST._serialized_start=902 + _REPORTJOBERRORREQUEST._serialized_end=979 + _REPORTJOBERRORREPLY._serialized_start=981 + _REPORTJOBERRORREPLY._serialized_end=1046 + _GETNEXTJOBIDREQUEST._serialized_start=1048 + _GETNEXTJOBIDREQUEST._serialized_end=1069 + _GETNEXTJOBIDREPLY._serialized_start=1071 + _GETNEXTJOBIDREPLY._serialized_end=1157 + _GETACTORINFOREQUEST._serialized_start=1159 + _GETACTORINFOREQUEST._serialized_end=1227 + _GETACTORINFOREPLY._serialized_start=1230 + _GETACTORINFOREPLY._serialized_end=1360 + _GETNAMEDACTORINFOREQUEST._serialized_start=1362 + _GETNAMEDACTORINFOREQUEST._serialized_end=1445 + _GETNAMEDACTORINFOREPLY._serialized_start=1448 + _GETNAMEDACTORINFOREPLY._serialized_end=1631 + _LISTNAMEDACTORSREQUEST._serialized_start=1633 + _LISTNAMEDACTORSREQUEST._serialized_end=1733 + _LISTNAMEDACTORSREPLY._serialized_start=1736 + _LISTNAMEDACTORSREPLY._serialized_end=1871 + _GETALLACTORINFOREQUEST._serialized_start=1874 + _GETALLACTORINFOREQUEST._serialized_end=2226 + _GETALLACTORINFOREQUEST_FILTERS._serialized_start=2038 + _GETALLACTORINFOREQUEST_FILTERS._serialized_end=2204 + _GETALLACTORINFOREPLY._serialized_start=2229 + _GETALLACTORINFOREPLY._serialized_end=2419 + _KILLACTORVIAGCSREQUEST._serialized_start=2421 + _KILLACTORVIAGCSREQUEST._serialized_end=2534 + _KILLACTORVIAGCSREPLY._serialized_start=2536 + _KILLACTORVIAGCSREPLY._serialized_end=2602 + _REPORTACTOROUTOFSCOPEREQUEST._serialized_start=2605 + _REPORTACTOROUTOFSCOPEREQUEST._serialized_end=2753 + _REPORTACTOROUTOFSCOPEREPLY._serialized_start=2755 + _REPORTACTOROUTOFSCOPEREPLY._serialized_end=2827 + _GETCLUSTERIDREQUEST._serialized_start=2829 + _GETCLUSTERIDREQUEST._serialized_end=2850 + _GETCLUSTERIDREPLY._serialized_start=2852 + _GETCLUSTERIDREPLY._serialized_end=2946 + _REGISTERNODEREQUEST._serialized_start=2948 + _REGISTERNODEREQUEST._serialized_end=3020 + _REGISTERNODEREPLY._serialized_start=3022 + _REGISTERNODEREPLY._serialized_end=3085 + _UNREGISTERNODEREQUEST._serialized_start=3087 + _UNREGISTERNODEREQUEST._serialized_end=3199 + _UNREGISTERNODEREPLY._serialized_start=3201 + _UNREGISTERNODEREPLY._serialized_end=3266 + _GETALLNODEINFOREQUEST._serialized_start=3269 + _GETALLNODEINFOREQUEST._serialized_end=3639 + _GETALLNODEINFOREQUEST_NODESELECTOR._serialized_start=3481 + _GETALLNODEINFOREQUEST_NODESELECTOR._serialized_end=3612 + _GETALLNODEINFOREPLY._serialized_start=3642 + _GETALLNODEINFOREPLY._serialized_end=3824 + _CHECKALIVEREQUEST._serialized_start=3826 + _CHECKALIVEREQUEST._serialized_end=3872 + _CHECKALIVEREPLY._serialized_start=3875 + _CHECKALIVEREPLY._serialized_end=4004 + _GETINTERNALCONFIGREQUEST._serialized_start=4006 + _GETINTERNALCONFIGREQUEST._serialized_end=4032 + _GETINTERNALCONFIGREPLY._serialized_start=4034 + _GETINTERNALCONFIGREPLY._serialized_end=4126 + _DELETERESOURCESREPLY._serialized_start=4128 + _DELETERESOURCESREPLY._serialized_end=4194 + _GETALLAVAILABLERESOURCESREQUEST._serialized_start=4196 + _GETALLAVAILABLERESOURCESREQUEST._serialized_end=4229 + _GETALLAVAILABLERESOURCESREPLY._serialized_start=4232 + _GETALLAVAILABLERESOURCESREPLY._serialized_end=4375 + _GETALLTOTALRESOURCESREQUEST._serialized_start=4377 + _GETALLTOTALRESOURCESREQUEST._serialized_end=4406 + _GETALLTOTALRESOURCESREPLY._serialized_start=4409 + _GETALLTOTALRESOURCESREPLY._serialized_end=4544 + _REPORTWORKERFAILUREREQUEST._serialized_start=4546 + _REPORTWORKERFAILUREREQUEST._serialized_end=4639 + _REPORTWORKERFAILUREREPLY._serialized_start=4641 + _REPORTWORKERFAILUREREPLY._serialized_end=4711 + _GETWORKERINFOREQUEST._serialized_start=4713 + _GETWORKERINFOREQUEST._serialized_end=4764 + _GETWORKERINFOREPLY._serialized_start=4767 + _GETWORKERINFOREPLY._serialized_end=4901 + _GETALLWORKERINFOREQUEST._serialized_start=4904 + _GETALLWORKERINFOREQUEST._serialized_end=5188 + _GETALLWORKERINFOREQUEST_FILTERS._serialized_start=5032 + _GETALLWORKERINFOREQUEST_FILTERS._serialized_end=5166 + _GETALLWORKERINFOREPLY._serialized_start=5191 + _GETALLWORKERINFOREPLY._serialized_end=5385 + _ADDWORKERINFOREQUEST._serialized_start=5387 + _ADDWORKERINFOREQUEST._serialized_end=5468 + _ADDWORKERINFOREPLY._serialized_start=5470 + _ADDWORKERINFOREPLY._serialized_end=5534 + _UPDATEWORKERDEBUGGERPORTREQUEST._serialized_start=5536 + _UPDATEWORKERDEBUGGERPORTREQUEST._serialized_end=5635 + _UPDATEWORKERDEBUGGERPORTREPLY._serialized_start=5637 + _UPDATEWORKERDEBUGGERPORTREPLY._serialized_end=5712 + _UPDATEWORKERNUMPAUSEDTHREADSREQUEST._serialized_start=5714 + _UPDATEWORKERNUMPAUSEDTHREADSREQUEST._serialized_end=5837 + _UPDATEWORKERNUMPAUSEDTHREADSREPLY._serialized_start=5839 + _UPDATEWORKERNUMPAUSEDTHREADSREPLY._serialized_end=5918 + _CREATEACTORREQUEST._serialized_start=5920 + _CREATEACTORREQUEST._serialized_end=5988 + _CREATEACTORREPLY._serialized_start=5991 + _CREATEACTORREPLY._serialized_end=6256 + _REGISTERACTORREQUEST._serialized_start=6258 + _REGISTERACTORREQUEST._serialized_end=6328 + _REGISTERACTORREPLY._serialized_start=6330 + _REGISTERACTORREPLY._serialized_end=6394 + _RESTARTACTORFORLINEAGERECONSTRUCTIONREQUEST._serialized_start=6397 + _RESTARTACTORFORLINEAGERECONSTRUCTIONREQUEST._serialized_end=6560 + _RESTARTACTORFORLINEAGERECONSTRUCTIONREPLY._serialized_start=6562 + _RESTARTACTORFORLINEAGERECONSTRUCTIONREPLY._serialized_end=6649 + _CREATEPLACEMENTGROUPREQUEST._serialized_start=6651 + _CREATEPLACEMENTGROUPREQUEST._serialized_end=6759 + _CREATEPLACEMENTGROUPREPLY._serialized_start=6761 + _CREATEPLACEMENTGROUPREPLY._serialized_end=6832 + _REMOVEPLACEMENTGROUPREQUEST._serialized_start=6834 + _REMOVEPLACEMENTGROUPREQUEST._serialized_end=6909 + _REMOVEPLACEMENTGROUPREPLY._serialized_start=6911 + _REMOVEPLACEMENTGROUPREPLY._serialized_end=6982 + _GETPLACEMENTGROUPREQUEST._serialized_start=6984 + _GETPLACEMENTGROUPREQUEST._serialized_end=7056 + _GETPLACEMENTGROUPREPLY._serialized_start=7059 + _GETPLACEMENTGROUPREPLY._serialized_end=7222 + _GETALLPLACEMENTGROUPREQUEST._serialized_start=7224 + _GETALLPLACEMENTGROUPREQUEST._serialized_end=7290 + _GETALLPLACEMENTGROUPREPLY._serialized_start=7293 + _GETALLPLACEMENTGROUPREPLY._serialized_end=7481 + _WAITPLACEMENTGROUPUNTILREADYREQUEST._serialized_start=7483 + _WAITPLACEMENTGROUPUNTILREADYREQUEST._serialized_end=7566 + _WAITPLACEMENTGROUPUNTILREADYREPLY._serialized_start=7568 + _WAITPLACEMENTGROUPUNTILREADYREPLY._serialized_end=7647 + _GETNAMEDPLACEMENTGROUPREQUEST._serialized_start=7649 + _GETNAMEDPLACEMENTGROUPREQUEST._serialized_end=7737 + _GETNAMEDPLACEMENTGROUPREPLY._serialized_start=7740 + _GETNAMEDPLACEMENTGROUPREPLY._serialized_end=7908 + _DRAINNODEDATA._serialized_start=7910 + _DRAINNODEDATA._serialized_end=7950 + _DRAINNODEREQUEST._serialized_start=7952 + _DRAINNODEREQUEST._serialized_end=8034 + _DRAINNODESTATUS._serialized_start=8036 + _DRAINNODESTATUS._serialized_end=8078 + _DRAINNODEREPLY._serialized_start=8081 + _DRAINNODEREPLY._serialized_end=8211 + _INTERNALKVGETREQUEST._serialized_start=8213 + _INTERNALKVGETREQUEST._serialized_end=8283 + _INTERNALKVGETREPLY._serialized_start=8285 + _INTERNALKVGETREPLY._serialized_end=8371 + _INTERNALKVMULTIGETREQUEST._serialized_start=8373 + _INTERNALKVMULTIGETREQUEST._serialized_end=8450 + _MAPFIELDENTRY._serialized_start=8452 + _MAPFIELDENTRY._serialized_end=8507 + _INTERNALKVMULTIGETREPLY._serialized_start=8509 + _INTERNALKVMULTIGETREPLY._serialized_end=8628 + _INTERNALKVPUTREQUEST._serialized_start=8630 + _INTERNALKVPUTREQUEST._serialized_end=8752 + _INTERNALKVPUTREPLY._serialized_start=8754 + _INTERNALKVPUTREPLY._serialized_end=8840 + _INTERNALKVDELREQUEST._serialized_start=8842 + _INTERNALKVDELREQUEST._serialized_end=8948 + _INTERNALKVDELREPLY._serialized_start=8950 + _INTERNALKVDELREPLY._serialized_end=9047 + _INTERNALKVEXISTSREQUEST._serialized_start=9049 + _INTERNALKVEXISTSREQUEST._serialized_end=9122 + _INTERNALKVEXISTSREPLY._serialized_start=9124 + _INTERNALKVEXISTSREPLY._serialized_end=9215 + _INTERNALKVKEYSREQUEST._serialized_start=9217 + _INTERNALKVKEYSREQUEST._serialized_end=9294 + _INTERNALKVKEYSREPLY._serialized_start=9296 + _INTERNALKVKEYSREPLY._serialized_end=9387 + _PINRUNTIMEENVURIREQUEST._serialized_start=9389 + _PINRUNTIMEENVURIREQUEST._serialized_end=9467 + _PINRUNTIMEENVURIREPLY._serialized_start=9469 + _PINRUNTIMEENVURIREPLY._serialized_end=9536 + _GCSPUBLISHREQUEST._serialized_start=9538 + _GCSPUBLISHREQUEST._serialized_end=9613 + _GCSPUBLISHREPLY._serialized_start=9615 + _GCSPUBLISHREPLY._serialized_end=9676 + _GCSSUBSCRIBERPOLLREQUEST._serialized_start=9679 + _GCSSUBSCRIBERPOLLREQUEST._serialized_end=9836 + _GCSSUBSCRIBERPOLLREPLY._serialized_start=9839 + _GCSSUBSCRIBERPOLLREPLY._serialized_end=9998 + _GCSSUBSCRIBERCOMMANDBATCHREQUEST._serialized_start=10001 + _GCSSUBSCRIBERCOMMANDBATCHREQUEST._serialized_end=10147 + _GCSSUBSCRIBERCOMMANDBATCHREPLY._serialized_start=10149 + _GCSSUBSCRIBERCOMMANDBATCHREPLY._serialized_end=10225 + _GCSUNREGISTERSUBSCRIBERREQUEST._serialized_start=10227 + _GCSUNREGISTERSUBSCRIBERREQUEST._serialized_end=10296 + _GCSUNREGISTERSUBSCRIBERREPLY._serialized_start=10298 + _GCSUNREGISTERSUBSCRIBERREPLY._serialized_end=10328 + _GETALLRESOURCEUSAGEREQUEST._serialized_start=10330 + _GETALLRESOURCEUSAGEREQUEST._serialized_end=10358 + _GETALLRESOURCEUSAGEREPLY._serialized_start=10361 + _GETALLRESOURCEUSAGEREPLY._serialized_end=10594 + _GETDRAININGNODESREQUEST._serialized_start=10596 + _GETDRAININGNODESREQUEST._serialized_end=10621 + _DRAININGNODE._serialized_start=10623 + _DRAININGNODE._serialized_end=10731 + _GETDRAININGNODESREPLY._serialized_start=10734 + _GETDRAININGNODESREPLY._serialized_end=10863 + _GCSSTATUS._serialized_start=10865 + _GCSSTATUS._serialized_end=10922 + _ADDTASKEVENTDATAREQUEST._serialized_start=10924 + _ADDTASKEVENTDATAREQUEST._serialized_end=10993 + _ADDTASKEVENTDATAREPLY._serialized_start=10995 + _ADDTASKEVENTDATAREPLY._serialized_end=11062 + _GETTASKEVENTSREQUEST._serialized_start=11065 + _GETTASKEVENTSREQUEST._serialized_end=12215 + _GETTASKEVENTSREQUEST_FILTERS._serialized_start=11187 + _GETTASKEVENTSREQUEST_FILTERS._serialized_end=12193 + _GETTASKEVENTSREQUEST_FILTERS_JOBIDFILTER._serialized_start=11689 + _GETTASKEVENTSREQUEST_FILTERS_JOBIDFILTER._serialized_end=11781 + _GETTASKEVENTSREQUEST_FILTERS_TASKIDFILTER._serialized_start=11783 + _GETTASKEVENTSREQUEST_FILTERS_TASKIDFILTER._serialized_end=11878 + _GETTASKEVENTSREQUEST_FILTERS_ACTORIDFILTER._serialized_start=11880 + _GETTASKEVENTSREQUEST_FILTERS_ACTORIDFILTER._serialized_end=11978 + _GETTASKEVENTSREQUEST_FILTERS_TASKNAMEFILTER._serialized_start=11980 + _GETTASKEVENTSREQUEST_FILTERS_TASKNAMEFILTER._serialized_end=12081 + _GETTASKEVENTSREQUEST_FILTERS_STATEFILTER._serialized_start=12083 + _GETTASKEVENTSREQUEST_FILTERS_STATEFILTER._serialized_end=12174 + _GETTASKEVENTSREPLY._serialized_start=12218 + _GETTASKEVENTSREPLY._serialized_end=12605 + _JOBINFOGCSSERVICE._serialized_start=12722 + _JOBINFOGCSSERVICE._serialized_end=13111 + _ACTORINFOGCSSERVICE._serialized_start=13114 + _ACTORINFOGCSSERVICE._serialized_end=13943 + _WORKERINFOGCSSERVICE._serialized_start=13946 + _WORKERINFOGCSSERVICE._serialized_end=14535 + _PLACEMENTGROUPINFOGCSSERVICE._serialized_start=14538 + _PLACEMENTGROUPINFOGCSSERVICE._serialized_end=15177 + _INTERNALKVGCSSERVICE._serialized_start=15180 + _INTERNALKVGCSSERVICE._serialized_end=15780 + _RUNTIMEENVGCSSERVICE._serialized_start=15782 + _RUNTIMEENVGCSSERVICE._serialized_end=15890 + _INTERNALPUBSUBGCSSERVICE._serialized_start=15893 + _INTERNALPUBSUBGCSSERVICE._serialized_end=16296 + _NODERESOURCEINFOGCSSERVICE._serialized_start=16299 + _NODERESOURCEINFOGCSSERVICE._serialized_end=16716 + _NODEINFOGCSSERVICE._serialized_start=16719 + _NODEINFOGCSSERVICE._serialized_end=17180 + _TASKINFOGCSSERVICE._serialized_start=17183 + _TASKINFOGCSSERVICE._serialized_end=17366 + _RAYEVENTEXPORTGCSSERVICE._serialized_start=17368 + _RAYEVENTEXPORTGCSSERVICE._serialized_end=17473 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_service_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_service_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..8afaf8bfe2de0bce3f57a8ef9ca43c0b99e2f142 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/gcs_service_pb2_grpc.py @@ -0,0 +1,1997 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import events_event_aggregator_service_pb2 as src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2 +from . import gcs_service_pb2 as src_dot_ray_dot_protobuf_dot_gcs__service__pb2 + + +class JobInfoGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.AddJob = channel.unary_unary( + '/ray.rpc.JobInfoGcsService/AddJob', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddJobRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddJobReply.FromString, + ) + self.MarkJobFinished = channel.unary_unary( + '/ray.rpc.JobInfoGcsService/MarkJobFinished', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.MarkJobFinishedRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.MarkJobFinishedReply.FromString, + ) + self.GetAllJobInfo = channel.unary_unary( + '/ray.rpc.JobInfoGcsService/GetAllJobInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllJobInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllJobInfoReply.FromString, + ) + self.ReportJobError = channel.unary_unary( + '/ray.rpc.JobInfoGcsService/ReportJobError', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportJobErrorRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportJobErrorReply.FromString, + ) + self.GetNextJobID = channel.unary_unary( + '/ray.rpc.JobInfoGcsService/GetNextJobID', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNextJobIDRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNextJobIDReply.FromString, + ) + + +class JobInfoGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def AddJob(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def MarkJobFinished(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllJobInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReportJobError(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetNextJobID(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_JobInfoGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'AddJob': grpc.unary_unary_rpc_method_handler( + servicer.AddJob, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddJobRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddJobReply.SerializeToString, + ), + 'MarkJobFinished': grpc.unary_unary_rpc_method_handler( + servicer.MarkJobFinished, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.MarkJobFinishedRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.MarkJobFinishedReply.SerializeToString, + ), + 'GetAllJobInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetAllJobInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllJobInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllJobInfoReply.SerializeToString, + ), + 'ReportJobError': grpc.unary_unary_rpc_method_handler( + servicer.ReportJobError, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportJobErrorRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportJobErrorReply.SerializeToString, + ), + 'GetNextJobID': grpc.unary_unary_rpc_method_handler( + servicer.GetNextJobID, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNextJobIDRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNextJobIDReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.JobInfoGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class JobInfoGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def AddJob(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.JobInfoGcsService/AddJob', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddJobRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddJobReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def MarkJobFinished(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.JobInfoGcsService/MarkJobFinished', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.MarkJobFinishedRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.MarkJobFinishedReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllJobInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.JobInfoGcsService/GetAllJobInfo', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllJobInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllJobInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReportJobError(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.JobInfoGcsService/ReportJobError', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportJobErrorRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportJobErrorReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetNextJobID(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.JobInfoGcsService/GetNextJobID', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNextJobIDRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNextJobIDReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class ActorInfoGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.RegisterActor = channel.unary_unary( + '/ray.rpc.ActorInfoGcsService/RegisterActor', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterActorRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterActorReply.FromString, + ) + self.RestartActorForLineageReconstruction = channel.unary_unary( + '/ray.rpc.ActorInfoGcsService/RestartActorForLineageReconstruction', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RestartActorForLineageReconstructionRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RestartActorForLineageReconstructionReply.FromString, + ) + self.CreateActor = channel.unary_unary( + '/ray.rpc.ActorInfoGcsService/CreateActor', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreateActorRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreateActorReply.FromString, + ) + self.GetActorInfo = channel.unary_unary( + '/ray.rpc.ActorInfoGcsService/GetActorInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetActorInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetActorInfoReply.FromString, + ) + self.GetNamedActorInfo = channel.unary_unary( + '/ray.rpc.ActorInfoGcsService/GetNamedActorInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedActorInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedActorInfoReply.FromString, + ) + self.ListNamedActors = channel.unary_unary( + '/ray.rpc.ActorInfoGcsService/ListNamedActors', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ListNamedActorsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ListNamedActorsReply.FromString, + ) + self.GetAllActorInfo = channel.unary_unary( + '/ray.rpc.ActorInfoGcsService/GetAllActorInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllActorInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllActorInfoReply.FromString, + ) + self.KillActorViaGcs = channel.unary_unary( + '/ray.rpc.ActorInfoGcsService/KillActorViaGcs', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.KillActorViaGcsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.KillActorViaGcsReply.FromString, + ) + self.ReportActorOutOfScope = channel.unary_unary( + '/ray.rpc.ActorInfoGcsService/ReportActorOutOfScope', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportActorOutOfScopeRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportActorOutOfScopeReply.FromString, + ) + + +class ActorInfoGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def RegisterActor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RestartActorForLineageReconstruction(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateActor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetActorInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetNamedActorInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListNamedActors(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllActorInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def KillActorViaGcs(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReportActorOutOfScope(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ActorInfoGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'RegisterActor': grpc.unary_unary_rpc_method_handler( + servicer.RegisterActor, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterActorRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterActorReply.SerializeToString, + ), + 'RestartActorForLineageReconstruction': grpc.unary_unary_rpc_method_handler( + servicer.RestartActorForLineageReconstruction, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RestartActorForLineageReconstructionRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RestartActorForLineageReconstructionReply.SerializeToString, + ), + 'CreateActor': grpc.unary_unary_rpc_method_handler( + servicer.CreateActor, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreateActorRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreateActorReply.SerializeToString, + ), + 'GetActorInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetActorInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetActorInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetActorInfoReply.SerializeToString, + ), + 'GetNamedActorInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetNamedActorInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedActorInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedActorInfoReply.SerializeToString, + ), + 'ListNamedActors': grpc.unary_unary_rpc_method_handler( + servicer.ListNamedActors, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ListNamedActorsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ListNamedActorsReply.SerializeToString, + ), + 'GetAllActorInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetAllActorInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllActorInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllActorInfoReply.SerializeToString, + ), + 'KillActorViaGcs': grpc.unary_unary_rpc_method_handler( + servicer.KillActorViaGcs, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.KillActorViaGcsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.KillActorViaGcsReply.SerializeToString, + ), + 'ReportActorOutOfScope': grpc.unary_unary_rpc_method_handler( + servicer.ReportActorOutOfScope, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportActorOutOfScopeRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportActorOutOfScopeReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.ActorInfoGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ActorInfoGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def RegisterActor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ActorInfoGcsService/RegisterActor', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterActorRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterActorReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RestartActorForLineageReconstruction(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ActorInfoGcsService/RestartActorForLineageReconstruction', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RestartActorForLineageReconstructionRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RestartActorForLineageReconstructionReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateActor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ActorInfoGcsService/CreateActor', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreateActorRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreateActorReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetActorInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ActorInfoGcsService/GetActorInfo', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetActorInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetActorInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetNamedActorInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ActorInfoGcsService/GetNamedActorInfo', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedActorInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedActorInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListNamedActors(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ActorInfoGcsService/ListNamedActors', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ListNamedActorsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ListNamedActorsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllActorInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ActorInfoGcsService/GetAllActorInfo', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllActorInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllActorInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def KillActorViaGcs(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ActorInfoGcsService/KillActorViaGcs', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.KillActorViaGcsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.KillActorViaGcsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReportActorOutOfScope(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ActorInfoGcsService/ReportActorOutOfScope', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportActorOutOfScopeRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportActorOutOfScopeReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class WorkerInfoGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ReportWorkerFailure = channel.unary_unary( + '/ray.rpc.WorkerInfoGcsService/ReportWorkerFailure', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportWorkerFailureRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportWorkerFailureReply.FromString, + ) + self.GetWorkerInfo = channel.unary_unary( + '/ray.rpc.WorkerInfoGcsService/GetWorkerInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetWorkerInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetWorkerInfoReply.FromString, + ) + self.GetAllWorkerInfo = channel.unary_unary( + '/ray.rpc.WorkerInfoGcsService/GetAllWorkerInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllWorkerInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllWorkerInfoReply.FromString, + ) + self.AddWorkerInfo = channel.unary_unary( + '/ray.rpc.WorkerInfoGcsService/AddWorkerInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddWorkerInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddWorkerInfoReply.FromString, + ) + self.UpdateWorkerDebuggerPort = channel.unary_unary( + '/ray.rpc.WorkerInfoGcsService/UpdateWorkerDebuggerPort', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerDebuggerPortRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerDebuggerPortReply.FromString, + ) + self.UpdateWorkerNumPausedThreads = channel.unary_unary( + '/ray.rpc.WorkerInfoGcsService/UpdateWorkerNumPausedThreads', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerNumPausedThreadsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerNumPausedThreadsReply.FromString, + ) + + +class WorkerInfoGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ReportWorkerFailure(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetWorkerInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllWorkerInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AddWorkerInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateWorkerDebuggerPort(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateWorkerNumPausedThreads(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_WorkerInfoGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ReportWorkerFailure': grpc.unary_unary_rpc_method_handler( + servicer.ReportWorkerFailure, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportWorkerFailureRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportWorkerFailureReply.SerializeToString, + ), + 'GetWorkerInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetWorkerInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetWorkerInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetWorkerInfoReply.SerializeToString, + ), + 'GetAllWorkerInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetAllWorkerInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllWorkerInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllWorkerInfoReply.SerializeToString, + ), + 'AddWorkerInfo': grpc.unary_unary_rpc_method_handler( + servicer.AddWorkerInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddWorkerInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddWorkerInfoReply.SerializeToString, + ), + 'UpdateWorkerDebuggerPort': grpc.unary_unary_rpc_method_handler( + servicer.UpdateWorkerDebuggerPort, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerDebuggerPortRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerDebuggerPortReply.SerializeToString, + ), + 'UpdateWorkerNumPausedThreads': grpc.unary_unary_rpc_method_handler( + servicer.UpdateWorkerNumPausedThreads, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerNumPausedThreadsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerNumPausedThreadsReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.WorkerInfoGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class WorkerInfoGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ReportWorkerFailure(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.WorkerInfoGcsService/ReportWorkerFailure', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportWorkerFailureRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.ReportWorkerFailureReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetWorkerInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.WorkerInfoGcsService/GetWorkerInfo', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetWorkerInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetWorkerInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllWorkerInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.WorkerInfoGcsService/GetAllWorkerInfo', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllWorkerInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllWorkerInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AddWorkerInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.WorkerInfoGcsService/AddWorkerInfo', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddWorkerInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddWorkerInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateWorkerDebuggerPort(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.WorkerInfoGcsService/UpdateWorkerDebuggerPort', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerDebuggerPortRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerDebuggerPortReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateWorkerNumPausedThreads(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.WorkerInfoGcsService/UpdateWorkerNumPausedThreads', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerNumPausedThreadsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UpdateWorkerNumPausedThreadsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class PlacementGroupInfoGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreatePlacementGroup = channel.unary_unary( + '/ray.rpc.PlacementGroupInfoGcsService/CreatePlacementGroup', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreatePlacementGroupRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreatePlacementGroupReply.FromString, + ) + self.RemovePlacementGroup = channel.unary_unary( + '/ray.rpc.PlacementGroupInfoGcsService/RemovePlacementGroup', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RemovePlacementGroupRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RemovePlacementGroupReply.FromString, + ) + self.GetPlacementGroup = channel.unary_unary( + '/ray.rpc.PlacementGroupInfoGcsService/GetPlacementGroup', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetPlacementGroupRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetPlacementGroupReply.FromString, + ) + self.GetNamedPlacementGroup = channel.unary_unary( + '/ray.rpc.PlacementGroupInfoGcsService/GetNamedPlacementGroup', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedPlacementGroupRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedPlacementGroupReply.FromString, + ) + self.GetAllPlacementGroup = channel.unary_unary( + '/ray.rpc.PlacementGroupInfoGcsService/GetAllPlacementGroup', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllPlacementGroupRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllPlacementGroupReply.FromString, + ) + self.WaitPlacementGroupUntilReady = channel.unary_unary( + '/ray.rpc.PlacementGroupInfoGcsService/WaitPlacementGroupUntilReady', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.WaitPlacementGroupUntilReadyRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.WaitPlacementGroupUntilReadyReply.FromString, + ) + + +class PlacementGroupInfoGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreatePlacementGroup(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemovePlacementGroup(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPlacementGroup(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetNamedPlacementGroup(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllPlacementGroup(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def WaitPlacementGroupUntilReady(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_PlacementGroupInfoGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreatePlacementGroup': grpc.unary_unary_rpc_method_handler( + servicer.CreatePlacementGroup, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreatePlacementGroupRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreatePlacementGroupReply.SerializeToString, + ), + 'RemovePlacementGroup': grpc.unary_unary_rpc_method_handler( + servicer.RemovePlacementGroup, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RemovePlacementGroupRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RemovePlacementGroupReply.SerializeToString, + ), + 'GetPlacementGroup': grpc.unary_unary_rpc_method_handler( + servicer.GetPlacementGroup, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetPlacementGroupRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetPlacementGroupReply.SerializeToString, + ), + 'GetNamedPlacementGroup': grpc.unary_unary_rpc_method_handler( + servicer.GetNamedPlacementGroup, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedPlacementGroupRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedPlacementGroupReply.SerializeToString, + ), + 'GetAllPlacementGroup': grpc.unary_unary_rpc_method_handler( + servicer.GetAllPlacementGroup, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllPlacementGroupRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllPlacementGroupReply.SerializeToString, + ), + 'WaitPlacementGroupUntilReady': grpc.unary_unary_rpc_method_handler( + servicer.WaitPlacementGroupUntilReady, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.WaitPlacementGroupUntilReadyRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.WaitPlacementGroupUntilReadyReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.PlacementGroupInfoGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class PlacementGroupInfoGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreatePlacementGroup(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.PlacementGroupInfoGcsService/CreatePlacementGroup', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreatePlacementGroupRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CreatePlacementGroupReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemovePlacementGroup(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.PlacementGroupInfoGcsService/RemovePlacementGroup', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RemovePlacementGroupRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RemovePlacementGroupReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetPlacementGroup(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.PlacementGroupInfoGcsService/GetPlacementGroup', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetPlacementGroupRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetPlacementGroupReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetNamedPlacementGroup(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.PlacementGroupInfoGcsService/GetNamedPlacementGroup', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedPlacementGroupRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetNamedPlacementGroupReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllPlacementGroup(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.PlacementGroupInfoGcsService/GetAllPlacementGroup', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllPlacementGroupRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllPlacementGroupReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def WaitPlacementGroupUntilReady(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.PlacementGroupInfoGcsService/WaitPlacementGroupUntilReady', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.WaitPlacementGroupUntilReadyRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.WaitPlacementGroupUntilReadyReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class InternalKVGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.InternalKVGet = channel.unary_unary( + '/ray.rpc.InternalKVGcsService/InternalKVGet', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVGetRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVGetReply.FromString, + ) + self.InternalKVMultiGet = channel.unary_unary( + '/ray.rpc.InternalKVGcsService/InternalKVMultiGet', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVMultiGetRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVMultiGetReply.FromString, + ) + self.InternalKVPut = channel.unary_unary( + '/ray.rpc.InternalKVGcsService/InternalKVPut', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVPutRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVPutReply.FromString, + ) + self.InternalKVDel = channel.unary_unary( + '/ray.rpc.InternalKVGcsService/InternalKVDel', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVDelRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVDelReply.FromString, + ) + self.InternalKVExists = channel.unary_unary( + '/ray.rpc.InternalKVGcsService/InternalKVExists', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVExistsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVExistsReply.FromString, + ) + self.InternalKVKeys = channel.unary_unary( + '/ray.rpc.InternalKVGcsService/InternalKVKeys', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVKeysRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVKeysReply.FromString, + ) + self.GetInternalConfig = channel.unary_unary( + '/ray.rpc.InternalKVGcsService/GetInternalConfig', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetInternalConfigRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetInternalConfigReply.FromString, + ) + + +class InternalKVGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def InternalKVGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def InternalKVMultiGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def InternalKVPut(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def InternalKVDel(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def InternalKVExists(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def InternalKVKeys(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetInternalConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_InternalKVGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'InternalKVGet': grpc.unary_unary_rpc_method_handler( + servicer.InternalKVGet, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVGetRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVGetReply.SerializeToString, + ), + 'InternalKVMultiGet': grpc.unary_unary_rpc_method_handler( + servicer.InternalKVMultiGet, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVMultiGetRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVMultiGetReply.SerializeToString, + ), + 'InternalKVPut': grpc.unary_unary_rpc_method_handler( + servicer.InternalKVPut, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVPutRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVPutReply.SerializeToString, + ), + 'InternalKVDel': grpc.unary_unary_rpc_method_handler( + servicer.InternalKVDel, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVDelRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVDelReply.SerializeToString, + ), + 'InternalKVExists': grpc.unary_unary_rpc_method_handler( + servicer.InternalKVExists, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVExistsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVExistsReply.SerializeToString, + ), + 'InternalKVKeys': grpc.unary_unary_rpc_method_handler( + servicer.InternalKVKeys, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVKeysRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVKeysReply.SerializeToString, + ), + 'GetInternalConfig': grpc.unary_unary_rpc_method_handler( + servicer.GetInternalConfig, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetInternalConfigRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetInternalConfigReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.InternalKVGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class InternalKVGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def InternalKVGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalKVGcsService/InternalKVGet', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVGetRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVGetReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def InternalKVMultiGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalKVGcsService/InternalKVMultiGet', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVMultiGetRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVMultiGetReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def InternalKVPut(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalKVGcsService/InternalKVPut', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVPutRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVPutReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def InternalKVDel(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalKVGcsService/InternalKVDel', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVDelRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVDelReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def InternalKVExists(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalKVGcsService/InternalKVExists', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVExistsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVExistsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def InternalKVKeys(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalKVGcsService/InternalKVKeys', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVKeysRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.InternalKVKeysReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetInternalConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalKVGcsService/GetInternalConfig', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetInternalConfigRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetInternalConfigReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class RuntimeEnvGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.PinRuntimeEnvURI = channel.unary_unary( + '/ray.rpc.RuntimeEnvGcsService/PinRuntimeEnvURI', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.PinRuntimeEnvURIRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.PinRuntimeEnvURIReply.FromString, + ) + + +class RuntimeEnvGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def PinRuntimeEnvURI(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_RuntimeEnvGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'PinRuntimeEnvURI': grpc.unary_unary_rpc_method_handler( + servicer.PinRuntimeEnvURI, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.PinRuntimeEnvURIRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.PinRuntimeEnvURIReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.RuntimeEnvGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class RuntimeEnvGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def PinRuntimeEnvURI(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RuntimeEnvGcsService/PinRuntimeEnvURI', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.PinRuntimeEnvURIRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.PinRuntimeEnvURIReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class InternalPubSubGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GcsPublish = channel.unary_unary( + '/ray.rpc.InternalPubSubGcsService/GcsPublish', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsPublishRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsPublishReply.FromString, + ) + self.GcsSubscriberPoll = channel.unary_unary( + '/ray.rpc.InternalPubSubGcsService/GcsSubscriberPoll', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberPollRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberPollReply.FromString, + ) + self.GcsSubscriberCommandBatch = channel.unary_unary( + '/ray.rpc.InternalPubSubGcsService/GcsSubscriberCommandBatch', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberCommandBatchRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberCommandBatchReply.FromString, + ) + self.GcsUnregisterSubscriber = channel.unary_unary( + '/ray.rpc.InternalPubSubGcsService/GcsUnregisterSubscriber', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsUnregisterSubscriberRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsUnregisterSubscriberReply.FromString, + ) + + +class InternalPubSubGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GcsPublish(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GcsSubscriberPoll(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GcsSubscriberCommandBatch(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GcsUnregisterSubscriber(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_InternalPubSubGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GcsPublish': grpc.unary_unary_rpc_method_handler( + servicer.GcsPublish, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsPublishRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsPublishReply.SerializeToString, + ), + 'GcsSubscriberPoll': grpc.unary_unary_rpc_method_handler( + servicer.GcsSubscriberPoll, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberPollRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberPollReply.SerializeToString, + ), + 'GcsSubscriberCommandBatch': grpc.unary_unary_rpc_method_handler( + servicer.GcsSubscriberCommandBatch, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberCommandBatchRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberCommandBatchReply.SerializeToString, + ), + 'GcsUnregisterSubscriber': grpc.unary_unary_rpc_method_handler( + servicer.GcsUnregisterSubscriber, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsUnregisterSubscriberRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsUnregisterSubscriberReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.InternalPubSubGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class InternalPubSubGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GcsPublish(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalPubSubGcsService/GcsPublish', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsPublishRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsPublishReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GcsSubscriberPoll(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalPubSubGcsService/GcsSubscriberPoll', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberPollRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberPollReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GcsSubscriberCommandBatch(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalPubSubGcsService/GcsSubscriberCommandBatch', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberCommandBatchRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsSubscriberCommandBatchReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GcsUnregisterSubscriber(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.InternalPubSubGcsService/GcsUnregisterSubscriber', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsUnregisterSubscriberRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GcsUnregisterSubscriberReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class NodeResourceInfoGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetAllAvailableResources = channel.unary_unary( + '/ray.rpc.NodeResourceInfoGcsService/GetAllAvailableResources', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllAvailableResourcesRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllAvailableResourcesReply.FromString, + ) + self.GetAllTotalResources = channel.unary_unary( + '/ray.rpc.NodeResourceInfoGcsService/GetAllTotalResources', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllTotalResourcesRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllTotalResourcesReply.FromString, + ) + self.GetAllResourceUsage = channel.unary_unary( + '/ray.rpc.NodeResourceInfoGcsService/GetAllResourceUsage', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllResourceUsageRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllResourceUsageReply.FromString, + ) + self.GetDrainingNodes = channel.unary_unary( + '/ray.rpc.NodeResourceInfoGcsService/GetDrainingNodes', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetDrainingNodesRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetDrainingNodesReply.FromString, + ) + + +class NodeResourceInfoGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetAllAvailableResources(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllTotalResources(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllResourceUsage(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDrainingNodes(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_NodeResourceInfoGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetAllAvailableResources': grpc.unary_unary_rpc_method_handler( + servicer.GetAllAvailableResources, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllAvailableResourcesRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllAvailableResourcesReply.SerializeToString, + ), + 'GetAllTotalResources': grpc.unary_unary_rpc_method_handler( + servicer.GetAllTotalResources, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllTotalResourcesRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllTotalResourcesReply.SerializeToString, + ), + 'GetAllResourceUsage': grpc.unary_unary_rpc_method_handler( + servicer.GetAllResourceUsage, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllResourceUsageRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllResourceUsageReply.SerializeToString, + ), + 'GetDrainingNodes': grpc.unary_unary_rpc_method_handler( + servicer.GetDrainingNodes, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetDrainingNodesRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetDrainingNodesReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.NodeResourceInfoGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class NodeResourceInfoGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetAllAvailableResources(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeResourceInfoGcsService/GetAllAvailableResources', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllAvailableResourcesRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllAvailableResourcesReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllTotalResources(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeResourceInfoGcsService/GetAllTotalResources', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllTotalResourcesRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllTotalResourcesReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllResourceUsage(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeResourceInfoGcsService/GetAllResourceUsage', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllResourceUsageRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllResourceUsageReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDrainingNodes(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeResourceInfoGcsService/GetDrainingNodes', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetDrainingNodesRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetDrainingNodesReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class NodeInfoGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetClusterId = channel.unary_unary( + '/ray.rpc.NodeInfoGcsService/GetClusterId', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetClusterIdRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetClusterIdReply.FromString, + ) + self.RegisterNode = channel.unary_unary( + '/ray.rpc.NodeInfoGcsService/RegisterNode', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterNodeRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterNodeReply.FromString, + ) + self.UnregisterNode = channel.unary_unary( + '/ray.rpc.NodeInfoGcsService/UnregisterNode', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UnregisterNodeRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UnregisterNodeReply.FromString, + ) + self.DrainNode = channel.unary_unary( + '/ray.rpc.NodeInfoGcsService/DrainNode', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.DrainNodeRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.DrainNodeReply.FromString, + ) + self.GetAllNodeInfo = channel.unary_unary( + '/ray.rpc.NodeInfoGcsService/GetAllNodeInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllNodeInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllNodeInfoReply.FromString, + ) + self.CheckAlive = channel.unary_unary( + '/ray.rpc.NodeInfoGcsService/CheckAlive', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CheckAliveRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CheckAliveReply.FromString, + ) + + +class NodeInfoGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetClusterId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RegisterNode(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UnregisterNode(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DrainNode(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllNodeInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CheckAlive(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_NodeInfoGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetClusterId': grpc.unary_unary_rpc_method_handler( + servicer.GetClusterId, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetClusterIdRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetClusterIdReply.SerializeToString, + ), + 'RegisterNode': grpc.unary_unary_rpc_method_handler( + servicer.RegisterNode, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterNodeRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterNodeReply.SerializeToString, + ), + 'UnregisterNode': grpc.unary_unary_rpc_method_handler( + servicer.UnregisterNode, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UnregisterNodeRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UnregisterNodeReply.SerializeToString, + ), + 'DrainNode': grpc.unary_unary_rpc_method_handler( + servicer.DrainNode, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.DrainNodeRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.DrainNodeReply.SerializeToString, + ), + 'GetAllNodeInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetAllNodeInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllNodeInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllNodeInfoReply.SerializeToString, + ), + 'CheckAlive': grpc.unary_unary_rpc_method_handler( + servicer.CheckAlive, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CheckAliveRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CheckAliveReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.NodeInfoGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class NodeInfoGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetClusterId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeInfoGcsService/GetClusterId', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetClusterIdRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetClusterIdReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RegisterNode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeInfoGcsService/RegisterNode', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterNodeRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.RegisterNodeReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UnregisterNode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeInfoGcsService/UnregisterNode', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UnregisterNodeRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.UnregisterNodeReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DrainNode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeInfoGcsService/DrainNode', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.DrainNodeRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.DrainNodeReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllNodeInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeInfoGcsService/GetAllNodeInfo', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllNodeInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetAllNodeInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CheckAlive(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeInfoGcsService/CheckAlive', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CheckAliveRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.CheckAliveReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class TaskInfoGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.AddTaskEventData = channel.unary_unary( + '/ray.rpc.TaskInfoGcsService/AddTaskEventData', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddTaskEventDataRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddTaskEventDataReply.FromString, + ) + self.GetTaskEvents = channel.unary_unary( + '/ray.rpc.TaskInfoGcsService/GetTaskEvents', + request_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetTaskEventsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetTaskEventsReply.FromString, + ) + + +class TaskInfoGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def AddTaskEventData(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTaskEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TaskInfoGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'AddTaskEventData': grpc.unary_unary_rpc_method_handler( + servicer.AddTaskEventData, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddTaskEventDataRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddTaskEventDataReply.SerializeToString, + ), + 'GetTaskEvents': grpc.unary_unary_rpc_method_handler( + servicer.GetTaskEvents, + request_deserializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetTaskEventsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetTaskEventsReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.TaskInfoGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class TaskInfoGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def AddTaskEventData(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.TaskInfoGcsService/AddTaskEventData', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddTaskEventDataRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.AddTaskEventDataReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetTaskEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.TaskInfoGcsService/GetTaskEvents', + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetTaskEventsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_gcs__service__pb2.GetTaskEventsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class RayEventExportGcsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.AddEvents = channel.unary_unary( + '/ray.rpc.RayEventExportGcsService/AddEvents', + request_serializer=src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsReply.FromString, + ) + + +class RayEventExportGcsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def AddEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_RayEventExportGcsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'AddEvents': grpc.unary_unary_rpc_method_handler( + servicer.AddEvents, + request_deserializer=src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.RayEventExportGcsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class RayEventExportGcsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def AddEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayEventExportGcsService/AddEvents', + src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_events__event__aggregator__service__pb2.AddEventsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/instance_manager_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/instance_manager_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..52c0e21bc1af8020e80dd334303cbbc89910ca6b --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/instance_manager_pb2.py @@ -0,0 +1,174 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/instance_manager.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'src/ray/protobuf/instance_manager.proto\x12\x15ray.rpc.autoscaler.im\"Y\n\x06Status\x12\x35\n\x04\x63ode\x18\x01 \x01(\x0e\x32!.ray.rpc.autoscaler.im.StatusCodeR\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\"\xd1\t\n\x08Instance\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceId\x12/\n\x11\x63loud_instance_id\x18\x02 \x01(\tH\x00R\x0f\x63loudInstanceId\x88\x01\x01\x12\x1c\n\x07node_id\x18\x03 \x01(\tH\x01R\x06nodeId\x88\x01\x01\x12\x46\n\x06status\x18\x04 \x01(\x0e\x32..ray.rpc.autoscaler.im.Instance.InstanceStatusR\x06status\x12#\n\rinstance_type\x18\x05 \x01(\tR\x0cinstanceType\x12\\\n\x0ftotal_resources\x18\x06 \x03(\x0b\x32\x33.ray.rpc.autoscaler.im.Instance.TotalResourcesEntryR\x0etotalResources\x12\x1f\n\x0binternal_ip\x18\x07 \x01(\tR\ninternalIp\x12\x1f\n\x0b\x65xternal_ip\x18\x08 \x01(\tR\nexternalIp\x12\x18\n\x07version\x18\t \x01(\x03R\x07version\x12T\n\x0estatus_history\x18\n \x03(\x0b\x32-.ray.rpc.autoscaler.im.Instance.StatusHistoryR\rstatusHistory\x12*\n\x11launch_request_id\x18\x0b \x01(\tR\x0flaunchRequestId\x12!\n\x0c\x65xit_details\x18\x0c \x01(\tR\x0b\x65xitDetails\x12,\n\x12launch_config_hash\x18\r \x01(\tR\x10launchConfigHash\x12<\n\tnode_kind\x18\x0e \x01(\x0e\x32\x1f.ray.rpc.autoscaler.im.NodeKindR\x08nodeKind\x1a\x41\n\x13TotalResourcesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\xa5\x01\n\rStatusHistory\x12W\n\x0finstance_status\x18\x01 \x01(\x0e\x32..ray.rpc.autoscaler.im.Instance.InstanceStatusR\x0einstanceStatus\x12!\n\x0ctimestamp_ns\x18\x02 \x01(\x03R\x0btimestampNs\x12\x18\n\x07\x64\x65tails\x18\x03 \x01(\tR\x07\x64\x65tails\"\x8f\x02\n\x0eInstanceStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\r\n\tREQUESTED\x10\x02\x12\r\n\tALLOCATED\x10\x03\x12\x12\n\x0eRAY_INSTALLING\x10\x04\x12\x0f\n\x0bRAY_RUNNING\x10\x05\x12\x16\n\x12RAY_STOP_REQUESTED\x10\x06\x12\x10\n\x0cRAY_STOPPING\x10\x07\x12\x0f\n\x0bRAY_STOPPED\x10\x08\x12\x0f\n\x0bTERMINATING\x10\t\x12\x0e\n\nTERMINATED\x10\n\x12\x15\n\x11\x41LLOCATION_FAILED\x10\x0b\x12\x16\n\x12RAY_INSTALL_FAILED\x10\x0c\x12\x16\n\x12TERMINATION_FAILED\x10\rB\x14\n\x12_cloud_instance_idB\n\n\x08_node_id\"\x91\x05\n\x13InstanceUpdateEvent\x12\x1f\n\x0binstance_id\x18\x01 \x01(\tR\ninstanceId\x12^\n\x13new_instance_status\x18\x02 \x01(\x0e\x32..ray.rpc.autoscaler.im.Instance.InstanceStatusR\x11newInstanceStatus\x12\x18\n\x07\x64\x65tails\x18\x03 \x01(\tR\x07\x64\x65tails\x12\x16\n\x06upsert\x18\x04 \x01(\x08R\x06upsert\x12(\n\rinstance_type\x18\x05 \x01(\tH\x00R\x0cinstanceType\x88\x01\x01\x12/\n\x11\x63loud_instance_id\x18\x06 \x01(\tH\x01R\x0f\x63loudInstanceId\x88\x01\x01\x12\x41\n\tnode_kind\x18\x07 \x01(\x0e\x32\x1f.ray.rpc.autoscaler.im.NodeKindH\x02R\x08nodeKind\x88\x01\x01\x12#\n\x0bray_node_id\x18\x08 \x01(\tH\x03R\trayNodeId\x88\x01\x01\x12/\n\x11launch_request_id\x18\t \x01(\tH\x04R\x0flaunchRequestId\x88\x01\x01\x12_\n\x13termination_request\x18\n \x01(\x0b\x32).ray.rpc.autoscaler.im.TerminationRequestH\x05R\x12terminationRequest\x88\x01\x01\x42\x10\n\x0e_instance_typeB\x14\n\x12_cloud_instance_idB\x0c\n\n_node_kindB\x0e\n\x0c_ray_node_idB\x14\n\x12_launch_request_idB\x16\n\x14_termination_request\"~\n\rLaunchRequest\x12#\n\rinstance_type\x18\x01 \x01(\tR\x0cinstanceType\x12\x14\n\x05\x63ount\x18\x02 \x01(\x05R\x05\x63ount\x12\x0e\n\x02id\x18\x03 \x01(\tR\x02id\x12\"\n\rrequest_ts_ms\x18\x04 \x01(\x03R\x0brequestTsMs\"\xf3\x04\n\x12TerminationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1e\n\x0bray_node_id\x18\x02 \x01(\tR\trayNodeId\x12\x1f\n\x0binstance_id\x18\x03 \x01(\tR\ninstanceId\x12\x45\n\x05\x63\x61use\x18\x04 \x01(\x0e\x32/.ray.rpc.autoscaler.im.TerminationRequest.CauseR\x05\x63\x61use\x12#\n\rinstance_type\x18\x05 \x01(\tR\x0cinstanceType\x12-\n\x10idle_duration_ms\x18\x06 \x01(\x04H\x00R\x0eidleDurationMs\x88\x01\x01\x12\x37\n\x16max_num_nodes_per_type\x18\x07 \x01(\rH\x01R\x12maxNumNodesPerType\x88\x01\x01\x12\'\n\rmax_num_nodes\x18\x08 \x01(\rH\x02R\x0bmaxNumNodes\x88\x01\x01\x12\x18\n\x07\x64\x65tails\x18\t \x01(\tR\x07\x64\x65tails\x12W\n\x0finstance_status\x18\n \x01(\x0e\x32..ray.rpc.autoscaler.im.Instance.InstanceStatusR\x0einstanceStatus\"Z\n\x05\x43\x61use\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04IDLE\x10\x01\x12\x19\n\x15MAX_NUM_NODE_PER_TYPE\x10\x02\x12\x11\n\rMAX_NUM_NODES\x10\x03\x12\x0c\n\x08OUTDATED\x10\x04\x42\x13\n\x11_idle_duration_msB\x19\n\x17_max_num_nodes_per_typeB\x10\n\x0e_max_num_nodes\"\x94\x01\n!UpdateInstanceManagerStateRequest\x12)\n\x10\x65xpected_version\x18\x01 \x01(\x03R\x0f\x65xpectedVersion\x12\x44\n\x07updates\x18\x02 \x03(\x0b\x32*.ray.rpc.autoscaler.im.InstanceUpdateEventR\x07updates\"r\n\x1fUpdateInstanceManagerStateReply\x12\x35\n\x06status\x18\x01 \x01(\x0b\x32\x1d.ray.rpc.autoscaler.im.StatusR\x06status\x12\x18\n\x07version\x18\x02 \x01(\x03R\x07version\"o\n\x14InstanceManagerState\x12\x18\n\x07version\x18\x01 \x01(\x03R\x07version\x12=\n\tinstances\x18\x02 \x03(\x0b\x32\x1f.ray.rpc.autoscaler.im.InstanceR\tinstances\" \n\x1eGetInstanceManagerStateRequest\"\x98\x01\n\x1cGetInstanceManagerStateReply\x12\x35\n\x06status\x18\x01 \x01(\x0b\x32\x1d.ray.rpc.autoscaler.im.StatusR\x06status\x12\x41\n\x05state\x18\x02 \x01(\x0b\x32+.ray.rpc.autoscaler.im.InstanceManagerStateR\x05state*`\n\nStatusCode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x14\n\x10VERSION_MISMATCH\x10\x02\x12\x12\n\x0eUNKNOWN_ERRORS\x10\x03\x12\x0f\n\x0bUNAVAILABLE\x10\x04*/\n\x08NodeKind\x12\r\n\tUNMANAGED\x10\x00\x12\x08\n\x04HEAD\x10\x01\x12\n\n\x06WORKER\x10\x02\x32\xb1\x02\n\x16InstanceManagerService\x12\x85\x01\n\x17GetInstanceManagerState\x12\x35.ray.rpc.autoscaler.im.GetInstanceManagerStateRequest\x1a\x33.ray.rpc.autoscaler.im.GetInstanceManagerStateReply\x12\x8e\x01\n\x1aUpdateInstanceManagerState\x12\x38.ray.rpc.autoscaler.im.UpdateInstanceManagerStateRequest\x1a\x36.ray.rpc.autoscaler.im.UpdateInstanceManagerStateReplyb\x06proto3') + +_STATUSCODE = DESCRIPTOR.enum_types_by_name['StatusCode'] +StatusCode = enum_type_wrapper.EnumTypeWrapper(_STATUSCODE) +_NODEKIND = DESCRIPTOR.enum_types_by_name['NodeKind'] +NodeKind = enum_type_wrapper.EnumTypeWrapper(_NODEKIND) +UNSPECIFIED = 0 +OK = 1 +VERSION_MISMATCH = 2 +UNKNOWN_ERRORS = 3 +UNAVAILABLE = 4 +UNMANAGED = 0 +HEAD = 1 +WORKER = 2 + + +_STATUS = DESCRIPTOR.message_types_by_name['Status'] +_INSTANCE = DESCRIPTOR.message_types_by_name['Instance'] +_INSTANCE_TOTALRESOURCESENTRY = _INSTANCE.nested_types_by_name['TotalResourcesEntry'] +_INSTANCE_STATUSHISTORY = _INSTANCE.nested_types_by_name['StatusHistory'] +_INSTANCEUPDATEEVENT = DESCRIPTOR.message_types_by_name['InstanceUpdateEvent'] +_LAUNCHREQUEST = DESCRIPTOR.message_types_by_name['LaunchRequest'] +_TERMINATIONREQUEST = DESCRIPTOR.message_types_by_name['TerminationRequest'] +_UPDATEINSTANCEMANAGERSTATEREQUEST = DESCRIPTOR.message_types_by_name['UpdateInstanceManagerStateRequest'] +_UPDATEINSTANCEMANAGERSTATEREPLY = DESCRIPTOR.message_types_by_name['UpdateInstanceManagerStateReply'] +_INSTANCEMANAGERSTATE = DESCRIPTOR.message_types_by_name['InstanceManagerState'] +_GETINSTANCEMANAGERSTATEREQUEST = DESCRIPTOR.message_types_by_name['GetInstanceManagerStateRequest'] +_GETINSTANCEMANAGERSTATEREPLY = DESCRIPTOR.message_types_by_name['GetInstanceManagerStateReply'] +_INSTANCE_INSTANCESTATUS = _INSTANCE.enum_types_by_name['InstanceStatus'] +_TERMINATIONREQUEST_CAUSE = _TERMINATIONREQUEST.enum_types_by_name['Cause'] +Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), { + 'DESCRIPTOR' : _STATUS, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.Status) + }) +_sym_db.RegisterMessage(Status) + +Instance = _reflection.GeneratedProtocolMessageType('Instance', (_message.Message,), { + + 'TotalResourcesEntry' : _reflection.GeneratedProtocolMessageType('TotalResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _INSTANCE_TOTALRESOURCESENTRY, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.Instance.TotalResourcesEntry) + }) + , + + 'StatusHistory' : _reflection.GeneratedProtocolMessageType('StatusHistory', (_message.Message,), { + 'DESCRIPTOR' : _INSTANCE_STATUSHISTORY, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.Instance.StatusHistory) + }) + , + 'DESCRIPTOR' : _INSTANCE, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.Instance) + }) +_sym_db.RegisterMessage(Instance) +_sym_db.RegisterMessage(Instance.TotalResourcesEntry) +_sym_db.RegisterMessage(Instance.StatusHistory) + +InstanceUpdateEvent = _reflection.GeneratedProtocolMessageType('InstanceUpdateEvent', (_message.Message,), { + 'DESCRIPTOR' : _INSTANCEUPDATEEVENT, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.InstanceUpdateEvent) + }) +_sym_db.RegisterMessage(InstanceUpdateEvent) + +LaunchRequest = _reflection.GeneratedProtocolMessageType('LaunchRequest', (_message.Message,), { + 'DESCRIPTOR' : _LAUNCHREQUEST, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.LaunchRequest) + }) +_sym_db.RegisterMessage(LaunchRequest) + +TerminationRequest = _reflection.GeneratedProtocolMessageType('TerminationRequest', (_message.Message,), { + 'DESCRIPTOR' : _TERMINATIONREQUEST, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.TerminationRequest) + }) +_sym_db.RegisterMessage(TerminationRequest) + +UpdateInstanceManagerStateRequest = _reflection.GeneratedProtocolMessageType('UpdateInstanceManagerStateRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEINSTANCEMANAGERSTATEREQUEST, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.UpdateInstanceManagerStateRequest) + }) +_sym_db.RegisterMessage(UpdateInstanceManagerStateRequest) + +UpdateInstanceManagerStateReply = _reflection.GeneratedProtocolMessageType('UpdateInstanceManagerStateReply', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEINSTANCEMANAGERSTATEREPLY, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.UpdateInstanceManagerStateReply) + }) +_sym_db.RegisterMessage(UpdateInstanceManagerStateReply) + +InstanceManagerState = _reflection.GeneratedProtocolMessageType('InstanceManagerState', (_message.Message,), { + 'DESCRIPTOR' : _INSTANCEMANAGERSTATE, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.InstanceManagerState) + }) +_sym_db.RegisterMessage(InstanceManagerState) + +GetInstanceManagerStateRequest = _reflection.GeneratedProtocolMessageType('GetInstanceManagerStateRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETINSTANCEMANAGERSTATEREQUEST, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.GetInstanceManagerStateRequest) + }) +_sym_db.RegisterMessage(GetInstanceManagerStateRequest) + +GetInstanceManagerStateReply = _reflection.GeneratedProtocolMessageType('GetInstanceManagerStateReply', (_message.Message,), { + 'DESCRIPTOR' : _GETINSTANCEMANAGERSTATEREPLY, + '__module__' : 'src.ray.protobuf.instance_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.autoscaler.im.GetInstanceManagerStateReply) + }) +_sym_db.RegisterMessage(GetInstanceManagerStateReply) + +_INSTANCEMANAGERSERVICE = DESCRIPTOR.services_by_name['InstanceManagerService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _INSTANCE_TOTALRESOURCESENTRY._options = None + _INSTANCE_TOTALRESOURCESENTRY._serialized_options = b'8\001' + _STATUSCODE._serialized_start=3380 + _STATUSCODE._serialized_end=3476 + _NODEKIND._serialized_start=3478 + _NODEKIND._serialized_end=3525 + _STATUS._serialized_start=66 + _STATUS._serialized_end=155 + _INSTANCE._serialized_start=158 + _INSTANCE._serialized_end=1391 + _INSTANCE_TOTALRESOURCESENTRY._serialized_start=850 + _INSTANCE_TOTALRESOURCESENTRY._serialized_end=915 + _INSTANCE_STATUSHISTORY._serialized_start=918 + _INSTANCE_STATUSHISTORY._serialized_end=1083 + _INSTANCE_INSTANCESTATUS._serialized_start=1086 + _INSTANCE_INSTANCESTATUS._serialized_end=1357 + _INSTANCEUPDATEEVENT._serialized_start=1394 + _INSTANCEUPDATEEVENT._serialized_end=2051 + _LAUNCHREQUEST._serialized_start=2053 + _LAUNCHREQUEST._serialized_end=2179 + _TERMINATIONREQUEST._serialized_start=2182 + _TERMINATIONREQUEST._serialized_end=2809 + _TERMINATIONREQUEST_CAUSE._serialized_start=2653 + _TERMINATIONREQUEST_CAUSE._serialized_end=2743 + _UPDATEINSTANCEMANAGERSTATEREQUEST._serialized_start=2812 + _UPDATEINSTANCEMANAGERSTATEREQUEST._serialized_end=2960 + _UPDATEINSTANCEMANAGERSTATEREPLY._serialized_start=2962 + _UPDATEINSTANCEMANAGERSTATEREPLY._serialized_end=3076 + _INSTANCEMANAGERSTATE._serialized_start=3078 + _INSTANCEMANAGERSTATE._serialized_end=3189 + _GETINSTANCEMANAGERSTATEREQUEST._serialized_start=3191 + _GETINSTANCEMANAGERSTATEREQUEST._serialized_end=3223 + _GETINSTANCEMANAGERSTATEREPLY._serialized_start=3226 + _GETINSTANCEMANAGERSTATEREPLY._serialized_end=3378 + _INSTANCEMANAGERSERVICE._serialized_start=3528 + _INSTANCEMANAGERSERVICE._serialized_end=3833 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/instance_manager_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/instance_manager_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..bc62b0725139bae605e0ab983580f9e522def2ff --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/instance_manager_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import instance_manager_pb2 as src_dot_ray_dot_protobuf_dot_instance__manager__pb2 + + +class InstanceManagerServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetInstanceManagerState = channel.unary_unary( + '/ray.rpc.autoscaler.im.InstanceManagerService/GetInstanceManagerState', + request_serializer=src_dot_ray_dot_protobuf_dot_instance__manager__pb2.GetInstanceManagerStateRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_instance__manager__pb2.GetInstanceManagerStateReply.FromString, + ) + self.UpdateInstanceManagerState = channel.unary_unary( + '/ray.rpc.autoscaler.im.InstanceManagerService/UpdateInstanceManagerState', + request_serializer=src_dot_ray_dot_protobuf_dot_instance__manager__pb2.UpdateInstanceManagerStateRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_instance__manager__pb2.UpdateInstanceManagerStateReply.FromString, + ) + + +class InstanceManagerServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetInstanceManagerState(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateInstanceManagerState(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_InstanceManagerServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetInstanceManagerState': grpc.unary_unary_rpc_method_handler( + servicer.GetInstanceManagerState, + request_deserializer=src_dot_ray_dot_protobuf_dot_instance__manager__pb2.GetInstanceManagerStateRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_instance__manager__pb2.GetInstanceManagerStateReply.SerializeToString, + ), + 'UpdateInstanceManagerState': grpc.unary_unary_rpc_method_handler( + servicer.UpdateInstanceManagerState, + request_deserializer=src_dot_ray_dot_protobuf_dot_instance__manager__pb2.UpdateInstanceManagerStateRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_instance__manager__pb2.UpdateInstanceManagerStateReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.autoscaler.im.InstanceManagerService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class InstanceManagerService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetInstanceManagerState(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.autoscaler.im.InstanceManagerService/GetInstanceManagerState', + src_dot_ray_dot_protobuf_dot_instance__manager__pb2.GetInstanceManagerStateRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_instance__manager__pb2.GetInstanceManagerStateReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateInstanceManagerState(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.autoscaler.im.InstanceManagerService/UpdateInstanceManagerState', + src_dot_ray_dot_protobuf_dot_instance__manager__pb2.UpdateInstanceManagerStateRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_instance__manager__pb2.UpdateInstanceManagerStateReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/logging_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/logging_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..fa08f08b1b54bd427256d588647917bb512e05b2 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/logging_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/logging.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1esrc/ray/protobuf/logging.proto\x12\x07ray.rpc\"\xb0\x01\n\x08LogBatch\x12\x0e\n\x02ip\x18\x01 \x01(\tR\x02ip\x12\x10\n\x03pid\x18\x02 \x01(\tR\x03pid\x12\x15\n\x06job_id\x18\x03 \x01(\tR\x05jobId\x12\x19\n\x08is_error\x18\x04 \x01(\x08R\x07isError\x12\x14\n\x05lines\x18\x05 \x03(\tR\x05lines\x12\x1d\n\nactor_name\x18\x06 \x01(\tR\tactorName\x12\x1b\n\ttask_name\x18\x07 \x01(\tR\x08taskNameb\x06proto3') + + + +_LOGBATCH = DESCRIPTOR.message_types_by_name['LogBatch'] +LogBatch = _reflection.GeneratedProtocolMessageType('LogBatch', (_message.Message,), { + 'DESCRIPTOR' : _LOGBATCH, + '__module__' : 'src.ray.protobuf.logging_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LogBatch) + }) +_sym_db.RegisterMessage(LogBatch) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _LOGBATCH._serialized_start=44 + _LOGBATCH._serialized_end=220 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/logging_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/logging_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/logging_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/metrics_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/metrics_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..1cc59ff7e5b24e4676a38bb1055bc5ad46a481af --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/metrics_pb2.py @@ -0,0 +1,190 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: opencensus/proto/metrics/v1/metrics.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 +from . import resource_pb2 as opencensus_dot_proto_dot_resource_dot_v1_dot_resource__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)opencensus/proto/metrics/v1/metrics.proto\x12\x1bopencensus.proto.metrics.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a+opencensus/proto/resource/v1/resource.proto\"\xf1\x01\n\x06Metric\x12Z\n\x11metric_descriptor\x18\x01 \x01(\x0b\x32-.opencensus.proto.metrics.v1.MetricDescriptorR\x10metricDescriptor\x12G\n\ntimeseries\x18\x02 \x03(\x0b\x32\'.opencensus.proto.metrics.v1.TimeSeriesR\ntimeseries\x12\x42\n\x08resource\x18\x03 \x01(\x0b\x32&.opencensus.proto.resource.v1.ResourceR\x08resource\"\x96\x03\n\x10MetricDescriptor\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12\x12\n\x04unit\x18\x03 \x01(\tR\x04unit\x12\x46\n\x04type\x18\x04 \x01(\x0e\x32\x32.opencensus.proto.metrics.v1.MetricDescriptor.TypeR\x04type\x12\x44\n\nlabel_keys\x18\x05 \x03(\x0b\x32%.opencensus.proto.metrics.v1.LabelKeyR\tlabelKeys\"\xa9\x01\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0f\n\x0bGAUGE_INT64\x10\x01\x12\x10\n\x0cGAUGE_DOUBLE\x10\x02\x12\x16\n\x12GAUGE_DISTRIBUTION\x10\x03\x12\x14\n\x10\x43UMULATIVE_INT64\x10\x04\x12\x15\n\x11\x43UMULATIVE_DOUBLE\x10\x05\x12\x1b\n\x17\x43UMULATIVE_DISTRIBUTION\x10\x06\x12\x0b\n\x07SUMMARY\x10\x07\">\n\x08LabelKey\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\"\xd9\x01\n\nTimeSeries\x12\x43\n\x0fstart_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0estartTimestamp\x12J\n\x0clabel_values\x18\x02 \x03(\x0b\x32\'.opencensus.proto.metrics.v1.LabelValueR\x0blabelValues\x12:\n\x06points\x18\x03 \x03(\x0b\x32\".opencensus.proto.metrics.v1.PointR\x06points\"?\n\nLabelValue\x12\x14\n\x05value\x18\x01 \x01(\tR\x05value\x12\x1b\n\thas_value\x18\x02 \x01(\x08R\x08hasValue\"\xc5\x02\n\x05Point\x12\x38\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12!\n\x0bint64_value\x18\x02 \x01(\x03H\x00R\nint64Value\x12#\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00R\x0b\x64oubleValue\x12_\n\x12\x64istribution_value\x18\x04 \x01(\x0b\x32..opencensus.proto.metrics.v1.DistributionValueH\x00R\x11\x64istributionValue\x12P\n\rsummary_value\x18\x05 \x01(\x0b\x32).opencensus.proto.metrics.v1.SummaryValueH\x00R\x0csummaryValueB\x07\n\x05value\"\xcb\x06\n\x11\x44istributionValue\x12\x14\n\x05\x63ount\x18\x01 \x01(\x03R\x05\x63ount\x12\x10\n\x03sum\x18\x02 \x01(\x01R\x03sum\x12\x37\n\x18sum_of_squared_deviation\x18\x03 \x01(\x01R\x15sumOfSquaredDeviation\x12\x63\n\x0e\x62ucket_options\x18\x04 \x01(\x0b\x32<.opencensus.proto.metrics.v1.DistributionValue.BucketOptionsR\rbucketOptions\x12O\n\x07\x62uckets\x18\x05 \x03(\x0b\x32\x35.opencensus.proto.metrics.v1.DistributionValue.BucketR\x07\x62uckets\x1a\xa0\x01\n\rBucketOptions\x12\x63\n\x08\x65xplicit\x18\x01 \x01(\x0b\x32\x45.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.ExplicitH\x00R\x08\x65xplicit\x1a\"\n\x08\x45xplicit\x12\x16\n\x06\x62ounds\x18\x01 \x03(\x01R\x06\x62oundsB\x06\n\x04type\x1as\n\x06\x42ucket\x12\x14\n\x05\x63ount\x18\x01 \x01(\x03R\x05\x63ount\x12S\n\x08\x65xemplar\x18\x02 \x01(\x0b\x32\x37.opencensus.proto.metrics.v1.DistributionValue.ExemplarR\x08\x65xemplar\x1a\x86\x02\n\x08\x45xemplar\x12\x14\n\x05value\x18\x01 \x01(\x01R\x05value\x12\x38\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12j\n\x0b\x61ttachments\x18\x03 \x03(\x0b\x32H.opencensus.proto.metrics.v1.DistributionValue.Exemplar.AttachmentsEntryR\x0b\x61ttachments\x1a>\n\x10\x41ttachmentsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xef\x03\n\x0cSummaryValue\x12\x31\n\x05\x63ount\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueR\x05\x63ount\x12.\n\x03sum\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueR\x03sum\x12N\n\x08snapshot\x18\x03 \x01(\x0b\x32\x32.opencensus.proto.metrics.v1.SummaryValue.SnapshotR\x08snapshot\x1a\xab\x02\n\x08Snapshot\x12\x31\n\x05\x63ount\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueR\x05\x63ount\x12.\n\x03sum\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueR\x03sum\x12q\n\x11percentile_values\x18\x03 \x03(\x0b\x32\x44.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileR\x10percentileValues\x1aI\n\x11ValueAtPercentile\x12\x1e\n\npercentile\x18\x01 \x01(\x01R\npercentile\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05valueB\x94\x01\n\x1eio.opencensus.proto.metrics.v1B\x0cMetricsProtoP\x01ZDgithub.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1\xea\x02\x1bOpenCensus.Proto.Metrics.V1b\x06proto3') + + + +_METRIC = DESCRIPTOR.message_types_by_name['Metric'] +_METRICDESCRIPTOR = DESCRIPTOR.message_types_by_name['MetricDescriptor'] +_LABELKEY = DESCRIPTOR.message_types_by_name['LabelKey'] +_TIMESERIES = DESCRIPTOR.message_types_by_name['TimeSeries'] +_LABELVALUE = DESCRIPTOR.message_types_by_name['LabelValue'] +_POINT = DESCRIPTOR.message_types_by_name['Point'] +_DISTRIBUTIONVALUE = DESCRIPTOR.message_types_by_name['DistributionValue'] +_DISTRIBUTIONVALUE_BUCKETOPTIONS = _DISTRIBUTIONVALUE.nested_types_by_name['BucketOptions'] +_DISTRIBUTIONVALUE_BUCKETOPTIONS_EXPLICIT = _DISTRIBUTIONVALUE_BUCKETOPTIONS.nested_types_by_name['Explicit'] +_DISTRIBUTIONVALUE_BUCKET = _DISTRIBUTIONVALUE.nested_types_by_name['Bucket'] +_DISTRIBUTIONVALUE_EXEMPLAR = _DISTRIBUTIONVALUE.nested_types_by_name['Exemplar'] +_DISTRIBUTIONVALUE_EXEMPLAR_ATTACHMENTSENTRY = _DISTRIBUTIONVALUE_EXEMPLAR.nested_types_by_name['AttachmentsEntry'] +_SUMMARYVALUE = DESCRIPTOR.message_types_by_name['SummaryValue'] +_SUMMARYVALUE_SNAPSHOT = _SUMMARYVALUE.nested_types_by_name['Snapshot'] +_SUMMARYVALUE_SNAPSHOT_VALUEATPERCENTILE = _SUMMARYVALUE_SNAPSHOT.nested_types_by_name['ValueAtPercentile'] +_METRICDESCRIPTOR_TYPE = _METRICDESCRIPTOR.enum_types_by_name['Type'] +Metric = _reflection.GeneratedProtocolMessageType('Metric', (_message.Message,), { + 'DESCRIPTOR' : _METRIC, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.Metric) + }) +_sym_db.RegisterMessage(Metric) + +MetricDescriptor = _reflection.GeneratedProtocolMessageType('MetricDescriptor', (_message.Message,), { + 'DESCRIPTOR' : _METRICDESCRIPTOR, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.MetricDescriptor) + }) +_sym_db.RegisterMessage(MetricDescriptor) + +LabelKey = _reflection.GeneratedProtocolMessageType('LabelKey', (_message.Message,), { + 'DESCRIPTOR' : _LABELKEY, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.LabelKey) + }) +_sym_db.RegisterMessage(LabelKey) + +TimeSeries = _reflection.GeneratedProtocolMessageType('TimeSeries', (_message.Message,), { + 'DESCRIPTOR' : _TIMESERIES, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.TimeSeries) + }) +_sym_db.RegisterMessage(TimeSeries) + +LabelValue = _reflection.GeneratedProtocolMessageType('LabelValue', (_message.Message,), { + 'DESCRIPTOR' : _LABELVALUE, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.LabelValue) + }) +_sym_db.RegisterMessage(LabelValue) + +Point = _reflection.GeneratedProtocolMessageType('Point', (_message.Message,), { + 'DESCRIPTOR' : _POINT, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.Point) + }) +_sym_db.RegisterMessage(Point) + +DistributionValue = _reflection.GeneratedProtocolMessageType('DistributionValue', (_message.Message,), { + + 'BucketOptions' : _reflection.GeneratedProtocolMessageType('BucketOptions', (_message.Message,), { + + 'Explicit' : _reflection.GeneratedProtocolMessageType('Explicit', (_message.Message,), { + 'DESCRIPTOR' : _DISTRIBUTIONVALUE_BUCKETOPTIONS_EXPLICIT, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) + }) + , + 'DESCRIPTOR' : _DISTRIBUTIONVALUE_BUCKETOPTIONS, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.DistributionValue.BucketOptions) + }) + , + + 'Bucket' : _reflection.GeneratedProtocolMessageType('Bucket', (_message.Message,), { + 'DESCRIPTOR' : _DISTRIBUTIONVALUE_BUCKET, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.DistributionValue.Bucket) + }) + , + + 'Exemplar' : _reflection.GeneratedProtocolMessageType('Exemplar', (_message.Message,), { + + 'AttachmentsEntry' : _reflection.GeneratedProtocolMessageType('AttachmentsEntry', (_message.Message,), { + 'DESCRIPTOR' : _DISTRIBUTIONVALUE_EXEMPLAR_ATTACHMENTSENTRY, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.DistributionValue.Exemplar.AttachmentsEntry) + }) + , + 'DESCRIPTOR' : _DISTRIBUTIONVALUE_EXEMPLAR, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.DistributionValue.Exemplar) + }) + , + 'DESCRIPTOR' : _DISTRIBUTIONVALUE, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.DistributionValue) + }) +_sym_db.RegisterMessage(DistributionValue) +_sym_db.RegisterMessage(DistributionValue.BucketOptions) +_sym_db.RegisterMessage(DistributionValue.BucketOptions.Explicit) +_sym_db.RegisterMessage(DistributionValue.Bucket) +_sym_db.RegisterMessage(DistributionValue.Exemplar) +_sym_db.RegisterMessage(DistributionValue.Exemplar.AttachmentsEntry) + +SummaryValue = _reflection.GeneratedProtocolMessageType('SummaryValue', (_message.Message,), { + + 'Snapshot' : _reflection.GeneratedProtocolMessageType('Snapshot', (_message.Message,), { + + 'ValueAtPercentile' : _reflection.GeneratedProtocolMessageType('ValueAtPercentile', (_message.Message,), { + 'DESCRIPTOR' : _SUMMARYVALUE_SNAPSHOT_VALUEATPERCENTILE, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile) + }) + , + 'DESCRIPTOR' : _SUMMARYVALUE_SNAPSHOT, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.SummaryValue.Snapshot) + }) + , + 'DESCRIPTOR' : _SUMMARYVALUE, + '__module__' : 'opencensus.proto.metrics.v1.metrics_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.SummaryValue) + }) +_sym_db.RegisterMessage(SummaryValue) +_sym_db.RegisterMessage(SummaryValue.Snapshot) +_sym_db.RegisterMessage(SummaryValue.Snapshot.ValueAtPercentile) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\036io.opencensus.proto.metrics.v1B\014MetricsProtoP\001ZDgithub.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1\352\002\033OpenCensus.Proto.Metrics.V1' + _DISTRIBUTIONVALUE_EXEMPLAR_ATTACHMENTSENTRY._options = None + _DISTRIBUTIONVALUE_EXEMPLAR_ATTACHMENTSENTRY._serialized_options = b'8\001' + _METRIC._serialized_start=185 + _METRIC._serialized_end=426 + _METRICDESCRIPTOR._serialized_start=429 + _METRICDESCRIPTOR._serialized_end=835 + _METRICDESCRIPTOR_TYPE._serialized_start=666 + _METRICDESCRIPTOR_TYPE._serialized_end=835 + _LABELKEY._serialized_start=837 + _LABELKEY._serialized_end=899 + _TIMESERIES._serialized_start=902 + _TIMESERIES._serialized_end=1119 + _LABELVALUE._serialized_start=1121 + _LABELVALUE._serialized_end=1184 + _POINT._serialized_start=1187 + _POINT._serialized_end=1512 + _DISTRIBUTIONVALUE._serialized_start=1515 + _DISTRIBUTIONVALUE._serialized_end=2358 + _DISTRIBUTIONVALUE_BUCKETOPTIONS._serialized_start=1816 + _DISTRIBUTIONVALUE_BUCKETOPTIONS._serialized_end=1976 + _DISTRIBUTIONVALUE_BUCKETOPTIONS_EXPLICIT._serialized_start=1934 + _DISTRIBUTIONVALUE_BUCKETOPTIONS_EXPLICIT._serialized_end=1968 + _DISTRIBUTIONVALUE_BUCKET._serialized_start=1978 + _DISTRIBUTIONVALUE_BUCKET._serialized_end=2093 + _DISTRIBUTIONVALUE_EXEMPLAR._serialized_start=2096 + _DISTRIBUTIONVALUE_EXEMPLAR._serialized_end=2358 + _DISTRIBUTIONVALUE_EXEMPLAR_ATTACHMENTSENTRY._serialized_start=2296 + _DISTRIBUTIONVALUE_EXEMPLAR_ATTACHMENTSENTRY._serialized_end=2358 + _SUMMARYVALUE._serialized_start=2361 + _SUMMARYVALUE._serialized_end=2856 + _SUMMARYVALUE_SNAPSHOT._serialized_start=2557 + _SUMMARYVALUE_SNAPSHOT._serialized_end=2856 + _SUMMARYVALUE_SNAPSHOT_VALUEATPERCENTILE._serialized_start=2783 + _SUMMARYVALUE_SNAPSHOT_VALUEATPERCENTILE._serialized_end=2856 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/metrics_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/metrics_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/metrics_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/node_manager_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/node_manager_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..ed933edfd6fb6b27e6903ecb6b2902756634503c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/node_manager_pb2.py @@ -0,0 +1,578 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/node_manager.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 +from . import gcs_pb2 as src_dot_ray_dot_protobuf_dot_gcs__pb2 +from . import autoscaler_pb2 as src_dot_ray_dot_protobuf_dot_autoscaler__pb2 +from . import runtime_env_common_pb2 as src_dot_ray_dot_protobuf_dot_runtime__env__common__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#src/ray/protobuf/node_manager.proto\x12\x07ray.rpc\x1a\x1dsrc/ray/protobuf/common.proto\x1a\x1asrc/ray/protobuf/gcs.proto\x1a!src/ray/protobuf/autoscaler.proto\x1a)src/ray/protobuf/runtime_env_common.proto\"p\n\x13WorkerBacklogReport\x12\x36\n\rresource_spec\x18\x01 \x01(\x0b\x32\x11.ray.rpc.TaskSpecR\x0cresourceSpec\x12!\n\x0c\x62\x61\x63klog_size\x18\x02 \x01(\x03R\x0b\x62\x61\x63klogSize\"\x80\x01\n\x1aReportWorkerBacklogRequest\x12\x1b\n\tworker_id\x18\x01 \x01(\x0cR\x08workerId\x12\x45\n\x0f\x62\x61\x63klog_reports\x18\x02 \x03(\x0b\x32\x1c.ray.rpc.WorkerBacklogReportR\x0e\x62\x61\x63klogReports\"\x1a\n\x18ReportWorkerBacklogReply\"\xe0\x01\n\x19RequestWorkerLeaseRequest\x12\x36\n\rresource_spec\x18\x01 \x01(\x0b\x32\x11.ray.rpc.TaskSpecR\x0cresourceSpec\x12!\n\x0c\x62\x61\x63klog_size\x18\x02 \x01(\x03R\x0b\x62\x61\x63klogSize\x12&\n\x0fgrant_or_reject\x18\x03 \x01(\x08R\rgrantOrReject\x12@\n\x1dis_selected_based_on_locality\x18\x04 \x01(\x08R\x19isSelectedBasedOnLocality\"\x81\x06\n\x17RequestWorkerLeaseReply\x12\x37\n\x0eworker_address\x18\x01 \x01(\x0b\x32\x10.ray.rpc.AddressR\rworkerAddress\x12G\n\x17retry_at_raylet_address\x18\x02 \x01(\x0b\x32\x10.ray.rpc.AddressR\x14retryAtRayletAddress\x12\x44\n\x10resource_mapping\x18\x03 \x03(\x0b\x32\x19.ray.rpc.ResourceMapEntryR\x0fresourceMapping\x12\x1a\n\x08\x63\x61nceled\x18\x04 \x01(\x08R\x08\x63\x61nceled\x12\x1d\n\nworker_pid\x18\x06 \x01(\rR\tworkerPid\x12\x1a\n\x08rejected\x18\x07 \x01(\x08R\x08rejected\x12=\n\x0eresources_data\x18\x08 \x01(\x0b\x32\x16.ray.rpc.ResourcesDataR\rresourcesData\x12Y\n\x0c\x66\x61ilure_type\x18\t \x01(\x0e\x32\x36.ray.rpc.RequestWorkerLeaseReply.SchedulingFailureTypeR\x0b\x66\x61ilureType\x12<\n\x1ascheduling_failure_message\x18\n \x01(\tR\x18schedulingFailureMessage\"\xee\x01\n\x15SchedulingFailureType\x12\x0e\n\nNOT_FAILED\x10\x00\x12\x15\n\x11SCHEDULING_FAILED\x10\x01\x12\x30\n,SCHEDULING_CANCELLED_PLACEMENT_GROUP_REMOVED\x10\x02\x12\x31\n-SCHEDULING_CANCELLED_RUNTIME_ENV_SETUP_FAILED\x10\x03\x12!\n\x1dSCHEDULING_CANCELLED_INTENDED\x10\x04\x12&\n\"SCHEDULING_CANCELLED_UNSCHEDULABLE\x10\x05\"\x8b\x02\n\x16PrestartWorkersRequest\x12-\n\x08language\x18\x01 \x01(\x0e\x32\x11.ray.rpc.LanguageR\x08language\x12\x1a\n\x06job_id\x18\x02 \x01(\x0cH\x00R\x05jobId\x88\x01\x01\x12\x41\n\x10runtime_env_info\x18\x03 \x01(\x0b\x32\x17.ray.rpc.RuntimeEnvInfoR\x0eruntimeEnvInfo\x12\x37\n\x18keep_alive_duration_secs\x18\x04 \x01(\x04R\x15keepAliveDurationSecs\x12\x1f\n\x0bnum_workers\x18\x05 \x01(\x04R\nnumWorkersB\t\n\x07_job_id\"\x16\n\x14PrestartWorkersReply\"S\n\x1dPrepareBundleResourcesRequest\x12\x32\n\x0c\x62undle_specs\x18\x01 \x03(\x0b\x32\x0f.ray.rpc.BundleR\x0b\x62undleSpecs\"7\n\x1bPrepareBundleResourcesReply\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\"R\n\x1c\x43ommitBundleResourcesRequest\x12\x32\n\x0c\x62undle_specs\x18\x01 \x03(\x0b\x32\x0f.ray.rpc.BundleR\x0b\x62undleSpecs\"\x1c\n\x1a\x43ommitBundleResourcesReply\"P\n\x1c\x43\x61ncelResourceReserveRequest\x12\x30\n\x0b\x62undle_spec\x18\x01 \x01(\x0b\x32\x0f.ray.rpc.BundleR\nbundleSpec\"\x1c\n\x1a\x43\x61ncelResourceReserveReply\"\xec\x01\n\x13ReturnWorkerRequest\x12\x1f\n\x0bworker_port\x18\x01 \x01(\x05R\nworkerPort\x12\x1b\n\tworker_id\x18\x02 \x01(\x0cR\x08workerId\x12+\n\x11\x64isconnect_worker\x18\x03 \x01(\x08R\x10\x64isconnectWorker\x12%\n\x0eworker_exiting\x18\x04 \x01(\x08R\rworkerExiting\x12\x43\n\x1e\x64isconnect_worker_error_detail\x18\x05 \x01(\tR\x1b\x64isconnectWorkerErrorDetail\"\x13\n\x11ReturnWorkerReply\"M\n ReleaseUnusedActorWorkersRequest\x12)\n\x11worker_ids_in_use\x18\x01 \x03(\x0cR\x0eworkerIdsInUse\" \n\x1eReleaseUnusedActorWorkersReply\"3\n\x15ShutdownRayletRequest\x12\x1a\n\x08graceful\x18\x01 \x01(\x08R\x08graceful\"\x15\n\x13ShutdownRayletReply\"3\n\x18\x43\x61ncelWorkerLeaseRequest\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\"2\n\x16\x43\x61ncelWorkerLeaseReply\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\"\xa4\x01\n\x13PinObjectIDsRequest\x12\x35\n\rowner_address\x18\x01 \x01(\x0b\x32\x10.ray.rpc.AddressR\x0cownerAddress\x12\x1d\n\nobject_ids\x18\x02 \x03(\x0cR\tobjectIds\x12&\n\x0cgenerator_id\x18\x03 \x01(\x0cH\x00R\x0bgeneratorId\x88\x01\x01\x42\x0f\n\r_generator_id\"1\n\x11PinObjectIDsReply\x12\x1c\n\tsuccesses\x18\x01 \x03(\x08R\tsuccesses\"E\n\x13GetNodeStatsRequest\x12.\n\x13include_memory_info\x18\x01 \x01(\x08R\x11includeMemoryInfo\"\xcb\x06\n\x10ObjectStoreStats\x12+\n\x12spill_time_total_s\x18\x01 \x01(\x01R\x0fspillTimeTotalS\x12.\n\x13spilled_bytes_total\x18\x02 \x01(\x03R\x11spilledBytesTotal\x12\x32\n\x15spilled_objects_total\x18\x03 \x01(\x03R\x13spilledObjectsTotal\x12/\n\x14restore_time_total_s\x18\x04 \x01(\x01R\x11restoreTimeTotalS\x12\x30\n\x14restored_bytes_total\x18\x05 \x01(\x03R\x12restoredBytesTotal\x12\x34\n\x16restored_objects_total\x18\x06 \x01(\x03R\x14restoredObjectsTotal\x12\x35\n\x17object_store_bytes_used\x18\x07 \x01(\x03R\x14objectStoreBytesUsed\x12\x37\n\x18object_store_bytes_avail\x18\x08 \x01(\x03R\x15objectStoreBytesAvail\x12\x44\n\x1fobject_store_bytes_primary_copy\x18\t \x01(\x03R\x1bobjectStoreBytesPrimaryCopy\x12=\n\x1bobject_store_bytes_fallback\x18\n \x01(\x03R\x18objectStoreBytesFallback\x12*\n\x11num_local_objects\x18\x0b \x01(\x03R\x0fnumLocalObjects\x12.\n\x13object_pulls_queued\x18\x0c \x01(\x08R\x11objectPullsQueued\x12\x44\n\x1fnum_object_store_primary_copies\x18\r \x01(\x03R\x1bnumObjectStorePrimaryCopies\x12<\n\x1a\x63umulative_created_objects\x18\x0e \x01(\x03R\x18\x63umulativeCreatedObjects\x12\x38\n\x18\x63umulative_created_bytes\x18\x0f \x01(\x03R\x16\x63umulativeCreatedBytes\"\xb8\x01\n\x11GetNodeStatsReply\x12\x46\n\x12\x63ore_workers_stats\x18\x01 \x03(\x0b\x32\x18.ray.rpc.CoreWorkerStatsR\x10\x63oreWorkersStats\x12\x1f\n\x0bnum_workers\x18\x03 \x01(\rR\nnumWorkers\x12:\n\x0bstore_stats\x18\x06 \x01(\x0b\x32\x19.ray.rpc.ObjectStoreStatsR\nstoreStats\"\x11\n\x0fGlobalGCRequest\"\x0f\n\rGlobalGCReply\"O\n\x1d\x46ormatGlobalMemoryInfoRequest\x12.\n\x13include_memory_info\x18\x01 \x01(\x08R\x11includeMemoryInfo\"\x80\x01\n\x1b\x46ormatGlobalMemoryInfoReply\x12%\n\x0ememory_summary\x18\x01 \x01(\tR\rmemorySummary\x12:\n\x0bstore_stats\x18\x02 \x01(\x0b\x32\x19.ray.rpc.ObjectStoreStatsR\nstoreStats\"T\n\x1bReleaseUnusedBundlesRequest\x12\x35\n\x0e\x62undles_in_use\x18\x01 \x03(\x0b\x32\x0f.ray.rpc.BundleR\x0c\x62undlesInUse\"\x1b\n\x19ReleaseUnusedBundlesReply\"\x18\n\x16GetSystemConfigRequest\";\n\x14GetSystemConfigReply\x12#\n\rsystem_config\x18\x01 \x01(\tR\x0csystemConfig\"<\n\x15GetObjectsInfoRequest\x12\x19\n\x05limit\x18\x01 \x01(\x03H\x00R\x05limit\x88\x01\x01\x42\x08\n\x06_limit\"s\n\x13GetObjectsInfoReply\x12\x46\n\x12\x63ore_workers_stats\x18\x01 \x03(\x0b\x32\x18.ray.rpc.CoreWorkerStatsR\x10\x63oreWorkersStats\x12\x14\n\x05total\x18\x02 \x01(\x03R\x05total\"\x18\n\x16GetResourceLoadRequest\"L\n\x14GetResourceLoadReply\x12\x34\n\tresources\x18\x01 \x01(\x0b\x32\x16.ray.rpc.ResourcesDataR\tresources\"\xd7\x02\n$CancelTasksWithResourceShapesRequest\x12\x64\n\x0fresource_shapes\x18\x01 \x03(\x0b\x32;.ray.rpc.CancelTasksWithResourceShapesRequest.ResourceShapeR\x0eresourceShapes\x1a\xc8\x01\n\rResourceShape\x12u\n\x0eresource_shape\x18\x01 \x03(\x0b\x32N.ray.rpc.CancelTasksWithResourceShapesRequest.ResourceShape.ResourceShapeEntryR\rresourceShape\x1a@\n\x12ResourceShapeEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\"$\n\"CancelTasksWithResourceShapesReply\"\x19\n\x17NotifyGCSRestartRequest\"\x17\n\x15NotifyGCSRestartReply\"5\n\x1aGetTaskFailureCauseRequest\x12\x17\n\x07task_id\x18\x01 \x01(\x0cR\x06taskId\"\xa1\x01\n\x18GetTaskFailureCauseReply\x12?\n\rfailure_cause\x18\x01 \x01(\x0b\x32\x15.ray.rpc.RayErrorInfoH\x00R\x0c\x66\x61ilureCause\x88\x01\x01\x12\x32\n\x15\x66\x61il_task_immediately\x18\x02 \x01(\x08R\x13\x66\x61ilTaskImmediatelyB\x10\n\x0e_failure_cause\"\xac\x01\n\x12\x44rainRayletRequest\x12;\n\x06reason\x18\x01 \x01(\x0e\x32#.ray.rpc.autoscaler.DrainNodeReasonR\x06reason\x12%\n\x0ereason_message\x18\x02 \x01(\tR\rreasonMessage\x12\x32\n\x15\x64\x65\x61\x64line_timestamp_ms\x18\x03 \x01(\x03R\x13\x64\x65\x61\x64lineTimestampMs\"m\n\x10\x44rainRayletReply\x12\x1f\n\x0bis_accepted\x18\x01 \x01(\x08R\nisAccepted\x12\x38\n\x18rejection_reason_message\x18\x02 \x01(\tR\x16rejectionReasonMessage\"\x93\x01\n\x1cRegisterMutableObjectRequest\x12(\n\x10writer_object_id\x18\x01 \x01(\x0cR\x0ewriterObjectId\x12\x1f\n\x0bnum_readers\x18\x02 \x01(\x03R\nnumReaders\x12(\n\x10reader_object_id\x18\x03 \x01(\x0cR\x0ereaderObjectId\"\x1c\n\x1aRegisterMutableObjectReply\"\x83\x02\n\x18PushMutableObjectRequest\x12(\n\x10writer_object_id\x18\x01 \x01(\x0cR\x0ewriterObjectId\x12&\n\x0ftotal_data_size\x18\x02 \x01(\x04R\rtotalDataSize\x12.\n\x13total_metadata_size\x18\x03 \x01(\x04R\x11totalMetadataSize\x12\x16\n\x06offset\x18\x04 \x01(\x04R\x06offset\x12\x1d\n\nchunk_size\x18\x05 \x01(\x04R\tchunkSize\x12\x12\n\x04\x64\x61ta\x18\x06 \x01(\x0cR\x04\x64\x61ta\x12\x1a\n\x08metadata\x18\x07 \x01(\x0cR\x08metadata\",\n\x16PushMutableObjectReply\x12\x12\n\x04\x64one\x18\x01 \x01(\x08R\x04\x64one\"7\n\x18IsLocalWorkerDeadRequest\x12\x1b\n\tworker_id\x18\x01 \x01(\x0cR\x08workerId\"1\n\x16IsLocalWorkerDeadReply\x12\x17\n\x07is_dead\x18\x01 \x01(\x08R\x06isDead2\xda\x11\n\x12NodeManagerService\x12T\n\x10NotifyGCSRestart\x12 .ray.rpc.NotifyGCSRestartRequest\x1a\x1e.ray.rpc.NotifyGCSRestartReply\x12Q\n\x0fGetResourceLoad\x12\x1f.ray.rpc.GetResourceLoadRequest\x1a\x1d.ray.rpc.GetResourceLoadReply\x12{\n\x1d\x43\x61ncelTasksWithResourceShapes\x12-.ray.rpc.CancelTasksWithResourceShapesRequest\x1a+.ray.rpc.CancelTasksWithResourceShapesReply\x12Z\n\x12RequestWorkerLease\x12\".ray.rpc.RequestWorkerLeaseRequest\x1a .ray.rpc.RequestWorkerLeaseReply\x12Q\n\x0fPrestartWorkers\x12\x1f.ray.rpc.PrestartWorkersRequest\x1a\x1d.ray.rpc.PrestartWorkersReply\x12]\n\x13ReportWorkerBacklog\x12#.ray.rpc.ReportWorkerBacklogRequest\x1a!.ray.rpc.ReportWorkerBacklogReply\x12H\n\x0cReturnWorker\x12\x1c.ray.rpc.ReturnWorkerRequest\x1a\x1a.ray.rpc.ReturnWorkerReply\x12o\n\x19ReleaseUnusedActorWorkers\x12).ray.rpc.ReleaseUnusedActorWorkersRequest\x1a\'.ray.rpc.ReleaseUnusedActorWorkersReply\x12N\n\x0eShutdownRaylet\x12\x1e.ray.rpc.ShutdownRayletRequest\x1a\x1c.ray.rpc.ShutdownRayletReply\x12\x45\n\x0b\x44rainRaylet\x12\x1b.ray.rpc.DrainRayletRequest\x1a\x19.ray.rpc.DrainRayletReply\x12\x66\n\x16PrepareBundleResources\x12&.ray.rpc.PrepareBundleResourcesRequest\x1a$.ray.rpc.PrepareBundleResourcesReply\x12\x63\n\x15\x43ommitBundleResources\x12%.ray.rpc.CommitBundleResourcesRequest\x1a#.ray.rpc.CommitBundleResourcesReply\x12\x63\n\x15\x43\x61ncelResourceReserve\x12%.ray.rpc.CancelResourceReserveRequest\x1a#.ray.rpc.CancelResourceReserveReply\x12W\n\x11\x43\x61ncelWorkerLease\x12!.ray.rpc.CancelWorkerLeaseRequest\x1a\x1f.ray.rpc.CancelWorkerLeaseReply\x12H\n\x0cPinObjectIDs\x12\x1c.ray.rpc.PinObjectIDsRequest\x1a\x1a.ray.rpc.PinObjectIDsReply\x12H\n\x0cGetNodeStats\x12\x1c.ray.rpc.GetNodeStatsRequest\x1a\x1a.ray.rpc.GetNodeStatsReply\x12<\n\x08GlobalGC\x12\x18.ray.rpc.GlobalGCRequest\x1a\x16.ray.rpc.GlobalGCReply\x12\x66\n\x16\x46ormatGlobalMemoryInfo\x12&.ray.rpc.FormatGlobalMemoryInfoRequest\x1a$.ray.rpc.FormatGlobalMemoryInfoReply\x12`\n\x14ReleaseUnusedBundles\x12$.ray.rpc.ReleaseUnusedBundlesRequest\x1a\".ray.rpc.ReleaseUnusedBundlesReply\x12Q\n\x0fGetSystemConfig\x12\x1f.ray.rpc.GetSystemConfigRequest\x1a\x1d.ray.rpc.GetSystemConfigReply\x12N\n\x0eGetObjectsInfo\x12\x1e.ray.rpc.GetObjectsInfoRequest\x1a\x1c.ray.rpc.GetObjectsInfoReply\x12]\n\x13GetTaskFailureCause\x12#.ray.rpc.GetTaskFailureCauseRequest\x1a!.ray.rpc.GetTaskFailureCauseReply\x12\x63\n\x15RegisterMutableObject\x12%.ray.rpc.RegisterMutableObjectRequest\x1a#.ray.rpc.RegisterMutableObjectReply\x12W\n\x11PushMutableObject\x12!.ray.rpc.PushMutableObjectRequest\x1a\x1f.ray.rpc.PushMutableObjectReply\x12W\n\x11IsLocalWorkerDead\x12!.ray.rpc.IsLocalWorkerDeadRequest\x1a\x1f.ray.rpc.IsLocalWorkerDeadReplyb\x06proto3') + + + +_WORKERBACKLOGREPORT = DESCRIPTOR.message_types_by_name['WorkerBacklogReport'] +_REPORTWORKERBACKLOGREQUEST = DESCRIPTOR.message_types_by_name['ReportWorkerBacklogRequest'] +_REPORTWORKERBACKLOGREPLY = DESCRIPTOR.message_types_by_name['ReportWorkerBacklogReply'] +_REQUESTWORKERLEASEREQUEST = DESCRIPTOR.message_types_by_name['RequestWorkerLeaseRequest'] +_REQUESTWORKERLEASEREPLY = DESCRIPTOR.message_types_by_name['RequestWorkerLeaseReply'] +_PRESTARTWORKERSREQUEST = DESCRIPTOR.message_types_by_name['PrestartWorkersRequest'] +_PRESTARTWORKERSREPLY = DESCRIPTOR.message_types_by_name['PrestartWorkersReply'] +_PREPAREBUNDLERESOURCESREQUEST = DESCRIPTOR.message_types_by_name['PrepareBundleResourcesRequest'] +_PREPAREBUNDLERESOURCESREPLY = DESCRIPTOR.message_types_by_name['PrepareBundleResourcesReply'] +_COMMITBUNDLERESOURCESREQUEST = DESCRIPTOR.message_types_by_name['CommitBundleResourcesRequest'] +_COMMITBUNDLERESOURCESREPLY = DESCRIPTOR.message_types_by_name['CommitBundleResourcesReply'] +_CANCELRESOURCERESERVEREQUEST = DESCRIPTOR.message_types_by_name['CancelResourceReserveRequest'] +_CANCELRESOURCERESERVEREPLY = DESCRIPTOR.message_types_by_name['CancelResourceReserveReply'] +_RETURNWORKERREQUEST = DESCRIPTOR.message_types_by_name['ReturnWorkerRequest'] +_RETURNWORKERREPLY = DESCRIPTOR.message_types_by_name['ReturnWorkerReply'] +_RELEASEUNUSEDACTORWORKERSREQUEST = DESCRIPTOR.message_types_by_name['ReleaseUnusedActorWorkersRequest'] +_RELEASEUNUSEDACTORWORKERSREPLY = DESCRIPTOR.message_types_by_name['ReleaseUnusedActorWorkersReply'] +_SHUTDOWNRAYLETREQUEST = DESCRIPTOR.message_types_by_name['ShutdownRayletRequest'] +_SHUTDOWNRAYLETREPLY = DESCRIPTOR.message_types_by_name['ShutdownRayletReply'] +_CANCELWORKERLEASEREQUEST = DESCRIPTOR.message_types_by_name['CancelWorkerLeaseRequest'] +_CANCELWORKERLEASEREPLY = DESCRIPTOR.message_types_by_name['CancelWorkerLeaseReply'] +_PINOBJECTIDSREQUEST = DESCRIPTOR.message_types_by_name['PinObjectIDsRequest'] +_PINOBJECTIDSREPLY = DESCRIPTOR.message_types_by_name['PinObjectIDsReply'] +_GETNODESTATSREQUEST = DESCRIPTOR.message_types_by_name['GetNodeStatsRequest'] +_OBJECTSTORESTATS = DESCRIPTOR.message_types_by_name['ObjectStoreStats'] +_GETNODESTATSREPLY = DESCRIPTOR.message_types_by_name['GetNodeStatsReply'] +_GLOBALGCREQUEST = DESCRIPTOR.message_types_by_name['GlobalGCRequest'] +_GLOBALGCREPLY = DESCRIPTOR.message_types_by_name['GlobalGCReply'] +_FORMATGLOBALMEMORYINFOREQUEST = DESCRIPTOR.message_types_by_name['FormatGlobalMemoryInfoRequest'] +_FORMATGLOBALMEMORYINFOREPLY = DESCRIPTOR.message_types_by_name['FormatGlobalMemoryInfoReply'] +_RELEASEUNUSEDBUNDLESREQUEST = DESCRIPTOR.message_types_by_name['ReleaseUnusedBundlesRequest'] +_RELEASEUNUSEDBUNDLESREPLY = DESCRIPTOR.message_types_by_name['ReleaseUnusedBundlesReply'] +_GETSYSTEMCONFIGREQUEST = DESCRIPTOR.message_types_by_name['GetSystemConfigRequest'] +_GETSYSTEMCONFIGREPLY = DESCRIPTOR.message_types_by_name['GetSystemConfigReply'] +_GETOBJECTSINFOREQUEST = DESCRIPTOR.message_types_by_name['GetObjectsInfoRequest'] +_GETOBJECTSINFOREPLY = DESCRIPTOR.message_types_by_name['GetObjectsInfoReply'] +_GETRESOURCELOADREQUEST = DESCRIPTOR.message_types_by_name['GetResourceLoadRequest'] +_GETRESOURCELOADREPLY = DESCRIPTOR.message_types_by_name['GetResourceLoadReply'] +_CANCELTASKSWITHRESOURCESHAPESREQUEST = DESCRIPTOR.message_types_by_name['CancelTasksWithResourceShapesRequest'] +_CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE = _CANCELTASKSWITHRESOURCESHAPESREQUEST.nested_types_by_name['ResourceShape'] +_CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE_RESOURCESHAPEENTRY = _CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE.nested_types_by_name['ResourceShapeEntry'] +_CANCELTASKSWITHRESOURCESHAPESREPLY = DESCRIPTOR.message_types_by_name['CancelTasksWithResourceShapesReply'] +_NOTIFYGCSRESTARTREQUEST = DESCRIPTOR.message_types_by_name['NotifyGCSRestartRequest'] +_NOTIFYGCSRESTARTREPLY = DESCRIPTOR.message_types_by_name['NotifyGCSRestartReply'] +_GETTASKFAILURECAUSEREQUEST = DESCRIPTOR.message_types_by_name['GetTaskFailureCauseRequest'] +_GETTASKFAILURECAUSEREPLY = DESCRIPTOR.message_types_by_name['GetTaskFailureCauseReply'] +_DRAINRAYLETREQUEST = DESCRIPTOR.message_types_by_name['DrainRayletRequest'] +_DRAINRAYLETREPLY = DESCRIPTOR.message_types_by_name['DrainRayletReply'] +_REGISTERMUTABLEOBJECTREQUEST = DESCRIPTOR.message_types_by_name['RegisterMutableObjectRequest'] +_REGISTERMUTABLEOBJECTREPLY = DESCRIPTOR.message_types_by_name['RegisterMutableObjectReply'] +_PUSHMUTABLEOBJECTREQUEST = DESCRIPTOR.message_types_by_name['PushMutableObjectRequest'] +_PUSHMUTABLEOBJECTREPLY = DESCRIPTOR.message_types_by_name['PushMutableObjectReply'] +_ISLOCALWORKERDEADREQUEST = DESCRIPTOR.message_types_by_name['IsLocalWorkerDeadRequest'] +_ISLOCALWORKERDEADREPLY = DESCRIPTOR.message_types_by_name['IsLocalWorkerDeadReply'] +_REQUESTWORKERLEASEREPLY_SCHEDULINGFAILURETYPE = _REQUESTWORKERLEASEREPLY.enum_types_by_name['SchedulingFailureType'] +WorkerBacklogReport = _reflection.GeneratedProtocolMessageType('WorkerBacklogReport', (_message.Message,), { + 'DESCRIPTOR' : _WORKERBACKLOGREPORT, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerBacklogReport) + }) +_sym_db.RegisterMessage(WorkerBacklogReport) + +ReportWorkerBacklogRequest = _reflection.GeneratedProtocolMessageType('ReportWorkerBacklogRequest', (_message.Message,), { + 'DESCRIPTOR' : _REPORTWORKERBACKLOGREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportWorkerBacklogRequest) + }) +_sym_db.RegisterMessage(ReportWorkerBacklogRequest) + +ReportWorkerBacklogReply = _reflection.GeneratedProtocolMessageType('ReportWorkerBacklogReply', (_message.Message,), { + 'DESCRIPTOR' : _REPORTWORKERBACKLOGREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportWorkerBacklogReply) + }) +_sym_db.RegisterMessage(ReportWorkerBacklogReply) + +RequestWorkerLeaseRequest = _reflection.GeneratedProtocolMessageType('RequestWorkerLeaseRequest', (_message.Message,), { + 'DESCRIPTOR' : _REQUESTWORKERLEASEREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RequestWorkerLeaseRequest) + }) +_sym_db.RegisterMessage(RequestWorkerLeaseRequest) + +RequestWorkerLeaseReply = _reflection.GeneratedProtocolMessageType('RequestWorkerLeaseReply', (_message.Message,), { + 'DESCRIPTOR' : _REQUESTWORKERLEASEREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RequestWorkerLeaseReply) + }) +_sym_db.RegisterMessage(RequestWorkerLeaseReply) + +PrestartWorkersRequest = _reflection.GeneratedProtocolMessageType('PrestartWorkersRequest', (_message.Message,), { + 'DESCRIPTOR' : _PRESTARTWORKERSREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PrestartWorkersRequest) + }) +_sym_db.RegisterMessage(PrestartWorkersRequest) + +PrestartWorkersReply = _reflection.GeneratedProtocolMessageType('PrestartWorkersReply', (_message.Message,), { + 'DESCRIPTOR' : _PRESTARTWORKERSREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PrestartWorkersReply) + }) +_sym_db.RegisterMessage(PrestartWorkersReply) + +PrepareBundleResourcesRequest = _reflection.GeneratedProtocolMessageType('PrepareBundleResourcesRequest', (_message.Message,), { + 'DESCRIPTOR' : _PREPAREBUNDLERESOURCESREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PrepareBundleResourcesRequest) + }) +_sym_db.RegisterMessage(PrepareBundleResourcesRequest) + +PrepareBundleResourcesReply = _reflection.GeneratedProtocolMessageType('PrepareBundleResourcesReply', (_message.Message,), { + 'DESCRIPTOR' : _PREPAREBUNDLERESOURCESREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PrepareBundleResourcesReply) + }) +_sym_db.RegisterMessage(PrepareBundleResourcesReply) + +CommitBundleResourcesRequest = _reflection.GeneratedProtocolMessageType('CommitBundleResourcesRequest', (_message.Message,), { + 'DESCRIPTOR' : _COMMITBUNDLERESOURCESREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CommitBundleResourcesRequest) + }) +_sym_db.RegisterMessage(CommitBundleResourcesRequest) + +CommitBundleResourcesReply = _reflection.GeneratedProtocolMessageType('CommitBundleResourcesReply', (_message.Message,), { + 'DESCRIPTOR' : _COMMITBUNDLERESOURCESREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CommitBundleResourcesReply) + }) +_sym_db.RegisterMessage(CommitBundleResourcesReply) + +CancelResourceReserveRequest = _reflection.GeneratedProtocolMessageType('CancelResourceReserveRequest', (_message.Message,), { + 'DESCRIPTOR' : _CANCELRESOURCERESERVEREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelResourceReserveRequest) + }) +_sym_db.RegisterMessage(CancelResourceReserveRequest) + +CancelResourceReserveReply = _reflection.GeneratedProtocolMessageType('CancelResourceReserveReply', (_message.Message,), { + 'DESCRIPTOR' : _CANCELRESOURCERESERVEREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelResourceReserveReply) + }) +_sym_db.RegisterMessage(CancelResourceReserveReply) + +ReturnWorkerRequest = _reflection.GeneratedProtocolMessageType('ReturnWorkerRequest', (_message.Message,), { + 'DESCRIPTOR' : _RETURNWORKERREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReturnWorkerRequest) + }) +_sym_db.RegisterMessage(ReturnWorkerRequest) + +ReturnWorkerReply = _reflection.GeneratedProtocolMessageType('ReturnWorkerReply', (_message.Message,), { + 'DESCRIPTOR' : _RETURNWORKERREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReturnWorkerReply) + }) +_sym_db.RegisterMessage(ReturnWorkerReply) + +ReleaseUnusedActorWorkersRequest = _reflection.GeneratedProtocolMessageType('ReleaseUnusedActorWorkersRequest', (_message.Message,), { + 'DESCRIPTOR' : _RELEASEUNUSEDACTORWORKERSREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReleaseUnusedActorWorkersRequest) + }) +_sym_db.RegisterMessage(ReleaseUnusedActorWorkersRequest) + +ReleaseUnusedActorWorkersReply = _reflection.GeneratedProtocolMessageType('ReleaseUnusedActorWorkersReply', (_message.Message,), { + 'DESCRIPTOR' : _RELEASEUNUSEDACTORWORKERSREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReleaseUnusedActorWorkersReply) + }) +_sym_db.RegisterMessage(ReleaseUnusedActorWorkersReply) + +ShutdownRayletRequest = _reflection.GeneratedProtocolMessageType('ShutdownRayletRequest', (_message.Message,), { + 'DESCRIPTOR' : _SHUTDOWNRAYLETREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ShutdownRayletRequest) + }) +_sym_db.RegisterMessage(ShutdownRayletRequest) + +ShutdownRayletReply = _reflection.GeneratedProtocolMessageType('ShutdownRayletReply', (_message.Message,), { + 'DESCRIPTOR' : _SHUTDOWNRAYLETREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ShutdownRayletReply) + }) +_sym_db.RegisterMessage(ShutdownRayletReply) + +CancelWorkerLeaseRequest = _reflection.GeneratedProtocolMessageType('CancelWorkerLeaseRequest', (_message.Message,), { + 'DESCRIPTOR' : _CANCELWORKERLEASEREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelWorkerLeaseRequest) + }) +_sym_db.RegisterMessage(CancelWorkerLeaseRequest) + +CancelWorkerLeaseReply = _reflection.GeneratedProtocolMessageType('CancelWorkerLeaseReply', (_message.Message,), { + 'DESCRIPTOR' : _CANCELWORKERLEASEREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelWorkerLeaseReply) + }) +_sym_db.RegisterMessage(CancelWorkerLeaseReply) + +PinObjectIDsRequest = _reflection.GeneratedProtocolMessageType('PinObjectIDsRequest', (_message.Message,), { + 'DESCRIPTOR' : _PINOBJECTIDSREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PinObjectIDsRequest) + }) +_sym_db.RegisterMessage(PinObjectIDsRequest) + +PinObjectIDsReply = _reflection.GeneratedProtocolMessageType('PinObjectIDsReply', (_message.Message,), { + 'DESCRIPTOR' : _PINOBJECTIDSREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PinObjectIDsReply) + }) +_sym_db.RegisterMessage(PinObjectIDsReply) + +GetNodeStatsRequest = _reflection.GeneratedProtocolMessageType('GetNodeStatsRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETNODESTATSREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetNodeStatsRequest) + }) +_sym_db.RegisterMessage(GetNodeStatsRequest) + +ObjectStoreStats = _reflection.GeneratedProtocolMessageType('ObjectStoreStats', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTSTORESTATS, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ObjectStoreStats) + }) +_sym_db.RegisterMessage(ObjectStoreStats) + +GetNodeStatsReply = _reflection.GeneratedProtocolMessageType('GetNodeStatsReply', (_message.Message,), { + 'DESCRIPTOR' : _GETNODESTATSREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetNodeStatsReply) + }) +_sym_db.RegisterMessage(GetNodeStatsReply) + +GlobalGCRequest = _reflection.GeneratedProtocolMessageType('GlobalGCRequest', (_message.Message,), { + 'DESCRIPTOR' : _GLOBALGCREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GlobalGCRequest) + }) +_sym_db.RegisterMessage(GlobalGCRequest) + +GlobalGCReply = _reflection.GeneratedProtocolMessageType('GlobalGCReply', (_message.Message,), { + 'DESCRIPTOR' : _GLOBALGCREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GlobalGCReply) + }) +_sym_db.RegisterMessage(GlobalGCReply) + +FormatGlobalMemoryInfoRequest = _reflection.GeneratedProtocolMessageType('FormatGlobalMemoryInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _FORMATGLOBALMEMORYINFOREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.FormatGlobalMemoryInfoRequest) + }) +_sym_db.RegisterMessage(FormatGlobalMemoryInfoRequest) + +FormatGlobalMemoryInfoReply = _reflection.GeneratedProtocolMessageType('FormatGlobalMemoryInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _FORMATGLOBALMEMORYINFOREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.FormatGlobalMemoryInfoReply) + }) +_sym_db.RegisterMessage(FormatGlobalMemoryInfoReply) + +ReleaseUnusedBundlesRequest = _reflection.GeneratedProtocolMessageType('ReleaseUnusedBundlesRequest', (_message.Message,), { + 'DESCRIPTOR' : _RELEASEUNUSEDBUNDLESREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReleaseUnusedBundlesRequest) + }) +_sym_db.RegisterMessage(ReleaseUnusedBundlesRequest) + +ReleaseUnusedBundlesReply = _reflection.GeneratedProtocolMessageType('ReleaseUnusedBundlesReply', (_message.Message,), { + 'DESCRIPTOR' : _RELEASEUNUSEDBUNDLESREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReleaseUnusedBundlesReply) + }) +_sym_db.RegisterMessage(ReleaseUnusedBundlesReply) + +GetSystemConfigRequest = _reflection.GeneratedProtocolMessageType('GetSystemConfigRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETSYSTEMCONFIGREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetSystemConfigRequest) + }) +_sym_db.RegisterMessage(GetSystemConfigRequest) + +GetSystemConfigReply = _reflection.GeneratedProtocolMessageType('GetSystemConfigReply', (_message.Message,), { + 'DESCRIPTOR' : _GETSYSTEMCONFIGREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetSystemConfigReply) + }) +_sym_db.RegisterMessage(GetSystemConfigReply) + +GetObjectsInfoRequest = _reflection.GeneratedProtocolMessageType('GetObjectsInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETOBJECTSINFOREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetObjectsInfoRequest) + }) +_sym_db.RegisterMessage(GetObjectsInfoRequest) + +GetObjectsInfoReply = _reflection.GeneratedProtocolMessageType('GetObjectsInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _GETOBJECTSINFOREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetObjectsInfoReply) + }) +_sym_db.RegisterMessage(GetObjectsInfoReply) + +GetResourceLoadRequest = _reflection.GeneratedProtocolMessageType('GetResourceLoadRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETRESOURCELOADREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetResourceLoadRequest) + }) +_sym_db.RegisterMessage(GetResourceLoadRequest) + +GetResourceLoadReply = _reflection.GeneratedProtocolMessageType('GetResourceLoadReply', (_message.Message,), { + 'DESCRIPTOR' : _GETRESOURCELOADREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetResourceLoadReply) + }) +_sym_db.RegisterMessage(GetResourceLoadReply) + +CancelTasksWithResourceShapesRequest = _reflection.GeneratedProtocolMessageType('CancelTasksWithResourceShapesRequest', (_message.Message,), { + + 'ResourceShape' : _reflection.GeneratedProtocolMessageType('ResourceShape', (_message.Message,), { + + 'ResourceShapeEntry' : _reflection.GeneratedProtocolMessageType('ResourceShapeEntry', (_message.Message,), { + 'DESCRIPTOR' : _CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE_RESOURCESHAPEENTRY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelTasksWithResourceShapesRequest.ResourceShape.ResourceShapeEntry) + }) + , + 'DESCRIPTOR' : _CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelTasksWithResourceShapesRequest.ResourceShape) + }) + , + 'DESCRIPTOR' : _CANCELTASKSWITHRESOURCESHAPESREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelTasksWithResourceShapesRequest) + }) +_sym_db.RegisterMessage(CancelTasksWithResourceShapesRequest) +_sym_db.RegisterMessage(CancelTasksWithResourceShapesRequest.ResourceShape) +_sym_db.RegisterMessage(CancelTasksWithResourceShapesRequest.ResourceShape.ResourceShapeEntry) + +CancelTasksWithResourceShapesReply = _reflection.GeneratedProtocolMessageType('CancelTasksWithResourceShapesReply', (_message.Message,), { + 'DESCRIPTOR' : _CANCELTASKSWITHRESOURCESHAPESREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CancelTasksWithResourceShapesReply) + }) +_sym_db.RegisterMessage(CancelTasksWithResourceShapesReply) + +NotifyGCSRestartRequest = _reflection.GeneratedProtocolMessageType('NotifyGCSRestartRequest', (_message.Message,), { + 'DESCRIPTOR' : _NOTIFYGCSRESTARTREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NotifyGCSRestartRequest) + }) +_sym_db.RegisterMessage(NotifyGCSRestartRequest) + +NotifyGCSRestartReply = _reflection.GeneratedProtocolMessageType('NotifyGCSRestartReply', (_message.Message,), { + 'DESCRIPTOR' : _NOTIFYGCSRESTARTREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.NotifyGCSRestartReply) + }) +_sym_db.RegisterMessage(NotifyGCSRestartReply) + +GetTaskFailureCauseRequest = _reflection.GeneratedProtocolMessageType('GetTaskFailureCauseRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETTASKFAILURECAUSEREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskFailureCauseRequest) + }) +_sym_db.RegisterMessage(GetTaskFailureCauseRequest) + +GetTaskFailureCauseReply = _reflection.GeneratedProtocolMessageType('GetTaskFailureCauseReply', (_message.Message,), { + 'DESCRIPTOR' : _GETTASKFAILURECAUSEREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTaskFailureCauseReply) + }) +_sym_db.RegisterMessage(GetTaskFailureCauseReply) + +DrainRayletRequest = _reflection.GeneratedProtocolMessageType('DrainRayletRequest', (_message.Message,), { + 'DESCRIPTOR' : _DRAINRAYLETREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DrainRayletRequest) + }) +_sym_db.RegisterMessage(DrainRayletRequest) + +DrainRayletReply = _reflection.GeneratedProtocolMessageType('DrainRayletReply', (_message.Message,), { + 'DESCRIPTOR' : _DRAINRAYLETREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DrainRayletReply) + }) +_sym_db.RegisterMessage(DrainRayletReply) + +RegisterMutableObjectRequest = _reflection.GeneratedProtocolMessageType('RegisterMutableObjectRequest', (_message.Message,), { + 'DESCRIPTOR' : _REGISTERMUTABLEOBJECTREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RegisterMutableObjectRequest) + }) +_sym_db.RegisterMessage(RegisterMutableObjectRequest) + +RegisterMutableObjectReply = _reflection.GeneratedProtocolMessageType('RegisterMutableObjectReply', (_message.Message,), { + 'DESCRIPTOR' : _REGISTERMUTABLEOBJECTREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RegisterMutableObjectReply) + }) +_sym_db.RegisterMessage(RegisterMutableObjectReply) + +PushMutableObjectRequest = _reflection.GeneratedProtocolMessageType('PushMutableObjectRequest', (_message.Message,), { + 'DESCRIPTOR' : _PUSHMUTABLEOBJECTREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PushMutableObjectRequest) + }) +_sym_db.RegisterMessage(PushMutableObjectRequest) + +PushMutableObjectReply = _reflection.GeneratedProtocolMessageType('PushMutableObjectReply', (_message.Message,), { + 'DESCRIPTOR' : _PUSHMUTABLEOBJECTREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PushMutableObjectReply) + }) +_sym_db.RegisterMessage(PushMutableObjectReply) + +IsLocalWorkerDeadRequest = _reflection.GeneratedProtocolMessageType('IsLocalWorkerDeadRequest', (_message.Message,), { + 'DESCRIPTOR' : _ISLOCALWORKERDEADREQUEST, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.IsLocalWorkerDeadRequest) + }) +_sym_db.RegisterMessage(IsLocalWorkerDeadRequest) + +IsLocalWorkerDeadReply = _reflection.GeneratedProtocolMessageType('IsLocalWorkerDeadReply', (_message.Message,), { + 'DESCRIPTOR' : _ISLOCALWORKERDEADREPLY, + '__module__' : 'src.ray.protobuf.node_manager_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.IsLocalWorkerDeadReply) + }) +_sym_db.RegisterMessage(IsLocalWorkerDeadReply) + +_NODEMANAGERSERVICE = DESCRIPTOR.services_by_name['NodeManagerService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE_RESOURCESHAPEENTRY._options = None + _CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE_RESOURCESHAPEENTRY._serialized_options = b'8\001' + _WORKERBACKLOGREPORT._serialized_start=185 + _WORKERBACKLOGREPORT._serialized_end=297 + _REPORTWORKERBACKLOGREQUEST._serialized_start=300 + _REPORTWORKERBACKLOGREQUEST._serialized_end=428 + _REPORTWORKERBACKLOGREPLY._serialized_start=430 + _REPORTWORKERBACKLOGREPLY._serialized_end=456 + _REQUESTWORKERLEASEREQUEST._serialized_start=459 + _REQUESTWORKERLEASEREQUEST._serialized_end=683 + _REQUESTWORKERLEASEREPLY._serialized_start=686 + _REQUESTWORKERLEASEREPLY._serialized_end=1455 + _REQUESTWORKERLEASEREPLY_SCHEDULINGFAILURETYPE._serialized_start=1217 + _REQUESTWORKERLEASEREPLY_SCHEDULINGFAILURETYPE._serialized_end=1455 + _PRESTARTWORKERSREQUEST._serialized_start=1458 + _PRESTARTWORKERSREQUEST._serialized_end=1725 + _PRESTARTWORKERSREPLY._serialized_start=1727 + _PRESTARTWORKERSREPLY._serialized_end=1749 + _PREPAREBUNDLERESOURCESREQUEST._serialized_start=1751 + _PREPAREBUNDLERESOURCESREQUEST._serialized_end=1834 + _PREPAREBUNDLERESOURCESREPLY._serialized_start=1836 + _PREPAREBUNDLERESOURCESREPLY._serialized_end=1891 + _COMMITBUNDLERESOURCESREQUEST._serialized_start=1893 + _COMMITBUNDLERESOURCESREQUEST._serialized_end=1975 + _COMMITBUNDLERESOURCESREPLY._serialized_start=1977 + _COMMITBUNDLERESOURCESREPLY._serialized_end=2005 + _CANCELRESOURCERESERVEREQUEST._serialized_start=2007 + _CANCELRESOURCERESERVEREQUEST._serialized_end=2087 + _CANCELRESOURCERESERVEREPLY._serialized_start=2089 + _CANCELRESOURCERESERVEREPLY._serialized_end=2117 + _RETURNWORKERREQUEST._serialized_start=2120 + _RETURNWORKERREQUEST._serialized_end=2356 + _RETURNWORKERREPLY._serialized_start=2358 + _RETURNWORKERREPLY._serialized_end=2377 + _RELEASEUNUSEDACTORWORKERSREQUEST._serialized_start=2379 + _RELEASEUNUSEDACTORWORKERSREQUEST._serialized_end=2456 + _RELEASEUNUSEDACTORWORKERSREPLY._serialized_start=2458 + _RELEASEUNUSEDACTORWORKERSREPLY._serialized_end=2490 + _SHUTDOWNRAYLETREQUEST._serialized_start=2492 + _SHUTDOWNRAYLETREQUEST._serialized_end=2543 + _SHUTDOWNRAYLETREPLY._serialized_start=2545 + _SHUTDOWNRAYLETREPLY._serialized_end=2566 + _CANCELWORKERLEASEREQUEST._serialized_start=2568 + _CANCELWORKERLEASEREQUEST._serialized_end=2619 + _CANCELWORKERLEASEREPLY._serialized_start=2621 + _CANCELWORKERLEASEREPLY._serialized_end=2671 + _PINOBJECTIDSREQUEST._serialized_start=2674 + _PINOBJECTIDSREQUEST._serialized_end=2838 + _PINOBJECTIDSREPLY._serialized_start=2840 + _PINOBJECTIDSREPLY._serialized_end=2889 + _GETNODESTATSREQUEST._serialized_start=2891 + _GETNODESTATSREQUEST._serialized_end=2960 + _OBJECTSTORESTATS._serialized_start=2963 + _OBJECTSTORESTATS._serialized_end=3806 + _GETNODESTATSREPLY._serialized_start=3809 + _GETNODESTATSREPLY._serialized_end=3993 + _GLOBALGCREQUEST._serialized_start=3995 + _GLOBALGCREQUEST._serialized_end=4012 + _GLOBALGCREPLY._serialized_start=4014 + _GLOBALGCREPLY._serialized_end=4029 + _FORMATGLOBALMEMORYINFOREQUEST._serialized_start=4031 + _FORMATGLOBALMEMORYINFOREQUEST._serialized_end=4110 + _FORMATGLOBALMEMORYINFOREPLY._serialized_start=4113 + _FORMATGLOBALMEMORYINFOREPLY._serialized_end=4241 + _RELEASEUNUSEDBUNDLESREQUEST._serialized_start=4243 + _RELEASEUNUSEDBUNDLESREQUEST._serialized_end=4327 + _RELEASEUNUSEDBUNDLESREPLY._serialized_start=4329 + _RELEASEUNUSEDBUNDLESREPLY._serialized_end=4356 + _GETSYSTEMCONFIGREQUEST._serialized_start=4358 + _GETSYSTEMCONFIGREQUEST._serialized_end=4382 + _GETSYSTEMCONFIGREPLY._serialized_start=4384 + _GETSYSTEMCONFIGREPLY._serialized_end=4443 + _GETOBJECTSINFOREQUEST._serialized_start=4445 + _GETOBJECTSINFOREQUEST._serialized_end=4505 + _GETOBJECTSINFOREPLY._serialized_start=4507 + _GETOBJECTSINFOREPLY._serialized_end=4622 + _GETRESOURCELOADREQUEST._serialized_start=4624 + _GETRESOURCELOADREQUEST._serialized_end=4648 + _GETRESOURCELOADREPLY._serialized_start=4650 + _GETRESOURCELOADREPLY._serialized_end=4726 + _CANCELTASKSWITHRESOURCESHAPESREQUEST._serialized_start=4729 + _CANCELTASKSWITHRESOURCESHAPESREQUEST._serialized_end=5072 + _CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE._serialized_start=4872 + _CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE._serialized_end=5072 + _CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE_RESOURCESHAPEENTRY._serialized_start=5008 + _CANCELTASKSWITHRESOURCESHAPESREQUEST_RESOURCESHAPE_RESOURCESHAPEENTRY._serialized_end=5072 + _CANCELTASKSWITHRESOURCESHAPESREPLY._serialized_start=5074 + _CANCELTASKSWITHRESOURCESHAPESREPLY._serialized_end=5110 + _NOTIFYGCSRESTARTREQUEST._serialized_start=5112 + _NOTIFYGCSRESTARTREQUEST._serialized_end=5137 + _NOTIFYGCSRESTARTREPLY._serialized_start=5139 + _NOTIFYGCSRESTARTREPLY._serialized_end=5162 + _GETTASKFAILURECAUSEREQUEST._serialized_start=5164 + _GETTASKFAILURECAUSEREQUEST._serialized_end=5217 + _GETTASKFAILURECAUSEREPLY._serialized_start=5220 + _GETTASKFAILURECAUSEREPLY._serialized_end=5381 + _DRAINRAYLETREQUEST._serialized_start=5384 + _DRAINRAYLETREQUEST._serialized_end=5556 + _DRAINRAYLETREPLY._serialized_start=5558 + _DRAINRAYLETREPLY._serialized_end=5667 + _REGISTERMUTABLEOBJECTREQUEST._serialized_start=5670 + _REGISTERMUTABLEOBJECTREQUEST._serialized_end=5817 + _REGISTERMUTABLEOBJECTREPLY._serialized_start=5819 + _REGISTERMUTABLEOBJECTREPLY._serialized_end=5847 + _PUSHMUTABLEOBJECTREQUEST._serialized_start=5850 + _PUSHMUTABLEOBJECTREQUEST._serialized_end=6109 + _PUSHMUTABLEOBJECTREPLY._serialized_start=6111 + _PUSHMUTABLEOBJECTREPLY._serialized_end=6155 + _ISLOCALWORKERDEADREQUEST._serialized_start=6157 + _ISLOCALWORKERDEADREQUEST._serialized_end=6212 + _ISLOCALWORKERDEADREPLY._serialized_start=6214 + _ISLOCALWORKERDEADREPLY._serialized_end=6263 + _NODEMANAGERSERVICE._serialized_start=6266 + _NODEMANAGERSERVICE._serialized_end=8532 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/node_manager_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/node_manager_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..0f2650760e4f3ddf07cd170903a8fc99a2f5f3e9 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/node_manager_pb2_grpc.py @@ -0,0 +1,858 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import node_manager_pb2 as src_dot_ray_dot_protobuf_dot_node__manager__pb2 + + +class NodeManagerServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.NotifyGCSRestart = channel.unary_unary( + '/ray.rpc.NodeManagerService/NotifyGCSRestart', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.NotifyGCSRestartRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.NotifyGCSRestartReply.FromString, + ) + self.GetResourceLoad = channel.unary_unary( + '/ray.rpc.NodeManagerService/GetResourceLoad', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetResourceLoadRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetResourceLoadReply.FromString, + ) + self.CancelTasksWithResourceShapes = channel.unary_unary( + '/ray.rpc.NodeManagerService/CancelTasksWithResourceShapes', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelTasksWithResourceShapesRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelTasksWithResourceShapesReply.FromString, + ) + self.RequestWorkerLease = channel.unary_unary( + '/ray.rpc.NodeManagerService/RequestWorkerLease', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseReply.FromString, + ) + self.PrestartWorkers = channel.unary_unary( + '/ray.rpc.NodeManagerService/PrestartWorkers', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrestartWorkersRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrestartWorkersReply.FromString, + ) + self.ReportWorkerBacklog = channel.unary_unary( + '/ray.rpc.NodeManagerService/ReportWorkerBacklog', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReportWorkerBacklogRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReportWorkerBacklogReply.FromString, + ) + self.ReturnWorker = channel.unary_unary( + '/ray.rpc.NodeManagerService/ReturnWorker', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerReply.FromString, + ) + self.ReleaseUnusedActorWorkers = channel.unary_unary( + '/ray.rpc.NodeManagerService/ReleaseUnusedActorWorkers', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedActorWorkersRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedActorWorkersReply.FromString, + ) + self.ShutdownRaylet = channel.unary_unary( + '/ray.rpc.NodeManagerService/ShutdownRaylet', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ShutdownRayletRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ShutdownRayletReply.FromString, + ) + self.DrainRaylet = channel.unary_unary( + '/ray.rpc.NodeManagerService/DrainRaylet', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.DrainRayletRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.DrainRayletReply.FromString, + ) + self.PrepareBundleResources = channel.unary_unary( + '/ray.rpc.NodeManagerService/PrepareBundleResources', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesReply.FromString, + ) + self.CommitBundleResources = channel.unary_unary( + '/ray.rpc.NodeManagerService/CommitBundleResources', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesReply.FromString, + ) + self.CancelResourceReserve = channel.unary_unary( + '/ray.rpc.NodeManagerService/CancelResourceReserve', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveReply.FromString, + ) + self.CancelWorkerLease = channel.unary_unary( + '/ray.rpc.NodeManagerService/CancelWorkerLease', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseReply.FromString, + ) + self.PinObjectIDs = channel.unary_unary( + '/ray.rpc.NodeManagerService/PinObjectIDs', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsReply.FromString, + ) + self.GetNodeStats = channel.unary_unary( + '/ray.rpc.NodeManagerService/GetNodeStats', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsReply.FromString, + ) + self.GlobalGC = channel.unary_unary( + '/ray.rpc.NodeManagerService/GlobalGC', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCReply.FromString, + ) + self.FormatGlobalMemoryInfo = channel.unary_unary( + '/ray.rpc.NodeManagerService/FormatGlobalMemoryInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoReply.FromString, + ) + self.ReleaseUnusedBundles = channel.unary_unary( + '/ray.rpc.NodeManagerService/ReleaseUnusedBundles', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesReply.FromString, + ) + self.GetSystemConfig = channel.unary_unary( + '/ray.rpc.NodeManagerService/GetSystemConfig', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigReply.FromString, + ) + self.GetObjectsInfo = channel.unary_unary( + '/ray.rpc.NodeManagerService/GetObjectsInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetObjectsInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetObjectsInfoReply.FromString, + ) + self.GetTaskFailureCause = channel.unary_unary( + '/ray.rpc.NodeManagerService/GetTaskFailureCause', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetTaskFailureCauseRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetTaskFailureCauseReply.FromString, + ) + self.RegisterMutableObject = channel.unary_unary( + '/ray.rpc.NodeManagerService/RegisterMutableObject', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RegisterMutableObjectRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RegisterMutableObjectReply.FromString, + ) + self.PushMutableObject = channel.unary_unary( + '/ray.rpc.NodeManagerService/PushMutableObject', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PushMutableObjectRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PushMutableObjectReply.FromString, + ) + self.IsLocalWorkerDead = channel.unary_unary( + '/ray.rpc.NodeManagerService/IsLocalWorkerDead', + request_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.IsLocalWorkerDeadRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.IsLocalWorkerDeadReply.FromString, + ) + + +class NodeManagerServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def NotifyGCSRestart(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetResourceLoad(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CancelTasksWithResourceShapes(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RequestWorkerLease(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PrestartWorkers(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReportWorkerBacklog(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReturnWorker(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReleaseUnusedActorWorkers(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ShutdownRaylet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DrainRaylet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PrepareBundleResources(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CommitBundleResources(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CancelResourceReserve(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CancelWorkerLease(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PinObjectIDs(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetNodeStats(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GlobalGC(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def FormatGlobalMemoryInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReleaseUnusedBundles(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetSystemConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetObjectsInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTaskFailureCause(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RegisterMutableObject(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PushMutableObject(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def IsLocalWorkerDead(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_NodeManagerServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'NotifyGCSRestart': grpc.unary_unary_rpc_method_handler( + servicer.NotifyGCSRestart, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.NotifyGCSRestartRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.NotifyGCSRestartReply.SerializeToString, + ), + 'GetResourceLoad': grpc.unary_unary_rpc_method_handler( + servicer.GetResourceLoad, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetResourceLoadRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetResourceLoadReply.SerializeToString, + ), + 'CancelTasksWithResourceShapes': grpc.unary_unary_rpc_method_handler( + servicer.CancelTasksWithResourceShapes, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelTasksWithResourceShapesRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelTasksWithResourceShapesReply.SerializeToString, + ), + 'RequestWorkerLease': grpc.unary_unary_rpc_method_handler( + servicer.RequestWorkerLease, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseReply.SerializeToString, + ), + 'PrestartWorkers': grpc.unary_unary_rpc_method_handler( + servicer.PrestartWorkers, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrestartWorkersRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrestartWorkersReply.SerializeToString, + ), + 'ReportWorkerBacklog': grpc.unary_unary_rpc_method_handler( + servicer.ReportWorkerBacklog, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReportWorkerBacklogRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReportWorkerBacklogReply.SerializeToString, + ), + 'ReturnWorker': grpc.unary_unary_rpc_method_handler( + servicer.ReturnWorker, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerReply.SerializeToString, + ), + 'ReleaseUnusedActorWorkers': grpc.unary_unary_rpc_method_handler( + servicer.ReleaseUnusedActorWorkers, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedActorWorkersRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedActorWorkersReply.SerializeToString, + ), + 'ShutdownRaylet': grpc.unary_unary_rpc_method_handler( + servicer.ShutdownRaylet, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ShutdownRayletRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ShutdownRayletReply.SerializeToString, + ), + 'DrainRaylet': grpc.unary_unary_rpc_method_handler( + servicer.DrainRaylet, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.DrainRayletRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.DrainRayletReply.SerializeToString, + ), + 'PrepareBundleResources': grpc.unary_unary_rpc_method_handler( + servicer.PrepareBundleResources, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesReply.SerializeToString, + ), + 'CommitBundleResources': grpc.unary_unary_rpc_method_handler( + servicer.CommitBundleResources, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesReply.SerializeToString, + ), + 'CancelResourceReserve': grpc.unary_unary_rpc_method_handler( + servicer.CancelResourceReserve, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveReply.SerializeToString, + ), + 'CancelWorkerLease': grpc.unary_unary_rpc_method_handler( + servicer.CancelWorkerLease, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseReply.SerializeToString, + ), + 'PinObjectIDs': grpc.unary_unary_rpc_method_handler( + servicer.PinObjectIDs, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsReply.SerializeToString, + ), + 'GetNodeStats': grpc.unary_unary_rpc_method_handler( + servicer.GetNodeStats, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsReply.SerializeToString, + ), + 'GlobalGC': grpc.unary_unary_rpc_method_handler( + servicer.GlobalGC, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCReply.SerializeToString, + ), + 'FormatGlobalMemoryInfo': grpc.unary_unary_rpc_method_handler( + servicer.FormatGlobalMemoryInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoReply.SerializeToString, + ), + 'ReleaseUnusedBundles': grpc.unary_unary_rpc_method_handler( + servicer.ReleaseUnusedBundles, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesReply.SerializeToString, + ), + 'GetSystemConfig': grpc.unary_unary_rpc_method_handler( + servicer.GetSystemConfig, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigReply.SerializeToString, + ), + 'GetObjectsInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetObjectsInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetObjectsInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetObjectsInfoReply.SerializeToString, + ), + 'GetTaskFailureCause': grpc.unary_unary_rpc_method_handler( + servicer.GetTaskFailureCause, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetTaskFailureCauseRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetTaskFailureCauseReply.SerializeToString, + ), + 'RegisterMutableObject': grpc.unary_unary_rpc_method_handler( + servicer.RegisterMutableObject, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RegisterMutableObjectRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.RegisterMutableObjectReply.SerializeToString, + ), + 'PushMutableObject': grpc.unary_unary_rpc_method_handler( + servicer.PushMutableObject, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PushMutableObjectRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.PushMutableObjectReply.SerializeToString, + ), + 'IsLocalWorkerDead': grpc.unary_unary_rpc_method_handler( + servicer.IsLocalWorkerDead, + request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.IsLocalWorkerDeadRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2.IsLocalWorkerDeadReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.NodeManagerService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class NodeManagerService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def NotifyGCSRestart(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/NotifyGCSRestart', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.NotifyGCSRestartRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.NotifyGCSRestartReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetResourceLoad(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/GetResourceLoad', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetResourceLoadRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetResourceLoadReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CancelTasksWithResourceShapes(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/CancelTasksWithResourceShapes', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelTasksWithResourceShapesRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelTasksWithResourceShapesReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RequestWorkerLease(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/RequestWorkerLease', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.RequestWorkerLeaseReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PrestartWorkers(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/PrestartWorkers', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrestartWorkersRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrestartWorkersReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReportWorkerBacklog(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/ReportWorkerBacklog', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReportWorkerBacklogRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReportWorkerBacklogReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReturnWorker(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/ReturnWorker', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReturnWorkerReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReleaseUnusedActorWorkers(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/ReleaseUnusedActorWorkers', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedActorWorkersRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedActorWorkersReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ShutdownRaylet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/ShutdownRaylet', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ShutdownRayletRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ShutdownRayletReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DrainRaylet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/DrainRaylet', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.DrainRayletRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.DrainRayletReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PrepareBundleResources(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/PrepareBundleResources', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.PrepareBundleResourcesReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CommitBundleResources(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/CommitBundleResources', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.CommitBundleResourcesReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CancelResourceReserve(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/CancelResourceReserve', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelResourceReserveReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CancelWorkerLease(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/CancelWorkerLease', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.CancelWorkerLeaseReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PinObjectIDs(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/PinObjectIDs', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.PinObjectIDsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetNodeStats(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/GetNodeStats', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetNodeStatsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GlobalGC(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/GlobalGC', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GlobalGCReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def FormatGlobalMemoryInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/FormatGlobalMemoryInfo', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.FormatGlobalMemoryInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReleaseUnusedBundles(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/ReleaseUnusedBundles', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.ReleaseUnusedBundlesReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetSystemConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/GetSystemConfig', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetSystemConfigReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetObjectsInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/GetObjectsInfo', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetObjectsInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetObjectsInfoReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetTaskFailureCause(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/GetTaskFailureCause', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetTaskFailureCauseRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.GetTaskFailureCauseReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RegisterMutableObject(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/RegisterMutableObject', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.RegisterMutableObjectRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.RegisterMutableObjectReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PushMutableObject(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/PushMutableObject', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.PushMutableObjectRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.PushMutableObjectReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def IsLocalWorkerDead(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.NodeManagerService/IsLocalWorkerDead', + src_dot_ray_dot_protobuf_dot_node__manager__pb2.IsLocalWorkerDeadRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_node__manager__pb2.IsLocalWorkerDeadReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/profile_events_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/profile_events_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..0a503cd01fc6635fc5c8a7b48f53e94da3c90a07 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/profile_events_pb2.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/profile_events.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%src/ray/protobuf/profile_events.proto\x12\x07ray.rpc\"\x9f\x01\n\x11ProfileEventEntry\x12\x1d\n\nstart_time\x18\x01 \x01(\x03R\tstartTime\x12\x19\n\x08\x65nd_time\x18\x02 \x01(\x03R\x07\x65ndTime\x12\"\n\nextra_data\x18\x03 \x01(\tH\x00R\textraData\x88\x01\x01\x12\x1d\n\nevent_name\x18\x04 \x01(\tR\teventNameB\r\n\x0b_extra_data\"\xb5\x01\n\rProfileEvents\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12!\n\x0c\x63omponent_id\x18\x02 \x01(\x0cR\x0b\x63omponentId\x12&\n\x0fnode_ip_address\x18\x03 \x01(\tR\rnodeIpAddress\x12\x32\n\x06\x65vents\x18\x04 \x03(\x0b\x32\x1a.ray.rpc.ProfileEventEntryR\x06\x65ventsB\x1a\n\x18io.ray.runtime.generatedb\x06proto3') + + + +_PROFILEEVENTENTRY = DESCRIPTOR.message_types_by_name['ProfileEventEntry'] +_PROFILEEVENTS = DESCRIPTOR.message_types_by_name['ProfileEvents'] +ProfileEventEntry = _reflection.GeneratedProtocolMessageType('ProfileEventEntry', (_message.Message,), { + 'DESCRIPTOR' : _PROFILEEVENTENTRY, + '__module__' : 'src.ray.protobuf.profile_events_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ProfileEventEntry) + }) +_sym_db.RegisterMessage(ProfileEventEntry) + +ProfileEvents = _reflection.GeneratedProtocolMessageType('ProfileEvents', (_message.Message,), { + 'DESCRIPTOR' : _PROFILEEVENTS, + '__module__' : 'src.ray.protobuf.profile_events_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ProfileEvents) + }) +_sym_db.RegisterMessage(ProfileEvents) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\030io.ray.runtime.generated' + _PROFILEEVENTENTRY._serialized_start=51 + _PROFILEEVENTENTRY._serialized_end=210 + _PROFILEEVENTS._serialized_start=213 + _PROFILEEVENTS._serialized_end=394 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/profile_events_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/profile_events_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/profile_events_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/pubsub_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/pubsub_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..fa27c4cbe0af1509816ce7c151a937ecb65fbae3 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/pubsub_pb2.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/pubsub.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import common_pb2 as src_dot_ray_dot_protobuf_dot_common__pb2 +from . import gcs_pb2 as src_dot_ray_dot_protobuf_dot_gcs__pb2 +from . import logging_pb2 as src_dot_ray_dot_protobuf_dot_logging__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dsrc/ray/protobuf/pubsub.proto\x12\x07ray.rpc\x1a\x1dsrc/ray/protobuf/common.proto\x1a\x1asrc/ray/protobuf/gcs.proto\x1a\x1esrc/ray/protobuf/logging.proto\"\x92\x08\n\nPubMessage\x12\x37\n\x0c\x63hannel_type\x18\x01 \x01(\x0e\x32\x14.ray.rpc.ChannelTypeR\x0b\x63hannelType\x12\x15\n\x06key_id\x18\x02 \x01(\x0cR\x05keyId\x12k\n\x1eworker_object_eviction_message\x18\x03 \x01(\x0b\x32$.ray.rpc.WorkerObjectEvictionMessageH\x00R\x1bworkerObjectEvictionMessage\x12_\n\x1aworker_ref_removed_message\x18\x04 \x01(\x0b\x32 .ray.rpc.WorkerRefRemovedMessageH\x00R\x17workerRefRemovedMessage\x12q\n\x1fworker_object_locations_message\x18\x05 \x01(\x0b\x32(.ray.rpc.WorkerObjectLocationsPubMessageH\x00R\x1cworkerObjectLocationsMessage\x12>\n\ractor_message\x18\x07 \x01(\x0b\x32\x17.ray.rpc.ActorTableDataH\x00R\x0c\x61\x63torMessage\x12\x38\n\x0bjob_message\x18\x08 \x01(\x0b\x32\x15.ray.rpc.JobTableDataH\x00R\njobMessage\x12\x42\n\x11node_info_message\x18\t \x01(\x0b\x32\x14.ray.rpc.GcsNodeInfoH\x00R\x0fnodeInfoMessage\x12L\n\x14worker_delta_message\x18\x0b \x01(\x0b\x32\x18.ray.rpc.WorkerDeltaDataH\x00R\x12workerDeltaMessage\x12G\n\x12\x65rror_info_message\x18\x0c \x01(\x0b\x32\x17.ray.rpc.ErrorTableDataH\x00R\x10\x65rrorInfoMessage\x12?\n\x11log_batch_message\x18\r \x01(\x0b\x32\x11.ray.rpc.LogBatchH\x00R\x0flogBatchMessage\x12[\n\x1bnode_resource_usage_message\x18\x0f \x01(\x0b\x32\x1a.ray.rpc.NodeResourceUsageH\x00R\x18nodeResourceUsageMessage\x12\x42\n\x0f\x66\x61ilure_message\x18\x06 \x01(\x0b\x32\x17.ray.rpc.FailureMessageH\x00R\x0e\x66\x61ilureMessage\x12\x1f\n\x0bsequence_id\x18\x10 \x01(\x03R\nsequenceIdB\x0f\n\rinner_messageJ\x04\x08\n\x10\x0bJ\x04\x08\x0e\x10\x0f\":\n\x1bWorkerObjectEvictionMessage\x12\x1b\n\tobject_id\x18\x01 \x01(\x0cR\x08objectId\"]\n\x17WorkerRefRemovedMessage\x12\x42\n\rborrowed_refs\x18\x01 \x03(\x0b\x32\x1d.ray.rpc.ObjectReferenceCountR\x0c\x62orrowedRefs\"\xb7\x02\n\x1fWorkerObjectLocationsPubMessage\x12\x19\n\x08node_ids\x18\x01 \x03(\x0cR\x07nodeIds\x12\x1f\n\x0bobject_size\x18\x02 \x01(\x04R\nobjectSize\x12\x1f\n\x0bspilled_url\x18\x03 \x01(\tR\nspilledUrl\x12&\n\x0fspilled_node_id\x18\x04 \x01(\x0cR\rspilledNodeId\x12&\n\x0fprimary_node_id\x18\x06 \x01(\x0cR\rprimaryNodeId\x12\x1f\n\x0bref_removed\x18\x07 \x01(\x08R\nrefRemoved\x12)\n\x10pending_creation\x18\x08 \x01(\x08R\x0fpendingCreation\x12\x1b\n\tdid_spill\x18\t \x01(\x08R\x08\x64idSpill\"\x10\n\x0e\x46\x61ilureMessage\"\x87\x02\n\x07\x43ommand\x12\x37\n\x0c\x63hannel_type\x18\x01 \x01(\x0e\x32\x14.ray.rpc.ChannelTypeR\x0b\x63hannelType\x12\x15\n\x06key_id\x18\x02 \x01(\x0cR\x05keyId\x12N\n\x13unsubscribe_message\x18\x03 \x01(\x0b\x32\x1b.ray.rpc.UnsubscribeMessageH\x00R\x12unsubscribeMessage\x12\x42\n\x11subscribe_message\x18\x04 \x01(\x0b\x32\x13.ray.rpc.SubMessageH\x00R\x10subscribeMessageB\x18\n\x16\x63ommand_message_one_of\"\x14\n\x12UnsubscribeMessage\"\xe9\x02\n\nSubMessage\x12n\n\x1eworker_object_eviction_message\x18\x01 \x01(\x0b\x32\'.ray.rpc.WorkerObjectEvictionSubMessageH\x00R\x1bworkerObjectEvictionMessage\x12\x62\n\x1aworker_ref_removed_message\x18\x02 \x01(\x0b\x32#.ray.rpc.WorkerRefRemovedSubMessageH\x00R\x17workerRefRemovedMessage\x12q\n\x1fworker_object_locations_message\x18\x03 \x01(\x0b\x32(.ray.rpc.WorkerObjectLocationsSubMessageH\x00R\x1cworkerObjectLocationsMessageB\x14\n\x12sub_message_one_of\"\xe5\x01\n\x1eWorkerObjectEvictionSubMessage\x12,\n\x12intended_worker_id\x18\x01 \x01(\x0cR\x10intendedWorkerId\x12\x1b\n\tobject_id\x18\x02 \x01(\x0cR\x08objectId\x12?\n\x12subscriber_address\x18\x03 \x01(\x0b\x32\x10.ray.rpc.AddressR\x11subscriberAddress\x12&\n\x0cgenerator_id\x18\x04 \x01(\x0cH\x00R\x0bgeneratorId\x88\x01\x01\x42\x0f\n\r_generator_id\"\xdc\x01\n\x1aWorkerRefRemovedSubMessage\x12,\n\x12intended_worker_id\x18\x01 \x01(\x0cR\x10intendedWorkerId\x12\x36\n\treference\x18\x02 \x01(\x0b\x32\x18.ray.rpc.ObjectReferenceR\treference\x12&\n\x0f\x63ontained_in_id\x18\x03 \x01(\x0cR\rcontainedInId\x12\x30\n\x14subscriber_worker_id\x18\x04 \x01(\x0cR\x12subscriberWorkerId\"l\n\x1fWorkerObjectLocationsSubMessage\x12,\n\x12intended_worker_id\x18\x01 \x01(\x0cR\x10intendedWorkerId\x12\x1b\n\tobject_id\x18\x02 \x01(\x0cR\x08objectId\"\x9d\x01\n\x18PubsubLongPollingRequest\x12#\n\rsubscriber_id\x18\x01 \x01(\x0cR\x0csubscriberId\x12\x39\n\x19max_processed_sequence_id\x18\x02 \x01(\x03R\x16maxProcessedSequenceId\x12!\n\x0cpublisher_id\x18\x03 \x01(\x0cR\x0bpublisherId\"s\n\x16PubsubLongPollingReply\x12\x36\n\x0cpub_messages\x18\x01 \x03(\x0b\x32\x13.ray.rpc.PubMessageR\x0bpubMessages\x12!\n\x0cpublisher_id\x18\x02 \x01(\x0cR\x0bpublisherId\"n\n\x19PubsubCommandBatchRequest\x12#\n\rsubscriber_id\x18\x01 \x01(\x0cR\x0csubscriberId\x12,\n\x08\x63ommands\x18\x02 \x03(\x0b\x32\x10.ray.rpc.CommandR\x08\x63ommands\"\x19\n\x17PubsubCommandBatchReply*\xaf\x02\n\x0b\x43hannelType\x12\x1a\n\x16WORKER_OBJECT_EVICTION\x10\x00\x12\x1e\n\x1aWORKER_REF_REMOVED_CHANNEL\x10\x01\x12#\n\x1fWORKER_OBJECT_LOCATIONS_CHANNEL\x10\x02\x12\x15\n\x11GCS_ACTOR_CHANNEL\x10\x03\x12\x13\n\x0fGCS_JOB_CHANNEL\x10\x04\x12\x19\n\x15GCS_NODE_INFO_CHANNEL\x10\x05\x12\x1c\n\x18GCS_WORKER_DELTA_CHANNEL\x10\x06\x12\x1a\n\x16RAY_ERROR_INFO_CHANNEL\x10\x07\x12\x13\n\x0fRAY_LOG_CHANNEL\x10\x08\x12#\n\x1fRAY_NODE_RESOURCE_USAGE_CHANNEL\x10\n\"\x04\x08\t\x10\t2\xc8\x01\n\x11SubscriberService\x12W\n\x11PubsubLongPolling\x12!.ray.rpc.PubsubLongPollingRequest\x1a\x1f.ray.rpc.PubsubLongPollingReply\x12Z\n\x12PubsubCommandBatch\x12\".ray.rpc.PubsubCommandBatchRequest\x1a .ray.rpc.PubsubCommandBatchReplyb\x06proto3') + +_CHANNELTYPE = DESCRIPTOR.enum_types_by_name['ChannelType'] +ChannelType = enum_type_wrapper.EnumTypeWrapper(_CHANNELTYPE) +WORKER_OBJECT_EVICTION = 0 +WORKER_REF_REMOVED_CHANNEL = 1 +WORKER_OBJECT_LOCATIONS_CHANNEL = 2 +GCS_ACTOR_CHANNEL = 3 +GCS_JOB_CHANNEL = 4 +GCS_NODE_INFO_CHANNEL = 5 +GCS_WORKER_DELTA_CHANNEL = 6 +RAY_ERROR_INFO_CHANNEL = 7 +RAY_LOG_CHANNEL = 8 +RAY_NODE_RESOURCE_USAGE_CHANNEL = 10 + + +_PUBMESSAGE = DESCRIPTOR.message_types_by_name['PubMessage'] +_WORKEROBJECTEVICTIONMESSAGE = DESCRIPTOR.message_types_by_name['WorkerObjectEvictionMessage'] +_WORKERREFREMOVEDMESSAGE = DESCRIPTOR.message_types_by_name['WorkerRefRemovedMessage'] +_WORKEROBJECTLOCATIONSPUBMESSAGE = DESCRIPTOR.message_types_by_name['WorkerObjectLocationsPubMessage'] +_FAILUREMESSAGE = DESCRIPTOR.message_types_by_name['FailureMessage'] +_COMMAND = DESCRIPTOR.message_types_by_name['Command'] +_UNSUBSCRIBEMESSAGE = DESCRIPTOR.message_types_by_name['UnsubscribeMessage'] +_SUBMESSAGE = DESCRIPTOR.message_types_by_name['SubMessage'] +_WORKEROBJECTEVICTIONSUBMESSAGE = DESCRIPTOR.message_types_by_name['WorkerObjectEvictionSubMessage'] +_WORKERREFREMOVEDSUBMESSAGE = DESCRIPTOR.message_types_by_name['WorkerRefRemovedSubMessage'] +_WORKEROBJECTLOCATIONSSUBMESSAGE = DESCRIPTOR.message_types_by_name['WorkerObjectLocationsSubMessage'] +_PUBSUBLONGPOLLINGREQUEST = DESCRIPTOR.message_types_by_name['PubsubLongPollingRequest'] +_PUBSUBLONGPOLLINGREPLY = DESCRIPTOR.message_types_by_name['PubsubLongPollingReply'] +_PUBSUBCOMMANDBATCHREQUEST = DESCRIPTOR.message_types_by_name['PubsubCommandBatchRequest'] +_PUBSUBCOMMANDBATCHREPLY = DESCRIPTOR.message_types_by_name['PubsubCommandBatchReply'] +PubMessage = _reflection.GeneratedProtocolMessageType('PubMessage', (_message.Message,), { + 'DESCRIPTOR' : _PUBMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PubMessage) + }) +_sym_db.RegisterMessage(PubMessage) + +WorkerObjectEvictionMessage = _reflection.GeneratedProtocolMessageType('WorkerObjectEvictionMessage', (_message.Message,), { + 'DESCRIPTOR' : _WORKEROBJECTEVICTIONMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerObjectEvictionMessage) + }) +_sym_db.RegisterMessage(WorkerObjectEvictionMessage) + +WorkerRefRemovedMessage = _reflection.GeneratedProtocolMessageType('WorkerRefRemovedMessage', (_message.Message,), { + 'DESCRIPTOR' : _WORKERREFREMOVEDMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerRefRemovedMessage) + }) +_sym_db.RegisterMessage(WorkerRefRemovedMessage) + +WorkerObjectLocationsPubMessage = _reflection.GeneratedProtocolMessageType('WorkerObjectLocationsPubMessage', (_message.Message,), { + 'DESCRIPTOR' : _WORKEROBJECTLOCATIONSPUBMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerObjectLocationsPubMessage) + }) +_sym_db.RegisterMessage(WorkerObjectLocationsPubMessage) + +FailureMessage = _reflection.GeneratedProtocolMessageType('FailureMessage', (_message.Message,), { + 'DESCRIPTOR' : _FAILUREMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.FailureMessage) + }) +_sym_db.RegisterMessage(FailureMessage) + +Command = _reflection.GeneratedProtocolMessageType('Command', (_message.Message,), { + 'DESCRIPTOR' : _COMMAND, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Command) + }) +_sym_db.RegisterMessage(Command) + +UnsubscribeMessage = _reflection.GeneratedProtocolMessageType('UnsubscribeMessage', (_message.Message,), { + 'DESCRIPTOR' : _UNSUBSCRIBEMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.UnsubscribeMessage) + }) +_sym_db.RegisterMessage(UnsubscribeMessage) + +SubMessage = _reflection.GeneratedProtocolMessageType('SubMessage', (_message.Message,), { + 'DESCRIPTOR' : _SUBMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.SubMessage) + }) +_sym_db.RegisterMessage(SubMessage) + +WorkerObjectEvictionSubMessage = _reflection.GeneratedProtocolMessageType('WorkerObjectEvictionSubMessage', (_message.Message,), { + 'DESCRIPTOR' : _WORKEROBJECTEVICTIONSUBMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerObjectEvictionSubMessage) + }) +_sym_db.RegisterMessage(WorkerObjectEvictionSubMessage) + +WorkerRefRemovedSubMessage = _reflection.GeneratedProtocolMessageType('WorkerRefRemovedSubMessage', (_message.Message,), { + 'DESCRIPTOR' : _WORKERREFREMOVEDSUBMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerRefRemovedSubMessage) + }) +_sym_db.RegisterMessage(WorkerRefRemovedSubMessage) + +WorkerObjectLocationsSubMessage = _reflection.GeneratedProtocolMessageType('WorkerObjectLocationsSubMessage', (_message.Message,), { + 'DESCRIPTOR' : _WORKEROBJECTLOCATIONSSUBMESSAGE, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WorkerObjectLocationsSubMessage) + }) +_sym_db.RegisterMessage(WorkerObjectLocationsSubMessage) + +PubsubLongPollingRequest = _reflection.GeneratedProtocolMessageType('PubsubLongPollingRequest', (_message.Message,), { + 'DESCRIPTOR' : _PUBSUBLONGPOLLINGREQUEST, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PubsubLongPollingRequest) + }) +_sym_db.RegisterMessage(PubsubLongPollingRequest) + +PubsubLongPollingReply = _reflection.GeneratedProtocolMessageType('PubsubLongPollingReply', (_message.Message,), { + 'DESCRIPTOR' : _PUBSUBLONGPOLLINGREPLY, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PubsubLongPollingReply) + }) +_sym_db.RegisterMessage(PubsubLongPollingReply) + +PubsubCommandBatchRequest = _reflection.GeneratedProtocolMessageType('PubsubCommandBatchRequest', (_message.Message,), { + 'DESCRIPTOR' : _PUBSUBCOMMANDBATCHREQUEST, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PubsubCommandBatchRequest) + }) +_sym_db.RegisterMessage(PubsubCommandBatchRequest) + +PubsubCommandBatchReply = _reflection.GeneratedProtocolMessageType('PubsubCommandBatchReply', (_message.Message,), { + 'DESCRIPTOR' : _PUBSUBCOMMANDBATCHREPLY, + '__module__' : 'src.ray.protobuf.pubsub_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PubsubCommandBatchReply) + }) +_sym_db.RegisterMessage(PubsubCommandBatchReply) + +_SUBSCRIBERSERVICE = DESCRIPTOR.services_by_name['SubscriberService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _CHANNELTYPE._serialized_start=3299 + _CHANNELTYPE._serialized_end=3602 + _PUBMESSAGE._serialized_start=134 + _PUBMESSAGE._serialized_end=1176 + _WORKEROBJECTEVICTIONMESSAGE._serialized_start=1178 + _WORKEROBJECTEVICTIONMESSAGE._serialized_end=1236 + _WORKERREFREMOVEDMESSAGE._serialized_start=1238 + _WORKERREFREMOVEDMESSAGE._serialized_end=1331 + _WORKEROBJECTLOCATIONSPUBMESSAGE._serialized_start=1334 + _WORKEROBJECTLOCATIONSPUBMESSAGE._serialized_end=1645 + _FAILUREMESSAGE._serialized_start=1647 + _FAILUREMESSAGE._serialized_end=1663 + _COMMAND._serialized_start=1666 + _COMMAND._serialized_end=1929 + _UNSUBSCRIBEMESSAGE._serialized_start=1931 + _UNSUBSCRIBEMESSAGE._serialized_end=1951 + _SUBMESSAGE._serialized_start=1954 + _SUBMESSAGE._serialized_end=2315 + _WORKEROBJECTEVICTIONSUBMESSAGE._serialized_start=2318 + _WORKEROBJECTEVICTIONSUBMESSAGE._serialized_end=2547 + _WORKERREFREMOVEDSUBMESSAGE._serialized_start=2550 + _WORKERREFREMOVEDSUBMESSAGE._serialized_end=2770 + _WORKEROBJECTLOCATIONSSUBMESSAGE._serialized_start=2772 + _WORKEROBJECTLOCATIONSSUBMESSAGE._serialized_end=2880 + _PUBSUBLONGPOLLINGREQUEST._serialized_start=2883 + _PUBSUBLONGPOLLINGREQUEST._serialized_end=3040 + _PUBSUBLONGPOLLINGREPLY._serialized_start=3042 + _PUBSUBLONGPOLLINGREPLY._serialized_end=3157 + _PUBSUBCOMMANDBATCHREQUEST._serialized_start=3159 + _PUBSUBCOMMANDBATCHREQUEST._serialized_end=3269 + _PUBSUBCOMMANDBATCHREPLY._serialized_start=3271 + _PUBSUBCOMMANDBATCHREPLY._serialized_end=3296 + _SUBSCRIBERSERVICE._serialized_start=3605 + _SUBSCRIBERSERVICE._serialized_end=3805 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/pubsub_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/pubsub_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..abd24b06031aaabeaf0aee17d426080c4a3c07a6 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/pubsub_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import pubsub_pb2 as src_dot_ray_dot_protobuf_dot_pubsub__pb2 + + +class SubscriberServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.PubsubLongPolling = channel.unary_unary( + '/ray.rpc.SubscriberService/PubsubLongPolling', + request_serializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingReply.FromString, + ) + self.PubsubCommandBatch = channel.unary_unary( + '/ray.rpc.SubscriberService/PubsubCommandBatch', + request_serializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchReply.FromString, + ) + + +class SubscriberServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def PubsubLongPolling(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PubsubCommandBatch(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_SubscriberServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'PubsubLongPolling': grpc.unary_unary_rpc_method_handler( + servicer.PubsubLongPolling, + request_deserializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingReply.SerializeToString, + ), + 'PubsubCommandBatch': grpc.unary_unary_rpc_method_handler( + servicer.PubsubCommandBatch, + request_deserializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.SubscriberService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class SubscriberService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def PubsubLongPolling(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.SubscriberService/PubsubLongPolling', + src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubLongPollingReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PubsubCommandBatch(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.SubscriberService/PubsubCommandBatch', + src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_pubsub__pb2.PubsubCommandBatchReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/ray_client_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/ray_client_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..8901b37f8e23438df7d9682c57cba537fb0b0c6b --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/ray_client_pb2.py @@ -0,0 +1,558 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/ray_client.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!src/ray/protobuf/ray_client.proto\x12\x07ray.rpc\"\xb5\x01\n\x03\x41rg\x12+\n\x05local\x18\x01 \x01(\x0e\x32\x15.ray.rpc.Arg.LocalityR\x05local\x12!\n\x0creference_id\x18\x02 \x01(\x0cR\x0breferenceId\x12\x12\n\x04\x64\x61ta\x18\x03 \x01(\x0cR\x04\x64\x61ta\x12!\n\x04type\x18\x04 \x01(\x0e\x32\r.ray.rpc.TypeR\x04type\"\'\n\x08Locality\x12\x0c\n\x08INTERNED\x10\x00\x12\r\n\tREFERENCE\x10\x01\"6\n\x0bTaskOptions\x12\'\n\x0fpickled_options\x18\x01 \x01(\x0cR\x0epickledOptions\"\xf4\x04\n\nClientTask\x12\x36\n\x04type\x18\x01 \x01(\x0e\x32\".ray.rpc.ClientTask.RemoteExecTypeR\x04type\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x1d\n\npayload_id\x18\x03 \x01(\x0cR\tpayloadId\x12 \n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x0c.ray.rpc.ArgR\x04\x61rgs\x12\x37\n\x06kwargs\x18\x05 \x03(\x0b\x32\x1f.ray.rpc.ClientTask.KwargsEntryR\x06kwargs\x12\x1b\n\tclient_id\x18\x06 \x01(\tR\x08\x63lientId\x12.\n\x07options\x18\x07 \x01(\x0b\x32\x14.ray.rpc.TaskOptionsR\x07options\x12?\n\x10\x62\x61seline_options\x18\x08 \x01(\x0b\x32\x14.ray.rpc.TaskOptionsR\x0f\x62\x61selineOptions\x12\x1c\n\tnamespace\x18\t \x01(\tR\tnamespace\x12\x12\n\x04\x64\x61ta\x18\n \x01(\x0cR\x04\x64\x61ta\x12\x19\n\x08\x63hunk_id\x18\x0b \x01(\x05R\x07\x63hunkId\x12!\n\x0ctotal_chunks\x18\x0c \x01(\x05R\x0btotalChunks\x1aG\n\x0bKwargsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x0c.ray.rpc.ArgR\x05value:\x02\x38\x01\"Y\n\x0eRemoteExecType\x12\x0c\n\x08\x46UNCTION\x10\x00\x12\t\n\x05\x41\x43TOR\x10\x01\x12\n\n\x06METHOD\x10\x02\x12\x11\n\rSTATIC_METHOD\x10\x03\x12\x0f\n\x0bNAMED_ACTOR\x10\x04\"]\n\x10\x43lientTaskTicket\x12\x14\n\x05valid\x18\x01 \x01(\x08R\x05valid\x12\x1d\n\nreturn_ids\x18\x02 \x03(\x0cR\treturnIds\x12\x14\n\x05\x65rror\x18\x03 \x01(\x0cR\x05\x65rror\"\xbc\x01\n\nPutRequest\x12\x12\n\x04\x64\x61ta\x18\x01 \x01(\x0cR\x04\x64\x61ta\x12\"\n\rclient_ref_id\x18\x02 \x01(\x0cR\x0b\x63lientRefId\x12\x19\n\x08\x63hunk_id\x18\x03 \x01(\x05R\x07\x63hunkId\x12!\n\x0ctotal_chunks\x18\x04 \x01(\x05R\x0btotalChunks\x12\x1d\n\ntotal_size\x18\x05 \x01(\x03R\ttotalSize\x12\x19\n\x08owner_id\x18\x06 \x01(\x0cR\x07ownerId\"I\n\x0bPutResponse\x12\x0e\n\x02id\x18\x01 \x01(\x0cR\x02id\x12\x14\n\x05valid\x18\x02 \x01(\x08R\x05valid\x12\x14\n\x05\x65rror\x18\x03 \x01(\x0cR\x05\x65rror\"\x82\x01\n\nGetRequest\x12\x10\n\x03ids\x18\x04 \x03(\x0cR\x03ids\x12\x18\n\x07timeout\x18\x02 \x01(\x02R\x07timeout\x12\"\n\x0c\x61synchronous\x18\x03 \x01(\x08R\x0c\x61synchronous\x12$\n\x0estart_chunk_id\x18\x05 \x01(\x05R\x0cstartChunkId\"\xaa\x01\n\x0bGetResponse\x12\x14\n\x05valid\x18\x01 \x01(\x08R\x05valid\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\x0cR\x04\x64\x61ta\x12\x14\n\x05\x65rror\x18\x03 \x01(\x0cR\x05\x65rror\x12\x19\n\x08\x63hunk_id\x18\x04 \x01(\x05R\x07\x63hunkId\x12!\n\x0ctotal_chunks\x18\x05 \x01(\x05R\x0btotalChunks\x12\x1d\n\ntotal_size\x18\x06 \x01(\x04R\ttotalSize\"\x84\x01\n\x0bWaitRequest\x12\x1d\n\nobject_ids\x18\x01 \x03(\x0cR\tobjectIds\x12\x1f\n\x0bnum_returns\x18\x02 \x01(\x03R\nnumReturns\x12\x18\n\x07timeout\x18\x03 \x01(\x01R\x07timeout\x12\x1b\n\tclient_id\x18\x04 \x01(\tR\x08\x63lientId\"\x80\x01\n\x0cWaitResponse\x12\x14\n\x05valid\x18\x01 \x01(\x08R\x05valid\x12(\n\x10ready_object_ids\x18\x02 \x03(\x0cR\x0ereadyObjectIds\x12\x30\n\x14remaining_object_ids\x18\x03 \x03(\x0cR\x12remainingObjectIds\"\xad\x01\n\x0f\x43lusterInfoType\"\x99\x01\n\x08TypeEnum\x12\x12\n\x0eIS_INITIALIZED\x10\x00\x12\t\n\x05NODES\x10\x01\x12\x15\n\x11\x43LUSTER_RESOURCES\x10\x02\x12\x17\n\x13\x41VAILABLE_RESOURCES\x10\x03\x12\x13\n\x0fRUNTIME_CONTEXT\x10\x04\x12\x0c\n\x08TIMELINE\x10\x05\x12\x08\n\x04PING\x10\x06\x12\x11\n\rDASHBOARD_URL\x10\x07\"K\n\x12\x43lusterInfoRequest\x12\x35\n\x04type\x18\x01 \x01(\x0e\x32!.ray.rpc.ClusterInfoType.TypeEnumR\x04type\"\x8e\x05\n\x13\x43lusterInfoResponse\x12\x35\n\x04type\x18\x01 \x01(\x0e\x32!.ray.rpc.ClusterInfoType.TypeEnumR\x04type\x12\x14\n\x04json\x18\x02 \x01(\tH\x00R\x04json\x12S\n\x0eresource_table\x18\x03 \x01(\x0b\x32*.ray.rpc.ClusterInfoResponse.ResourceTableH\x00R\rresourceTable\x12V\n\x0fruntime_context\x18\x04 \x01(\x0b\x32+.ray.rpc.ClusterInfoResponse.RuntimeContextH\x00R\x0eruntimeContext\x1a\x96\x01\n\rResourceTable\x12K\n\x05table\x18\x01 \x03(\x0b\x32\x35.ray.rpc.ClusterInfoResponse.ResourceTable.TableEntryR\x05table\x1a\x38\n\nTableEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\x1a\xd2\x01\n\x0eRuntimeContext\x12\x15\n\x06job_id\x18\x01 \x01(\x0cR\x05jobId\x12\x17\n\x07node_id\x18\x02 \x01(\x0cR\x06nodeId\x12\x1c\n\tnamespace\x18\x03 \x01(\tR\tnamespace\x12\x1f\n\x0bruntime_env\x18\x04 \x01(\tR\nruntimeEnv\x12\x30\n\x14\x63\x61pture_client_tasks\x18\x05 \x01(\x08R\x12\x63\x61ptureClientTasks\x12\x1f\n\x0bgcs_address\x18\x06 \x01(\tR\ngcsAddressB\x0f\n\rresponse_type\"\xf1\x02\n\x10TerminateRequest\x12\x1b\n\tclient_id\x18\x01 \x01(\tR\x08\x63lientId\x12@\n\x05\x61\x63tor\x18\x02 \x01(\x0b\x32(.ray.rpc.TerminateRequest.ActorTerminateH\x00R\x05\x61\x63tor\x12P\n\x0btask_object\x18\x03 \x01(\x0b\x32-.ray.rpc.TerminateRequest.TaskObjectTerminateH\x00R\ntaskObject\x1a?\n\x0e\x41\x63torTerminate\x12\x0e\n\x02id\x18\x01 \x01(\x0cR\x02id\x12\x1d\n\nno_restart\x18\x02 \x01(\x08R\tnoRestart\x1aY\n\x13TaskObjectTerminate\x12\x0e\n\x02id\x18\x01 \x01(\x0cR\x02id\x12\x14\n\x05\x66orce\x18\x02 \x01(\x08R\x05\x66orce\x12\x1c\n\trecursive\x18\x03 \x01(\x08R\trecursiveB\x10\n\x0eterminate_type\"#\n\x11TerminateResponse\x12\x0e\n\x02ok\x18\x01 \x01(\x08R\x02ok\"T\n\x0fKVExistsRequest\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03key\x12!\n\tnamespace\x18\x02 \x01(\x0cH\x00R\tnamespace\x88\x01\x01\x42\x0c\n\n_namespace\"*\n\x10KVExistsResponse\x12\x16\n\x06\x65xists\x18\x01 \x01(\x08R\x06\x65xists\"Q\n\x0cKVGetRequest\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03key\x12!\n\tnamespace\x18\x02 \x01(\x0cH\x00R\tnamespace\x88\x01\x01\x42\x0c\n\n_namespace\"4\n\rKVGetResponse\x12\x19\n\x05value\x18\x01 \x01(\x0cH\x00R\x05value\x88\x01\x01\x42\x08\n\x06_value\"\x85\x01\n\x0cKVPutRequest\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value\x12\x1c\n\toverwrite\x18\x03 \x01(\x08R\toverwrite\x12!\n\tnamespace\x18\x04 \x01(\x0cH\x00R\tnamespace\x88\x01\x01\x42\x0c\n\n_namespace\"6\n\rKVPutResponse\x12%\n\x0e\x61lready_exists\x18\x01 \x01(\x08R\ralreadyExists\"u\n\x0cKVDelRequest\x12\x10\n\x03key\x18\x01 \x01(\x0cR\x03key\x12\"\n\rdel_by_prefix\x18\x02 \x01(\x08R\x0b\x64\x65lByPrefix\x12!\n\tnamespace\x18\x03 \x01(\x0cH\x00R\tnamespace\x88\x01\x01\x42\x0c\n\n_namespace\"0\n\rKVDelResponse\x12\x1f\n\x0b\x64\x65leted_num\x18\x01 \x01(\x05R\ndeletedNum\"X\n\rKVListRequest\x12\x16\n\x06prefix\x18\x01 \x01(\x0cR\x06prefix\x12!\n\tnamespace\x18\x02 \x01(\x0cH\x00R\tnamespace\x88\x01\x01\x42\x0c\n\n_namespace\"$\n\x0eKVListResponse\x12\x12\n\x04keys\x18\x01 \x03(\x0cR\x04keys\"T\n\x1d\x43lientPinRuntimeEnvURIRequest\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12!\n\x0c\x65xpiration_s\x18\x02 \x01(\x05R\x0b\x65xpirationS\" \n\x1e\x43lientPinRuntimeEnvURIResponse\"\x8a\x01\n\x0bInitRequest\x12\x1d\n\njob_config\x18\x01 \x01(\x0cR\tjobConfig\x12&\n\x0fray_init_kwargs\x18\x02 \x01(\tR\rrayInitKwargs\x12\x34\n\x16reconnect_grace_period\x18\x03 \x01(\x05R\x14reconnectGracePeriod\"0\n\x0cInitResponse\x12\x0e\n\x02ok\x18\x01 \x01(\x08R\x02ok\x12\x10\n\x03msg\x18\x02 \x01(\tR\x03msg\"\x17\n\x15PrepRuntimeEnvRequest\"\x18\n\x16PrepRuntimeEnvResponse\"E\n\x1c\x43lientListNamedActorsRequest\x12%\n\x0e\x61ll_namespaces\x18\x01 \x01(\x08R\rallNamespaces\"@\n\x1d\x43lientListNamedActorsResponse\x12\x1f\n\x0b\x61\x63tors_json\x18\x01 \x01(\tR\nactorsJson\"\"\n\x0eReleaseRequest\x12\x10\n\x03ids\x18\x01 \x03(\x0cR\x03ids\"!\n\x0fReleaseResponse\x12\x0e\n\x02ok\x18\x02 \x03(\x08R\x02ok\"\x17\n\x15\x43onnectionInfoRequest\"\xa0\x01\n\x16\x43onnectionInfoResponse\x12\x1f\n\x0bnum_clients\x18\x01 \x01(\x05R\nnumClients\x12\x1f\n\x0bray_version\x18\x02 \x01(\tR\nrayVersion\x12\x1d\n\nray_commit\x18\x03 \x01(\tR\trayCommit\x12%\n\x0epython_version\x18\x04 \x01(\tR\rpythonVersion\"\x1a\n\x18\x43onnectionCleanupRequest\"\x1b\n\x19\x43onnectionCleanupResponse\"+\n\x12\x41\x63knowledgeRequest\x12\x15\n\x06req_id\x18\x01 \x01(\x05R\x05reqId\"\xc6\x05\n\x0b\x44\x61taRequest\x12\x15\n\x06req_id\x18\x01 \x01(\x05R\x05reqId\x12\'\n\x03get\x18\x02 \x01(\x0b\x32\x13.ray.rpc.GetRequestH\x00R\x03get\x12\'\n\x03put\x18\x03 \x01(\x0b\x32\x13.ray.rpc.PutRequestH\x00R\x03put\x12\x33\n\x07release\x18\x04 \x01(\x0b\x32\x17.ray.rpc.ReleaseRequestH\x00R\x07release\x12I\n\x0f\x63onnection_info\x18\x05 \x01(\x0b\x32\x1e.ray.rpc.ConnectionInfoRequestH\x00R\x0e\x63onnectionInfo\x12*\n\x04init\x18\x06 \x01(\x0b\x32\x14.ray.rpc.InitRequestH\x00R\x04init\x12J\n\x10prep_runtime_env\x18\x07 \x01(\x0b\x32\x1e.ray.rpc.PrepRuntimeEnvRequestH\x00R\x0eprepRuntimeEnv\x12R\n\x12\x63onnection_cleanup\x18\x08 \x01(\x0b\x32!.ray.rpc.ConnectionCleanupRequestH\x00R\x11\x63onnectionCleanup\x12?\n\x0b\x61\x63knowledge\x18\t \x01(\x0b\x32\x1b.ray.rpc.AcknowledgeRequestH\x00R\x0b\x61\x63knowledge\x12)\n\x04task\x18\n \x01(\x0b\x32\x13.ray.rpc.ClientTaskH\x00R\x04task\x12\x39\n\tterminate\x18\x0b \x01(\x0b\x32\x19.ray.rpc.TerminateRequestH\x00R\tterminate\x12S\n\x11list_named_actors\x18\x0c \x01(\x0b\x32%.ray.rpc.ClientListNamedActorsRequestH\x00R\x0flistNamedActorsB\x06\n\x04type\"\xb5\x05\n\x0c\x44\x61taResponse\x12\x15\n\x06req_id\x18\x01 \x01(\x05R\x05reqId\x12(\n\x03get\x18\x02 \x01(\x0b\x32\x14.ray.rpc.GetResponseH\x00R\x03get\x12(\n\x03put\x18\x03 \x01(\x0b\x32\x14.ray.rpc.PutResponseH\x00R\x03put\x12\x34\n\x07release\x18\x04 \x01(\x0b\x32\x18.ray.rpc.ReleaseResponseH\x00R\x07release\x12J\n\x0f\x63onnection_info\x18\x05 \x01(\x0b\x32\x1f.ray.rpc.ConnectionInfoResponseH\x00R\x0e\x63onnectionInfo\x12+\n\x04init\x18\x06 \x01(\x0b\x32\x15.ray.rpc.InitResponseH\x00R\x04init\x12K\n\x10prep_runtime_env\x18\x07 \x01(\x0b\x32\x1f.ray.rpc.PrepRuntimeEnvResponseH\x00R\x0eprepRuntimeEnv\x12S\n\x12\x63onnection_cleanup\x18\x08 \x01(\x0b\x32\".ray.rpc.ConnectionCleanupResponseH\x00R\x11\x63onnectionCleanup\x12<\n\x0btask_ticket\x18\n \x01(\x0b\x32\x19.ray.rpc.ClientTaskTicketH\x00R\ntaskTicket\x12:\n\tterminate\x18\x0b \x01(\x0b\x32\x1a.ray.rpc.TerminateResponseH\x00R\tterminate\x12T\n\x11list_named_actors\x18\x0c \x01(\x0b\x32&.ray.rpc.ClientListNamedActorsResponseH\x00R\x0flistNamedActorsB\x06\n\x04typeJ\x04\x08\t\x10\nR\x0b\x61\x63knowledge\"J\n\x12LogSettingsRequest\x12\x18\n\x07\x65nabled\x18\x01 \x01(\x08R\x07\x65nabled\x12\x1a\n\x08loglevel\x18\x02 \x01(\x05R\x08loglevel\"E\n\x07LogData\x12\x10\n\x03msg\x18\x01 \x01(\tR\x03msg\x12\x14\n\x05level\x18\x02 \x01(\x05R\x05level\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name*\x13\n\x04Type\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x32\x96\x08\n\x0cRayletDriver\x12\x35\n\x04Init\x12\x14.ray.rpc.InitRequest\x1a\x15.ray.rpc.InitResponse\"\x00\x12S\n\x0ePrepRuntimeEnv\x12\x1e.ray.rpc.PrepRuntimeEnvRequest\x1a\x1f.ray.rpc.PrepRuntimeEnvResponse\"\x00\x12:\n\tGetObject\x12\x13.ray.rpc.GetRequest\x1a\x14.ray.rpc.GetResponse\"\x00\x30\x01\x12\x38\n\tPutObject\x12\x13.ray.rpc.PutRequest\x1a\x14.ray.rpc.PutResponse\"\x00\x12;\n\nWaitObject\x12\x14.ray.rpc.WaitRequest\x1a\x15.ray.rpc.WaitResponse\"\x00\x12<\n\x08Schedule\x12\x13.ray.rpc.ClientTask\x1a\x19.ray.rpc.ClientTaskTicket\"\x00\x12\x44\n\tTerminate\x12\x19.ray.rpc.TerminateRequest\x1a\x1a.ray.rpc.TerminateResponse\"\x00\x12J\n\x0b\x43lusterInfo\x12\x1b.ray.rpc.ClusterInfoRequest\x1a\x1c.ray.rpc.ClusterInfoResponse\"\x00\x12\x38\n\x05KVGet\x12\x15.ray.rpc.KVGetRequest\x1a\x16.ray.rpc.KVGetResponse\"\x00\x12\x38\n\x05KVPut\x12\x15.ray.rpc.KVPutRequest\x1a\x16.ray.rpc.KVPutResponse\"\x00\x12\x38\n\x05KVDel\x12\x15.ray.rpc.KVDelRequest\x1a\x16.ray.rpc.KVDelResponse\"\x00\x12;\n\x06KVList\x12\x16.ray.rpc.KVListRequest\x1a\x17.ray.rpc.KVListResponse\"\x00\x12\x41\n\x08KVExists\x12\x18.ray.rpc.KVExistsRequest\x1a\x19.ray.rpc.KVExistsResponse\"\x00\x12\x62\n\x0fListNamedActors\x12%.ray.rpc.ClientListNamedActorsRequest\x1a&.ray.rpc.ClientListNamedActorsResponse\"\x00\x12\x65\n\x10PinRuntimeEnvURI\x12&.ray.rpc.ClientPinRuntimeEnvURIRequest\x1a\'.ray.rpc.ClientPinRuntimeEnvURIResponse\"\x00\x32S\n\x12RayletDataStreamer\x12=\n\x08\x44\x61tapath\x12\x14.ray.rpc.DataRequest\x1a\x15.ray.rpc.DataResponse\"\x00(\x01\x30\x01\x32U\n\x11RayletLogStreamer\x12@\n\tLogstream\x12\x1b.ray.rpc.LogSettingsRequest\x1a\x10.ray.rpc.LogData\"\x00(\x01\x30\x01\x62\x06proto3') + +_TYPE = DESCRIPTOR.enum_types_by_name['Type'] +Type = enum_type_wrapper.EnumTypeWrapper(_TYPE) +DEFAULT = 0 + + +_ARG = DESCRIPTOR.message_types_by_name['Arg'] +_TASKOPTIONS = DESCRIPTOR.message_types_by_name['TaskOptions'] +_CLIENTTASK = DESCRIPTOR.message_types_by_name['ClientTask'] +_CLIENTTASK_KWARGSENTRY = _CLIENTTASK.nested_types_by_name['KwargsEntry'] +_CLIENTTASKTICKET = DESCRIPTOR.message_types_by_name['ClientTaskTicket'] +_PUTREQUEST = DESCRIPTOR.message_types_by_name['PutRequest'] +_PUTRESPONSE = DESCRIPTOR.message_types_by_name['PutResponse'] +_GETREQUEST = DESCRIPTOR.message_types_by_name['GetRequest'] +_GETRESPONSE = DESCRIPTOR.message_types_by_name['GetResponse'] +_WAITREQUEST = DESCRIPTOR.message_types_by_name['WaitRequest'] +_WAITRESPONSE = DESCRIPTOR.message_types_by_name['WaitResponse'] +_CLUSTERINFOTYPE = DESCRIPTOR.message_types_by_name['ClusterInfoType'] +_CLUSTERINFOREQUEST = DESCRIPTOR.message_types_by_name['ClusterInfoRequest'] +_CLUSTERINFORESPONSE = DESCRIPTOR.message_types_by_name['ClusterInfoResponse'] +_CLUSTERINFORESPONSE_RESOURCETABLE = _CLUSTERINFORESPONSE.nested_types_by_name['ResourceTable'] +_CLUSTERINFORESPONSE_RESOURCETABLE_TABLEENTRY = _CLUSTERINFORESPONSE_RESOURCETABLE.nested_types_by_name['TableEntry'] +_CLUSTERINFORESPONSE_RUNTIMECONTEXT = _CLUSTERINFORESPONSE.nested_types_by_name['RuntimeContext'] +_TERMINATEREQUEST = DESCRIPTOR.message_types_by_name['TerminateRequest'] +_TERMINATEREQUEST_ACTORTERMINATE = _TERMINATEREQUEST.nested_types_by_name['ActorTerminate'] +_TERMINATEREQUEST_TASKOBJECTTERMINATE = _TERMINATEREQUEST.nested_types_by_name['TaskObjectTerminate'] +_TERMINATERESPONSE = DESCRIPTOR.message_types_by_name['TerminateResponse'] +_KVEXISTSREQUEST = DESCRIPTOR.message_types_by_name['KVExistsRequest'] +_KVEXISTSRESPONSE = DESCRIPTOR.message_types_by_name['KVExistsResponse'] +_KVGETREQUEST = DESCRIPTOR.message_types_by_name['KVGetRequest'] +_KVGETRESPONSE = DESCRIPTOR.message_types_by_name['KVGetResponse'] +_KVPUTREQUEST = DESCRIPTOR.message_types_by_name['KVPutRequest'] +_KVPUTRESPONSE = DESCRIPTOR.message_types_by_name['KVPutResponse'] +_KVDELREQUEST = DESCRIPTOR.message_types_by_name['KVDelRequest'] +_KVDELRESPONSE = DESCRIPTOR.message_types_by_name['KVDelResponse'] +_KVLISTREQUEST = DESCRIPTOR.message_types_by_name['KVListRequest'] +_KVLISTRESPONSE = DESCRIPTOR.message_types_by_name['KVListResponse'] +_CLIENTPINRUNTIMEENVURIREQUEST = DESCRIPTOR.message_types_by_name['ClientPinRuntimeEnvURIRequest'] +_CLIENTPINRUNTIMEENVURIRESPONSE = DESCRIPTOR.message_types_by_name['ClientPinRuntimeEnvURIResponse'] +_INITREQUEST = DESCRIPTOR.message_types_by_name['InitRequest'] +_INITRESPONSE = DESCRIPTOR.message_types_by_name['InitResponse'] +_PREPRUNTIMEENVREQUEST = DESCRIPTOR.message_types_by_name['PrepRuntimeEnvRequest'] +_PREPRUNTIMEENVRESPONSE = DESCRIPTOR.message_types_by_name['PrepRuntimeEnvResponse'] +_CLIENTLISTNAMEDACTORSREQUEST = DESCRIPTOR.message_types_by_name['ClientListNamedActorsRequest'] +_CLIENTLISTNAMEDACTORSRESPONSE = DESCRIPTOR.message_types_by_name['ClientListNamedActorsResponse'] +_RELEASEREQUEST = DESCRIPTOR.message_types_by_name['ReleaseRequest'] +_RELEASERESPONSE = DESCRIPTOR.message_types_by_name['ReleaseResponse'] +_CONNECTIONINFOREQUEST = DESCRIPTOR.message_types_by_name['ConnectionInfoRequest'] +_CONNECTIONINFORESPONSE = DESCRIPTOR.message_types_by_name['ConnectionInfoResponse'] +_CONNECTIONCLEANUPREQUEST = DESCRIPTOR.message_types_by_name['ConnectionCleanupRequest'] +_CONNECTIONCLEANUPRESPONSE = DESCRIPTOR.message_types_by_name['ConnectionCleanupResponse'] +_ACKNOWLEDGEREQUEST = DESCRIPTOR.message_types_by_name['AcknowledgeRequest'] +_DATAREQUEST = DESCRIPTOR.message_types_by_name['DataRequest'] +_DATARESPONSE = DESCRIPTOR.message_types_by_name['DataResponse'] +_LOGSETTINGSREQUEST = DESCRIPTOR.message_types_by_name['LogSettingsRequest'] +_LOGDATA = DESCRIPTOR.message_types_by_name['LogData'] +_ARG_LOCALITY = _ARG.enum_types_by_name['Locality'] +_CLIENTTASK_REMOTEEXECTYPE = _CLIENTTASK.enum_types_by_name['RemoteExecType'] +_CLUSTERINFOTYPE_TYPEENUM = _CLUSTERINFOTYPE.enum_types_by_name['TypeEnum'] +Arg = _reflection.GeneratedProtocolMessageType('Arg', (_message.Message,), { + 'DESCRIPTOR' : _ARG, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.Arg) + }) +_sym_db.RegisterMessage(Arg) + +TaskOptions = _reflection.GeneratedProtocolMessageType('TaskOptions', (_message.Message,), { + 'DESCRIPTOR' : _TASKOPTIONS, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TaskOptions) + }) +_sym_db.RegisterMessage(TaskOptions) + +ClientTask = _reflection.GeneratedProtocolMessageType('ClientTask', (_message.Message,), { + + 'KwargsEntry' : _reflection.GeneratedProtocolMessageType('KwargsEntry', (_message.Message,), { + 'DESCRIPTOR' : _CLIENTTASK_KWARGSENTRY, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClientTask.KwargsEntry) + }) + , + 'DESCRIPTOR' : _CLIENTTASK, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClientTask) + }) +_sym_db.RegisterMessage(ClientTask) +_sym_db.RegisterMessage(ClientTask.KwargsEntry) + +ClientTaskTicket = _reflection.GeneratedProtocolMessageType('ClientTaskTicket', (_message.Message,), { + 'DESCRIPTOR' : _CLIENTTASKTICKET, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClientTaskTicket) + }) +_sym_db.RegisterMessage(ClientTaskTicket) + +PutRequest = _reflection.GeneratedProtocolMessageType('PutRequest', (_message.Message,), { + 'DESCRIPTOR' : _PUTREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PutRequest) + }) +_sym_db.RegisterMessage(PutRequest) + +PutResponse = _reflection.GeneratedProtocolMessageType('PutResponse', (_message.Message,), { + 'DESCRIPTOR' : _PUTRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PutResponse) + }) +_sym_db.RegisterMessage(PutResponse) + +GetRequest = _reflection.GeneratedProtocolMessageType('GetRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetRequest) + }) +_sym_db.RegisterMessage(GetRequest) + +GetResponse = _reflection.GeneratedProtocolMessageType('GetResponse', (_message.Message,), { + 'DESCRIPTOR' : _GETRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetResponse) + }) +_sym_db.RegisterMessage(GetResponse) + +WaitRequest = _reflection.GeneratedProtocolMessageType('WaitRequest', (_message.Message,), { + 'DESCRIPTOR' : _WAITREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WaitRequest) + }) +_sym_db.RegisterMessage(WaitRequest) + +WaitResponse = _reflection.GeneratedProtocolMessageType('WaitResponse', (_message.Message,), { + 'DESCRIPTOR' : _WAITRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.WaitResponse) + }) +_sym_db.RegisterMessage(WaitResponse) + +ClusterInfoType = _reflection.GeneratedProtocolMessageType('ClusterInfoType', (_message.Message,), { + 'DESCRIPTOR' : _CLUSTERINFOTYPE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClusterInfoType) + }) +_sym_db.RegisterMessage(ClusterInfoType) + +ClusterInfoRequest = _reflection.GeneratedProtocolMessageType('ClusterInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _CLUSTERINFOREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClusterInfoRequest) + }) +_sym_db.RegisterMessage(ClusterInfoRequest) + +ClusterInfoResponse = _reflection.GeneratedProtocolMessageType('ClusterInfoResponse', (_message.Message,), { + + 'ResourceTable' : _reflection.GeneratedProtocolMessageType('ResourceTable', (_message.Message,), { + + 'TableEntry' : _reflection.GeneratedProtocolMessageType('TableEntry', (_message.Message,), { + 'DESCRIPTOR' : _CLUSTERINFORESPONSE_RESOURCETABLE_TABLEENTRY, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClusterInfoResponse.ResourceTable.TableEntry) + }) + , + 'DESCRIPTOR' : _CLUSTERINFORESPONSE_RESOURCETABLE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClusterInfoResponse.ResourceTable) + }) + , + + 'RuntimeContext' : _reflection.GeneratedProtocolMessageType('RuntimeContext', (_message.Message,), { + 'DESCRIPTOR' : _CLUSTERINFORESPONSE_RUNTIMECONTEXT, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClusterInfoResponse.RuntimeContext) + }) + , + 'DESCRIPTOR' : _CLUSTERINFORESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClusterInfoResponse) + }) +_sym_db.RegisterMessage(ClusterInfoResponse) +_sym_db.RegisterMessage(ClusterInfoResponse.ResourceTable) +_sym_db.RegisterMessage(ClusterInfoResponse.ResourceTable.TableEntry) +_sym_db.RegisterMessage(ClusterInfoResponse.RuntimeContext) + +TerminateRequest = _reflection.GeneratedProtocolMessageType('TerminateRequest', (_message.Message,), { + + 'ActorTerminate' : _reflection.GeneratedProtocolMessageType('ActorTerminate', (_message.Message,), { + 'DESCRIPTOR' : _TERMINATEREQUEST_ACTORTERMINATE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TerminateRequest.ActorTerminate) + }) + , + + 'TaskObjectTerminate' : _reflection.GeneratedProtocolMessageType('TaskObjectTerminate', (_message.Message,), { + 'DESCRIPTOR' : _TERMINATEREQUEST_TASKOBJECTTERMINATE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TerminateRequest.TaskObjectTerminate) + }) + , + 'DESCRIPTOR' : _TERMINATEREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TerminateRequest) + }) +_sym_db.RegisterMessage(TerminateRequest) +_sym_db.RegisterMessage(TerminateRequest.ActorTerminate) +_sym_db.RegisterMessage(TerminateRequest.TaskObjectTerminate) + +TerminateResponse = _reflection.GeneratedProtocolMessageType('TerminateResponse', (_message.Message,), { + 'DESCRIPTOR' : _TERMINATERESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.TerminateResponse) + }) +_sym_db.RegisterMessage(TerminateResponse) + +KVExistsRequest = _reflection.GeneratedProtocolMessageType('KVExistsRequest', (_message.Message,), { + 'DESCRIPTOR' : _KVEXISTSREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVExistsRequest) + }) +_sym_db.RegisterMessage(KVExistsRequest) + +KVExistsResponse = _reflection.GeneratedProtocolMessageType('KVExistsResponse', (_message.Message,), { + 'DESCRIPTOR' : _KVEXISTSRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVExistsResponse) + }) +_sym_db.RegisterMessage(KVExistsResponse) + +KVGetRequest = _reflection.GeneratedProtocolMessageType('KVGetRequest', (_message.Message,), { + 'DESCRIPTOR' : _KVGETREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVGetRequest) + }) +_sym_db.RegisterMessage(KVGetRequest) + +KVGetResponse = _reflection.GeneratedProtocolMessageType('KVGetResponse', (_message.Message,), { + 'DESCRIPTOR' : _KVGETRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVGetResponse) + }) +_sym_db.RegisterMessage(KVGetResponse) + +KVPutRequest = _reflection.GeneratedProtocolMessageType('KVPutRequest', (_message.Message,), { + 'DESCRIPTOR' : _KVPUTREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVPutRequest) + }) +_sym_db.RegisterMessage(KVPutRequest) + +KVPutResponse = _reflection.GeneratedProtocolMessageType('KVPutResponse', (_message.Message,), { + 'DESCRIPTOR' : _KVPUTRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVPutResponse) + }) +_sym_db.RegisterMessage(KVPutResponse) + +KVDelRequest = _reflection.GeneratedProtocolMessageType('KVDelRequest', (_message.Message,), { + 'DESCRIPTOR' : _KVDELREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVDelRequest) + }) +_sym_db.RegisterMessage(KVDelRequest) + +KVDelResponse = _reflection.GeneratedProtocolMessageType('KVDelResponse', (_message.Message,), { + 'DESCRIPTOR' : _KVDELRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVDelResponse) + }) +_sym_db.RegisterMessage(KVDelResponse) + +KVListRequest = _reflection.GeneratedProtocolMessageType('KVListRequest', (_message.Message,), { + 'DESCRIPTOR' : _KVLISTREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVListRequest) + }) +_sym_db.RegisterMessage(KVListRequest) + +KVListResponse = _reflection.GeneratedProtocolMessageType('KVListResponse', (_message.Message,), { + 'DESCRIPTOR' : _KVLISTRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.KVListResponse) + }) +_sym_db.RegisterMessage(KVListResponse) + +ClientPinRuntimeEnvURIRequest = _reflection.GeneratedProtocolMessageType('ClientPinRuntimeEnvURIRequest', (_message.Message,), { + 'DESCRIPTOR' : _CLIENTPINRUNTIMEENVURIREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClientPinRuntimeEnvURIRequest) + }) +_sym_db.RegisterMessage(ClientPinRuntimeEnvURIRequest) + +ClientPinRuntimeEnvURIResponse = _reflection.GeneratedProtocolMessageType('ClientPinRuntimeEnvURIResponse', (_message.Message,), { + 'DESCRIPTOR' : _CLIENTPINRUNTIMEENVURIRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClientPinRuntimeEnvURIResponse) + }) +_sym_db.RegisterMessage(ClientPinRuntimeEnvURIResponse) + +InitRequest = _reflection.GeneratedProtocolMessageType('InitRequest', (_message.Message,), { + 'DESCRIPTOR' : _INITREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InitRequest) + }) +_sym_db.RegisterMessage(InitRequest) + +InitResponse = _reflection.GeneratedProtocolMessageType('InitResponse', (_message.Message,), { + 'DESCRIPTOR' : _INITRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.InitResponse) + }) +_sym_db.RegisterMessage(InitResponse) + +PrepRuntimeEnvRequest = _reflection.GeneratedProtocolMessageType('PrepRuntimeEnvRequest', (_message.Message,), { + 'DESCRIPTOR' : _PREPRUNTIMEENVREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PrepRuntimeEnvRequest) + }) +_sym_db.RegisterMessage(PrepRuntimeEnvRequest) + +PrepRuntimeEnvResponse = _reflection.GeneratedProtocolMessageType('PrepRuntimeEnvResponse', (_message.Message,), { + 'DESCRIPTOR' : _PREPRUNTIMEENVRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.PrepRuntimeEnvResponse) + }) +_sym_db.RegisterMessage(PrepRuntimeEnvResponse) + +ClientListNamedActorsRequest = _reflection.GeneratedProtocolMessageType('ClientListNamedActorsRequest', (_message.Message,), { + 'DESCRIPTOR' : _CLIENTLISTNAMEDACTORSREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClientListNamedActorsRequest) + }) +_sym_db.RegisterMessage(ClientListNamedActorsRequest) + +ClientListNamedActorsResponse = _reflection.GeneratedProtocolMessageType('ClientListNamedActorsResponse', (_message.Message,), { + 'DESCRIPTOR' : _CLIENTLISTNAMEDACTORSRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ClientListNamedActorsResponse) + }) +_sym_db.RegisterMessage(ClientListNamedActorsResponse) + +ReleaseRequest = _reflection.GeneratedProtocolMessageType('ReleaseRequest', (_message.Message,), { + 'DESCRIPTOR' : _RELEASEREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReleaseRequest) + }) +_sym_db.RegisterMessage(ReleaseRequest) + +ReleaseResponse = _reflection.GeneratedProtocolMessageType('ReleaseResponse', (_message.Message,), { + 'DESCRIPTOR' : _RELEASERESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReleaseResponse) + }) +_sym_db.RegisterMessage(ReleaseResponse) + +ConnectionInfoRequest = _reflection.GeneratedProtocolMessageType('ConnectionInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONINFOREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ConnectionInfoRequest) + }) +_sym_db.RegisterMessage(ConnectionInfoRequest) + +ConnectionInfoResponse = _reflection.GeneratedProtocolMessageType('ConnectionInfoResponse', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONINFORESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ConnectionInfoResponse) + }) +_sym_db.RegisterMessage(ConnectionInfoResponse) + +ConnectionCleanupRequest = _reflection.GeneratedProtocolMessageType('ConnectionCleanupRequest', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONCLEANUPREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ConnectionCleanupRequest) + }) +_sym_db.RegisterMessage(ConnectionCleanupRequest) + +ConnectionCleanupResponse = _reflection.GeneratedProtocolMessageType('ConnectionCleanupResponse', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONCLEANUPRESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ConnectionCleanupResponse) + }) +_sym_db.RegisterMessage(ConnectionCleanupResponse) + +AcknowledgeRequest = _reflection.GeneratedProtocolMessageType('AcknowledgeRequest', (_message.Message,), { + 'DESCRIPTOR' : _ACKNOWLEDGEREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.AcknowledgeRequest) + }) +_sym_db.RegisterMessage(AcknowledgeRequest) + +DataRequest = _reflection.GeneratedProtocolMessageType('DataRequest', (_message.Message,), { + 'DESCRIPTOR' : _DATAREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DataRequest) + }) +_sym_db.RegisterMessage(DataRequest) + +DataResponse = _reflection.GeneratedProtocolMessageType('DataResponse', (_message.Message,), { + 'DESCRIPTOR' : _DATARESPONSE, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DataResponse) + }) +_sym_db.RegisterMessage(DataResponse) + +LogSettingsRequest = _reflection.GeneratedProtocolMessageType('LogSettingsRequest', (_message.Message,), { + 'DESCRIPTOR' : _LOGSETTINGSREQUEST, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LogSettingsRequest) + }) +_sym_db.RegisterMessage(LogSettingsRequest) + +LogData = _reflection.GeneratedProtocolMessageType('LogData', (_message.Message,), { + 'DESCRIPTOR' : _LOGDATA, + '__module__' : 'src.ray.protobuf.ray_client_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.LogData) + }) +_sym_db.RegisterMessage(LogData) + +_RAYLETDRIVER = DESCRIPTOR.services_by_name['RayletDriver'] +_RAYLETDATASTREAMER = DESCRIPTOR.services_by_name['RayletDataStreamer'] +_RAYLETLOGSTREAMER = DESCRIPTOR.services_by_name['RayletLogStreamer'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _CLIENTTASK_KWARGSENTRY._options = None + _CLIENTTASK_KWARGSENTRY._serialized_options = b'8\001' + _CLUSTERINFORESPONSE_RESOURCETABLE_TABLEENTRY._options = None + _CLUSTERINFORESPONSE_RESOURCETABLE_TABLEENTRY._serialized_options = b'8\001' + _TYPE._serialized_start=6341 + _TYPE._serialized_end=6360 + _ARG._serialized_start=47 + _ARG._serialized_end=228 + _ARG_LOCALITY._serialized_start=189 + _ARG_LOCALITY._serialized_end=228 + _TASKOPTIONS._serialized_start=230 + _TASKOPTIONS._serialized_end=284 + _CLIENTTASK._serialized_start=287 + _CLIENTTASK._serialized_end=915 + _CLIENTTASK_KWARGSENTRY._serialized_start=753 + _CLIENTTASK_KWARGSENTRY._serialized_end=824 + _CLIENTTASK_REMOTEEXECTYPE._serialized_start=826 + _CLIENTTASK_REMOTEEXECTYPE._serialized_end=915 + _CLIENTTASKTICKET._serialized_start=917 + _CLIENTTASKTICKET._serialized_end=1010 + _PUTREQUEST._serialized_start=1013 + _PUTREQUEST._serialized_end=1201 + _PUTRESPONSE._serialized_start=1203 + _PUTRESPONSE._serialized_end=1276 + _GETREQUEST._serialized_start=1279 + _GETREQUEST._serialized_end=1409 + _GETRESPONSE._serialized_start=1412 + _GETRESPONSE._serialized_end=1582 + _WAITREQUEST._serialized_start=1585 + _WAITREQUEST._serialized_end=1717 + _WAITRESPONSE._serialized_start=1720 + _WAITRESPONSE._serialized_end=1848 + _CLUSTERINFOTYPE._serialized_start=1851 + _CLUSTERINFOTYPE._serialized_end=2024 + _CLUSTERINFOTYPE_TYPEENUM._serialized_start=1871 + _CLUSTERINFOTYPE_TYPEENUM._serialized_end=2024 + _CLUSTERINFOREQUEST._serialized_start=2026 + _CLUSTERINFOREQUEST._serialized_end=2101 + _CLUSTERINFORESPONSE._serialized_start=2104 + _CLUSTERINFORESPONSE._serialized_end=2758 + _CLUSTERINFORESPONSE_RESOURCETABLE._serialized_start=2378 + _CLUSTERINFORESPONSE_RESOURCETABLE._serialized_end=2528 + _CLUSTERINFORESPONSE_RESOURCETABLE_TABLEENTRY._serialized_start=2472 + _CLUSTERINFORESPONSE_RESOURCETABLE_TABLEENTRY._serialized_end=2528 + _CLUSTERINFORESPONSE_RUNTIMECONTEXT._serialized_start=2531 + _CLUSTERINFORESPONSE_RUNTIMECONTEXT._serialized_end=2741 + _TERMINATEREQUEST._serialized_start=2761 + _TERMINATEREQUEST._serialized_end=3130 + _TERMINATEREQUEST_ACTORTERMINATE._serialized_start=2958 + _TERMINATEREQUEST_ACTORTERMINATE._serialized_end=3021 + _TERMINATEREQUEST_TASKOBJECTTERMINATE._serialized_start=3023 + _TERMINATEREQUEST_TASKOBJECTTERMINATE._serialized_end=3112 + _TERMINATERESPONSE._serialized_start=3132 + _TERMINATERESPONSE._serialized_end=3167 + _KVEXISTSREQUEST._serialized_start=3169 + _KVEXISTSREQUEST._serialized_end=3253 + _KVEXISTSRESPONSE._serialized_start=3255 + _KVEXISTSRESPONSE._serialized_end=3297 + _KVGETREQUEST._serialized_start=3299 + _KVGETREQUEST._serialized_end=3380 + _KVGETRESPONSE._serialized_start=3382 + _KVGETRESPONSE._serialized_end=3434 + _KVPUTREQUEST._serialized_start=3437 + _KVPUTREQUEST._serialized_end=3570 + _KVPUTRESPONSE._serialized_start=3572 + _KVPUTRESPONSE._serialized_end=3626 + _KVDELREQUEST._serialized_start=3628 + _KVDELREQUEST._serialized_end=3745 + _KVDELRESPONSE._serialized_start=3747 + _KVDELRESPONSE._serialized_end=3795 + _KVLISTREQUEST._serialized_start=3797 + _KVLISTREQUEST._serialized_end=3885 + _KVLISTRESPONSE._serialized_start=3887 + _KVLISTRESPONSE._serialized_end=3923 + _CLIENTPINRUNTIMEENVURIREQUEST._serialized_start=3925 + _CLIENTPINRUNTIMEENVURIREQUEST._serialized_end=4009 + _CLIENTPINRUNTIMEENVURIRESPONSE._serialized_start=4011 + _CLIENTPINRUNTIMEENVURIRESPONSE._serialized_end=4043 + _INITREQUEST._serialized_start=4046 + _INITREQUEST._serialized_end=4184 + _INITRESPONSE._serialized_start=4186 + _INITRESPONSE._serialized_end=4234 + _PREPRUNTIMEENVREQUEST._serialized_start=4236 + _PREPRUNTIMEENVREQUEST._serialized_end=4259 + _PREPRUNTIMEENVRESPONSE._serialized_start=4261 + _PREPRUNTIMEENVRESPONSE._serialized_end=4285 + _CLIENTLISTNAMEDACTORSREQUEST._serialized_start=4287 + _CLIENTLISTNAMEDACTORSREQUEST._serialized_end=4356 + _CLIENTLISTNAMEDACTORSRESPONSE._serialized_start=4358 + _CLIENTLISTNAMEDACTORSRESPONSE._serialized_end=4422 + _RELEASEREQUEST._serialized_start=4424 + _RELEASEREQUEST._serialized_end=4458 + _RELEASERESPONSE._serialized_start=4460 + _RELEASERESPONSE._serialized_end=4493 + _CONNECTIONINFOREQUEST._serialized_start=4495 + _CONNECTIONINFOREQUEST._serialized_end=4518 + _CONNECTIONINFORESPONSE._serialized_start=4521 + _CONNECTIONINFORESPONSE._serialized_end=4681 + _CONNECTIONCLEANUPREQUEST._serialized_start=4683 + _CONNECTIONCLEANUPREQUEST._serialized_end=4709 + _CONNECTIONCLEANUPRESPONSE._serialized_start=4711 + _CONNECTIONCLEANUPRESPONSE._serialized_end=4738 + _ACKNOWLEDGEREQUEST._serialized_start=4740 + _ACKNOWLEDGEREQUEST._serialized_end=4783 + _DATAREQUEST._serialized_start=4786 + _DATAREQUEST._serialized_end=5496 + _DATARESPONSE._serialized_start=5499 + _DATARESPONSE._serialized_end=6192 + _LOGSETTINGSREQUEST._serialized_start=6194 + _LOGSETTINGSREQUEST._serialized_end=6268 + _LOGDATA._serialized_start=6270 + _LOGDATA._serialized_end=6339 + _RAYLETDRIVER._serialized_start=6363 + _RAYLETDRIVER._serialized_end=7409 + _RAYLETDATASTREAMER._serialized_start=7411 + _RAYLETDATASTREAMER._serialized_end=7494 + _RAYLETLOGSTREAMER._serialized_start=7496 + _RAYLETLOGSTREAMER._serialized_end=7581 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/ray_client_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/ray_client_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..f5b943012c5e9b4a1d80057da89aa9ae3820cfcc --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/ray_client_pb2_grpc.py @@ -0,0 +1,650 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import ray_client_pb2 as src_dot_ray_dot_protobuf_dot_ray__client__pb2 + + +class RayletDriverStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Init = channel.unary_unary( + '/ray.rpc.RayletDriver/Init', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.InitRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.InitResponse.FromString, + ) + self.PrepRuntimeEnv = channel.unary_unary( + '/ray.rpc.RayletDriver/PrepRuntimeEnv', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.PrepRuntimeEnvRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.PrepRuntimeEnvResponse.FromString, + ) + self.GetObject = channel.unary_stream( + '/ray.rpc.RayletDriver/GetObject', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.GetRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.GetResponse.FromString, + ) + self.PutObject = channel.unary_unary( + '/ray.rpc.RayletDriver/PutObject', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.PutRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.PutResponse.FromString, + ) + self.WaitObject = channel.unary_unary( + '/ray.rpc.RayletDriver/WaitObject', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.WaitRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.WaitResponse.FromString, + ) + self.Schedule = channel.unary_unary( + '/ray.rpc.RayletDriver/Schedule', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientTask.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientTaskTicket.FromString, + ) + self.Terminate = channel.unary_unary( + '/ray.rpc.RayletDriver/Terminate', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.TerminateRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.TerminateResponse.FromString, + ) + self.ClusterInfo = channel.unary_unary( + '/ray.rpc.RayletDriver/ClusterInfo', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClusterInfoRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClusterInfoResponse.FromString, + ) + self.KVGet = channel.unary_unary( + '/ray.rpc.RayletDriver/KVGet', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVGetRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVGetResponse.FromString, + ) + self.KVPut = channel.unary_unary( + '/ray.rpc.RayletDriver/KVPut', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVPutRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVPutResponse.FromString, + ) + self.KVDel = channel.unary_unary( + '/ray.rpc.RayletDriver/KVDel', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVDelRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVDelResponse.FromString, + ) + self.KVList = channel.unary_unary( + '/ray.rpc.RayletDriver/KVList', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVListRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVListResponse.FromString, + ) + self.KVExists = channel.unary_unary( + '/ray.rpc.RayletDriver/KVExists', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVExistsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVExistsResponse.FromString, + ) + self.ListNamedActors = channel.unary_unary( + '/ray.rpc.RayletDriver/ListNamedActors', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientListNamedActorsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientListNamedActorsResponse.FromString, + ) + self.PinRuntimeEnvURI = channel.unary_unary( + '/ray.rpc.RayletDriver/PinRuntimeEnvURI', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientPinRuntimeEnvURIRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientPinRuntimeEnvURIResponse.FromString, + ) + + +class RayletDriverServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Init(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PrepRuntimeEnv(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetObject(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PutObject(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def WaitObject(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Schedule(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Terminate(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ClusterInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def KVGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def KVPut(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def KVDel(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def KVList(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def KVExists(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListNamedActors(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PinRuntimeEnvURI(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_RayletDriverServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Init': grpc.unary_unary_rpc_method_handler( + servicer.Init, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.InitRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.InitResponse.SerializeToString, + ), + 'PrepRuntimeEnv': grpc.unary_unary_rpc_method_handler( + servicer.PrepRuntimeEnv, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.PrepRuntimeEnvRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.PrepRuntimeEnvResponse.SerializeToString, + ), + 'GetObject': grpc.unary_stream_rpc_method_handler( + servicer.GetObject, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.GetRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.GetResponse.SerializeToString, + ), + 'PutObject': grpc.unary_unary_rpc_method_handler( + servicer.PutObject, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.PutRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.PutResponse.SerializeToString, + ), + 'WaitObject': grpc.unary_unary_rpc_method_handler( + servicer.WaitObject, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.WaitRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.WaitResponse.SerializeToString, + ), + 'Schedule': grpc.unary_unary_rpc_method_handler( + servicer.Schedule, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientTask.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientTaskTicket.SerializeToString, + ), + 'Terminate': grpc.unary_unary_rpc_method_handler( + servicer.Terminate, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.TerminateRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.TerminateResponse.SerializeToString, + ), + 'ClusterInfo': grpc.unary_unary_rpc_method_handler( + servicer.ClusterInfo, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClusterInfoRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClusterInfoResponse.SerializeToString, + ), + 'KVGet': grpc.unary_unary_rpc_method_handler( + servicer.KVGet, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVGetRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVGetResponse.SerializeToString, + ), + 'KVPut': grpc.unary_unary_rpc_method_handler( + servicer.KVPut, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVPutRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVPutResponse.SerializeToString, + ), + 'KVDel': grpc.unary_unary_rpc_method_handler( + servicer.KVDel, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVDelRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVDelResponse.SerializeToString, + ), + 'KVList': grpc.unary_unary_rpc_method_handler( + servicer.KVList, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVListRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVListResponse.SerializeToString, + ), + 'KVExists': grpc.unary_unary_rpc_method_handler( + servicer.KVExists, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVExistsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVExistsResponse.SerializeToString, + ), + 'ListNamedActors': grpc.unary_unary_rpc_method_handler( + servicer.ListNamedActors, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientListNamedActorsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientListNamedActorsResponse.SerializeToString, + ), + 'PinRuntimeEnvURI': grpc.unary_unary_rpc_method_handler( + servicer.PinRuntimeEnvURI, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientPinRuntimeEnvURIRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientPinRuntimeEnvURIResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.RayletDriver', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class RayletDriver(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Init(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/Init', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.InitRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.InitResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PrepRuntimeEnv(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/PrepRuntimeEnv', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.PrepRuntimeEnvRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.PrepRuntimeEnvResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetObject(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ray.rpc.RayletDriver/GetObject', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.GetRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.GetResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PutObject(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/PutObject', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.PutRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.PutResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def WaitObject(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/WaitObject', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.WaitRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.WaitResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Schedule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/Schedule', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientTask.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientTaskTicket.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Terminate(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/Terminate', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.TerminateRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.TerminateResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ClusterInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/ClusterInfo', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClusterInfoRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClusterInfoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def KVGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/KVGet', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVGetRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVGetResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def KVPut(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/KVPut', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVPutRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVPutResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def KVDel(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/KVDel', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVDelRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVDelResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def KVList(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/KVList', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVListRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def KVExists(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/KVExists', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVExistsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.KVExistsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListNamedActors(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/ListNamedActors', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientListNamedActorsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientListNamedActorsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PinRuntimeEnvURI(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.RayletDriver/PinRuntimeEnvURI', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientPinRuntimeEnvURIRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.ClientPinRuntimeEnvURIResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class RayletDataStreamerStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Datapath = channel.stream_stream( + '/ray.rpc.RayletDataStreamer/Datapath', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.DataRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.DataResponse.FromString, + ) + + +class RayletDataStreamerServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Datapath(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_RayletDataStreamerServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Datapath': grpc.stream_stream_rpc_method_handler( + servicer.Datapath, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.DataRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.DataResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.RayletDataStreamer', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class RayletDataStreamer(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Datapath(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/ray.rpc.RayletDataStreamer/Datapath', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.DataRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.DataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class RayletLogStreamerStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Logstream = channel.stream_stream( + '/ray.rpc.RayletLogStreamer/Logstream', + request_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.LogSettingsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.LogData.FromString, + ) + + +class RayletLogStreamerServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Logstream(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_RayletLogStreamerServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Logstream': grpc.stream_stream_rpc_method_handler( + servicer.Logstream, + request_deserializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.LogSettingsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_ray__client__pb2.LogData.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.RayletLogStreamer', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class RayletLogStreamer(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Logstream(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/ray.rpc.RayletLogStreamer/Logstream', + src_dot_ray_dot_protobuf_dot_ray__client__pb2.LogSettingsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_ray__client__pb2.LogData.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/reporter_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/reporter_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..5aaac3a5d0a17ddb8cbaeaf254bb885930f56b65 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/reporter_pb2.py @@ -0,0 +1,171 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/reporter.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import metrics_pb2 as opencensus_dot_proto_dot_metrics_dot_v1_dot_metrics__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fsrc/ray/protobuf/reporter.proto\x12\x07ray.rpc\x1a)opencensus/proto/metrics/v1/metrics.proto\"O\n\x13GetTracebackRequest\x12\x10\n\x03pid\x18\x01 \x01(\rR\x03pid\x12\x1b\n\x06native\x18\x02 \x01(\x08H\x00R\x06native\x88\x01\x01\x42\t\n\x07_native\"E\n\x11GetTracebackReply\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x16\n\x06output\x18\x02 \x01(\tR\x06output\"\xa5\x01\n\x13\x43puProfilingRequest\x12\x10\n\x03pid\x18\x01 \x01(\rR\x03pid\x12\x1b\n\x06\x66ormat\x18\x02 \x01(\tH\x00R\x06\x66ormat\x88\x01\x01\x12\x1f\n\x08\x64uration\x18\x03 \x01(\rH\x01R\x08\x64uration\x88\x01\x01\x12\x1b\n\x06native\x18\x04 \x01(\x08H\x02R\x06native\x88\x01\x01\x42\t\n\x07_formatB\x0b\n\t_durationB\t\n\x07_native\"E\n\x11\x43puProfilingReply\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x16\n\x06output\x18\x02 \x01(\tR\x06output\"f\n\x13GpuProfilingRequest\x12\x10\n\x03pid\x18\x01 \x01(\rR\x03pid\x12*\n\x0enum_iterations\x18\x02 \x01(\rH\x00R\rnumIterations\x88\x01\x01\x42\x11\n\x0f_num_iterations\"E\n\x11GpuProfilingReply\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x16\n\x06output\x18\x02 \x01(\tR\x06output\"\xa6\x02\n\x16MemoryProfilingRequest\x12\x10\n\x03pid\x18\x01 \x01(\rR\x03pid\x12\x1b\n\x06\x66ormat\x18\x02 \x01(\tH\x00R\x06\x66ormat\x88\x01\x01\x12\x1f\n\x08\x64uration\x18\x03 \x01(\rH\x01R\x08\x64uration\x88\x01\x01\x12\x1b\n\x06native\x18\x04 \x01(\x08H\x02R\x06native\x88\x01\x01\x12\x19\n\x05leaks\x18\x05 \x01(\x08H\x03R\x05leaks\x88\x01\x01\x12;\n\x17trace_python_allocators\x18\x06 \x01(\x08H\x04R\x15tracePythonAllocators\x88\x01\x01\x42\t\n\x07_formatB\x0b\n\t_durationB\t\n\x07_nativeB\x08\n\x06_leaksB\x1a\n\x18_trace_python_allocators\"s\n\x14MemoryProfilingReply\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x16\n\x06output\x18\x02 \x01(\tR\x06output\x12\x1d\n\x07warning\x18\x03 \x01(\tH\x00R\x07warning\x88\x01\x01\x42\n\n\x08_warning\"t\n\x16ReportOCMetricsRequest\x12=\n\x07metrics\x18\x01 \x03(\x0b\x32#.opencensus.proto.metrics.v1.MetricR\x07metrics\x12\x1b\n\tworker_id\x18\x02 \x01(\x0cR\x08workerId\"\x16\n\x14ReportOCMetricsReply\"\x94\x02\n\x10StreamLogRequest\x12\"\n\rlog_file_name\x18\x01 \x01(\tR\x0blogFileName\x12\x1d\n\nkeep_alive\x18\x02 \x01(\x08R\tkeepAlive\x12\x19\n\x05lines\x18\x03 \x01(\x05H\x00R\x05lines\x88\x01\x01\x12\x1f\n\x08interval\x18\x04 \x01(\x02H\x01R\x08interval\x88\x01\x01\x12&\n\x0cstart_offset\x18\x05 \x01(\x05H\x02R\x0bstartOffset\x88\x01\x01\x12\"\n\nend_offset\x18\x06 \x01(\x05H\x03R\tendOffset\x88\x01\x01\x42\x08\n\x06_linesB\x0b\n\t_intervalB\x0f\n\r_start_offsetB\r\n\x0b_end_offset\"$\n\x0eStreamLogReply\x12\x12\n\x04\x64\x61ta\x18\x01 \x01(\x0cR\x04\x64\x61ta\"2\n\x0fListLogsRequest\x12\x1f\n\x0bglob_filter\x18\x01 \x01(\tR\nglobFilter\",\n\rListLogsReply\x12\x1b\n\tlog_files\x18\x01 \x03(\tR\x08logFiles2\x95\x03\n\x0fReporterService\x12Q\n\x0fReportOCMetrics\x12\x1f.ray.rpc.ReportOCMetricsRequest\x1a\x1d.ray.rpc.ReportOCMetricsReply\x12H\n\x0cGetTraceback\x12\x1c.ray.rpc.GetTracebackRequest\x1a\x1a.ray.rpc.GetTracebackReply\x12H\n\x0c\x43puProfiling\x12\x1c.ray.rpc.CpuProfilingRequest\x1a\x1a.ray.rpc.CpuProfilingReply\x12H\n\x0cGpuProfiling\x12\x1c.ray.rpc.GpuProfilingRequest\x1a\x1a.ray.rpc.GpuProfilingReply\x12Q\n\x0fMemoryProfiling\x12\x1f.ray.rpc.MemoryProfilingRequest\x1a\x1d.ray.rpc.MemoryProfilingReply2\x8d\x01\n\nLogService\x12<\n\x08ListLogs\x12\x18.ray.rpc.ListLogsRequest\x1a\x16.ray.rpc.ListLogsReply\x12\x41\n\tStreamLog\x12\x19.ray.rpc.StreamLogRequest\x1a\x17.ray.rpc.StreamLogReply0\x01\x62\x06proto3') + + + +_GETTRACEBACKREQUEST = DESCRIPTOR.message_types_by_name['GetTracebackRequest'] +_GETTRACEBACKREPLY = DESCRIPTOR.message_types_by_name['GetTracebackReply'] +_CPUPROFILINGREQUEST = DESCRIPTOR.message_types_by_name['CpuProfilingRequest'] +_CPUPROFILINGREPLY = DESCRIPTOR.message_types_by_name['CpuProfilingReply'] +_GPUPROFILINGREQUEST = DESCRIPTOR.message_types_by_name['GpuProfilingRequest'] +_GPUPROFILINGREPLY = DESCRIPTOR.message_types_by_name['GpuProfilingReply'] +_MEMORYPROFILINGREQUEST = DESCRIPTOR.message_types_by_name['MemoryProfilingRequest'] +_MEMORYPROFILINGREPLY = DESCRIPTOR.message_types_by_name['MemoryProfilingReply'] +_REPORTOCMETRICSREQUEST = DESCRIPTOR.message_types_by_name['ReportOCMetricsRequest'] +_REPORTOCMETRICSREPLY = DESCRIPTOR.message_types_by_name['ReportOCMetricsReply'] +_STREAMLOGREQUEST = DESCRIPTOR.message_types_by_name['StreamLogRequest'] +_STREAMLOGREPLY = DESCRIPTOR.message_types_by_name['StreamLogReply'] +_LISTLOGSREQUEST = DESCRIPTOR.message_types_by_name['ListLogsRequest'] +_LISTLOGSREPLY = DESCRIPTOR.message_types_by_name['ListLogsReply'] +GetTracebackRequest = _reflection.GeneratedProtocolMessageType('GetTracebackRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETTRACEBACKREQUEST, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTracebackRequest) + }) +_sym_db.RegisterMessage(GetTracebackRequest) + +GetTracebackReply = _reflection.GeneratedProtocolMessageType('GetTracebackReply', (_message.Message,), { + 'DESCRIPTOR' : _GETTRACEBACKREPLY, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetTracebackReply) + }) +_sym_db.RegisterMessage(GetTracebackReply) + +CpuProfilingRequest = _reflection.GeneratedProtocolMessageType('CpuProfilingRequest', (_message.Message,), { + 'DESCRIPTOR' : _CPUPROFILINGREQUEST, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CpuProfilingRequest) + }) +_sym_db.RegisterMessage(CpuProfilingRequest) + +CpuProfilingReply = _reflection.GeneratedProtocolMessageType('CpuProfilingReply', (_message.Message,), { + 'DESCRIPTOR' : _CPUPROFILINGREPLY, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.CpuProfilingReply) + }) +_sym_db.RegisterMessage(CpuProfilingReply) + +GpuProfilingRequest = _reflection.GeneratedProtocolMessageType('GpuProfilingRequest', (_message.Message,), { + 'DESCRIPTOR' : _GPUPROFILINGREQUEST, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GpuProfilingRequest) + }) +_sym_db.RegisterMessage(GpuProfilingRequest) + +GpuProfilingReply = _reflection.GeneratedProtocolMessageType('GpuProfilingReply', (_message.Message,), { + 'DESCRIPTOR' : _GPUPROFILINGREPLY, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GpuProfilingReply) + }) +_sym_db.RegisterMessage(GpuProfilingReply) + +MemoryProfilingRequest = _reflection.GeneratedProtocolMessageType('MemoryProfilingRequest', (_message.Message,), { + 'DESCRIPTOR' : _MEMORYPROFILINGREQUEST, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.MemoryProfilingRequest) + }) +_sym_db.RegisterMessage(MemoryProfilingRequest) + +MemoryProfilingReply = _reflection.GeneratedProtocolMessageType('MemoryProfilingReply', (_message.Message,), { + 'DESCRIPTOR' : _MEMORYPROFILINGREPLY, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.MemoryProfilingReply) + }) +_sym_db.RegisterMessage(MemoryProfilingReply) + +ReportOCMetricsRequest = _reflection.GeneratedProtocolMessageType('ReportOCMetricsRequest', (_message.Message,), { + 'DESCRIPTOR' : _REPORTOCMETRICSREQUEST, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportOCMetricsRequest) + }) +_sym_db.RegisterMessage(ReportOCMetricsRequest) + +ReportOCMetricsReply = _reflection.GeneratedProtocolMessageType('ReportOCMetricsReply', (_message.Message,), { + 'DESCRIPTOR' : _REPORTOCMETRICSREPLY, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ReportOCMetricsReply) + }) +_sym_db.RegisterMessage(ReportOCMetricsReply) + +StreamLogRequest = _reflection.GeneratedProtocolMessageType('StreamLogRequest', (_message.Message,), { + 'DESCRIPTOR' : _STREAMLOGREQUEST, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.StreamLogRequest) + }) +_sym_db.RegisterMessage(StreamLogRequest) + +StreamLogReply = _reflection.GeneratedProtocolMessageType('StreamLogReply', (_message.Message,), { + 'DESCRIPTOR' : _STREAMLOGREPLY, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.StreamLogReply) + }) +_sym_db.RegisterMessage(StreamLogReply) + +ListLogsRequest = _reflection.GeneratedProtocolMessageType('ListLogsRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOGSREQUEST, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ListLogsRequest) + }) +_sym_db.RegisterMessage(ListLogsRequest) + +ListLogsReply = _reflection.GeneratedProtocolMessageType('ListLogsReply', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOGSREPLY, + '__module__' : 'src.ray.protobuf.reporter_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.ListLogsReply) + }) +_sym_db.RegisterMessage(ListLogsReply) + +_REPORTERSERVICE = DESCRIPTOR.services_by_name['ReporterService'] +_LOGSERVICE = DESCRIPTOR.services_by_name['LogService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _GETTRACEBACKREQUEST._serialized_start=87 + _GETTRACEBACKREQUEST._serialized_end=166 + _GETTRACEBACKREPLY._serialized_start=168 + _GETTRACEBACKREPLY._serialized_end=237 + _CPUPROFILINGREQUEST._serialized_start=240 + _CPUPROFILINGREQUEST._serialized_end=405 + _CPUPROFILINGREPLY._serialized_start=407 + _CPUPROFILINGREPLY._serialized_end=476 + _GPUPROFILINGREQUEST._serialized_start=478 + _GPUPROFILINGREQUEST._serialized_end=580 + _GPUPROFILINGREPLY._serialized_start=582 + _GPUPROFILINGREPLY._serialized_end=651 + _MEMORYPROFILINGREQUEST._serialized_start=654 + _MEMORYPROFILINGREQUEST._serialized_end=948 + _MEMORYPROFILINGREPLY._serialized_start=950 + _MEMORYPROFILINGREPLY._serialized_end=1065 + _REPORTOCMETRICSREQUEST._serialized_start=1067 + _REPORTOCMETRICSREQUEST._serialized_end=1183 + _REPORTOCMETRICSREPLY._serialized_start=1185 + _REPORTOCMETRICSREPLY._serialized_end=1207 + _STREAMLOGREQUEST._serialized_start=1210 + _STREAMLOGREQUEST._serialized_end=1486 + _STREAMLOGREPLY._serialized_start=1488 + _STREAMLOGREPLY._serialized_end=1524 + _LISTLOGSREQUEST._serialized_start=1526 + _LISTLOGSREQUEST._serialized_end=1576 + _LISTLOGSREPLY._serialized_start=1578 + _LISTLOGSREPLY._serialized_end=1622 + _REPORTERSERVICE._serialized_start=1625 + _REPORTERSERVICE._serialized_end=2030 + _LOGSERVICE._serialized_start=2033 + _LOGSERVICE._serialized_end=2174 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/reporter_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/reporter_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..c3ca91fced67427e24dc3b6e2a650791b394288f --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/reporter_pb2_grpc.py @@ -0,0 +1,292 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import reporter_pb2 as src_dot_ray_dot_protobuf_dot_reporter__pb2 + + +class ReporterServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ReportOCMetrics = channel.unary_unary( + '/ray.rpc.ReporterService/ReportOCMetrics', + request_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.ReportOCMetricsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.ReportOCMetricsReply.FromString, + ) + self.GetTraceback = channel.unary_unary( + '/ray.rpc.ReporterService/GetTraceback', + request_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.GetTracebackRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.GetTracebackReply.FromString, + ) + self.CpuProfiling = channel.unary_unary( + '/ray.rpc.ReporterService/CpuProfiling', + request_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.CpuProfilingRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.CpuProfilingReply.FromString, + ) + self.GpuProfiling = channel.unary_unary( + '/ray.rpc.ReporterService/GpuProfiling', + request_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.GpuProfilingRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.GpuProfilingReply.FromString, + ) + self.MemoryProfiling = channel.unary_unary( + '/ray.rpc.ReporterService/MemoryProfiling', + request_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.MemoryProfilingRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.MemoryProfilingReply.FromString, + ) + + +class ReporterServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ReportOCMetrics(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTraceback(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CpuProfiling(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GpuProfiling(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def MemoryProfiling(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ReporterServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ReportOCMetrics': grpc.unary_unary_rpc_method_handler( + servicer.ReportOCMetrics, + request_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.ReportOCMetricsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.ReportOCMetricsReply.SerializeToString, + ), + 'GetTraceback': grpc.unary_unary_rpc_method_handler( + servicer.GetTraceback, + request_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.GetTracebackRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.GetTracebackReply.SerializeToString, + ), + 'CpuProfiling': grpc.unary_unary_rpc_method_handler( + servicer.CpuProfiling, + request_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.CpuProfilingRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.CpuProfilingReply.SerializeToString, + ), + 'GpuProfiling': grpc.unary_unary_rpc_method_handler( + servicer.GpuProfiling, + request_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.GpuProfilingRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.GpuProfilingReply.SerializeToString, + ), + 'MemoryProfiling': grpc.unary_unary_rpc_method_handler( + servicer.MemoryProfiling, + request_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.MemoryProfilingRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.MemoryProfilingReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.ReporterService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ReporterService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ReportOCMetrics(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ReporterService/ReportOCMetrics', + src_dot_ray_dot_protobuf_dot_reporter__pb2.ReportOCMetricsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_reporter__pb2.ReportOCMetricsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetTraceback(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ReporterService/GetTraceback', + src_dot_ray_dot_protobuf_dot_reporter__pb2.GetTracebackRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_reporter__pb2.GetTracebackReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CpuProfiling(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ReporterService/CpuProfiling', + src_dot_ray_dot_protobuf_dot_reporter__pb2.CpuProfilingRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_reporter__pb2.CpuProfilingReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GpuProfiling(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ReporterService/GpuProfiling', + src_dot_ray_dot_protobuf_dot_reporter__pb2.GpuProfilingRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_reporter__pb2.GpuProfilingReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def MemoryProfiling(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.ReporterService/MemoryProfiling', + src_dot_ray_dot_protobuf_dot_reporter__pb2.MemoryProfilingRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_reporter__pb2.MemoryProfilingReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class LogServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListLogs = channel.unary_unary( + '/ray.rpc.LogService/ListLogs', + request_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.ListLogsRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.ListLogsReply.FromString, + ) + self.StreamLog = channel.unary_stream( + '/ray.rpc.LogService/StreamLog', + request_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.StreamLogRequest.SerializeToString, + response_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.StreamLogReply.FromString, + ) + + +class LogServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ListLogs(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def StreamLog(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_LogServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListLogs': grpc.unary_unary_rpc_method_handler( + servicer.ListLogs, + request_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.ListLogsRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.ListLogsReply.SerializeToString, + ), + 'StreamLog': grpc.unary_stream_rpc_method_handler( + servicer.StreamLog, + request_deserializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.StreamLogRequest.FromString, + response_serializer=src_dot_ray_dot_protobuf_dot_reporter__pb2.StreamLogReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ray.rpc.LogService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class LogService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ListLogs(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ray.rpc.LogService/ListLogs', + src_dot_ray_dot_protobuf_dot_reporter__pb2.ListLogsRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_reporter__pb2.ListLogsReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def StreamLog(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ray.rpc.LogService/StreamLog', + src_dot_ray_dot_protobuf_dot_reporter__pb2.StreamLogRequest.SerializeToString, + src_dot_ray_dot_protobuf_dot_reporter__pb2.StreamLogReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/resource_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/resource_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..434c79158573f0853a3a4e8c51c3f74dd6797b0c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/resource_pb2.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: opencensus/proto/resource/v1/resource.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+opencensus/proto/resource/v1/resource.proto\x12\x1copencensus.proto.resource.v1\"\xa5\x01\n\x08Resource\x12\x12\n\x04type\x18\x01 \x01(\tR\x04type\x12J\n\x06labels\x18\x02 \x03(\x0b\x32\x32.opencensus.proto.resource.v1.Resource.LabelsEntryR\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\x98\x01\n\x1fio.opencensus.proto.resource.v1B\rResourceProtoP\x01ZEgithub.com/census-instrumentation/opencensus-proto/gen-go/resource/v1\xea\x02\x1cOpenCensus.Proto.Resource.V1b\x06proto3') + + + +_RESOURCE = DESCRIPTOR.message_types_by_name['Resource'] +_RESOURCE_LABELSENTRY = _RESOURCE.nested_types_by_name['LabelsEntry'] +Resource = _reflection.GeneratedProtocolMessageType('Resource', (_message.Message,), { + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESOURCE_LABELSENTRY, + '__module__' : 'opencensus.proto.resource.v1.resource_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.resource.v1.Resource.LabelsEntry) + }) + , + 'DESCRIPTOR' : _RESOURCE, + '__module__' : 'opencensus.proto.resource.v1.resource_pb2' + # @@protoc_insertion_point(class_scope:opencensus.proto.resource.v1.Resource) + }) +_sym_db.RegisterMessage(Resource) +_sym_db.RegisterMessage(Resource.LabelsEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\037io.opencensus.proto.resource.v1B\rResourceProtoP\001ZEgithub.com/census-instrumentation/opencensus-proto/gen-go/resource/v1\352\002\034OpenCensus.Proto.Resource.V1' + _RESOURCE_LABELSENTRY._options = None + _RESOURCE_LABELSENTRY._serialized_options = b'8\001' + _RESOURCE._serialized_start=78 + _RESOURCE._serialized_end=243 + _RESOURCE_LABELSENTRY._serialized_start=186 + _RESOURCE_LABELSENTRY._serialized_end=243 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/resource_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/resource_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/resource_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_agent_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_agent_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..1c0852917958f43c2dee701d0b1db2ccd4121f96 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_agent_pb2.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/runtime_env_agent.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import runtime_env_common_pb2 as src_dot_ray_dot_protobuf_dot_runtime__env__common__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(src/ray/protobuf/runtime_env_agent.proto\x12\x07ray.rpc\x1a)src/ray/protobuf/runtime_env_common.proto\"\xdb\x01\n\x1cGetOrCreateRuntimeEnvRequest\x12\x34\n\x16serialized_runtime_env\x18\x01 \x01(\tR\x14serializedRuntimeEnv\x12G\n\x12runtime_env_config\x18\x02 \x01(\x0b\x32\x19.ray.rpc.RuntimeEnvConfigR\x10runtimeEnvConfig\x12\x15\n\x06job_id\x18\x03 \x01(\x0cR\x05jobId\x12%\n\x0esource_process\x18\x04 \x01(\tR\rsourceProcess\"\xb7\x01\n\x1aGetOrCreateRuntimeEnvReply\x12/\n\x06status\x18\x01 \x01(\x0e\x32\x17.ray.rpc.AgentRpcStatusR\x06status\x12#\n\rerror_message\x18\x02 \x01(\tR\x0c\x65rrorMessage\x12\x43\n\x1eserialized_runtime_env_context\x18\x03 \x01(\tR\x1bserializedRuntimeEnvContext\"\x80\x01\n!DeleteRuntimeEnvIfPossibleRequest\x12\x34\n\x16serialized_runtime_env\x18\x01 \x01(\tR\x14serializedRuntimeEnv\x12%\n\x0esource_process\x18\x02 \x01(\tR\rsourceProcess\"w\n\x1f\x44\x65leteRuntimeEnvIfPossibleReply\x12/\n\x06status\x18\x01 \x01(\x0e\x32\x17.ray.rpc.AgentRpcStatusR\x06status\x12#\n\rerror_message\x18\x02 \x01(\tR\x0c\x65rrorMessage\"@\n\x19GetRuntimeEnvsInfoRequest\x12\x19\n\x05limit\x18\x01 \x01(\x03H\x00R\x05limit\x88\x01\x01\x42\x08\n\x06_limit\"w\n\x17GetRuntimeEnvsInfoReply\x12\x46\n\x12runtime_env_states\x18\x01 \x03(\x0b\x32\x18.ray.rpc.RuntimeEnvStateR\x10runtimeEnvStates\x12\x14\n\x05total\x18\x02 \x01(\x03R\x05total*F\n\x0e\x41gentRpcStatus\x12\x17\n\x13\x41GENT_RPC_STATUS_OK\x10\x00\x12\x1b\n\x17\x41GENT_RPC_STATUS_FAILED\x10\x01\x62\x06proto3') + +_AGENTRPCSTATUS = DESCRIPTOR.enum_types_by_name['AgentRpcStatus'] +AgentRpcStatus = enum_type_wrapper.EnumTypeWrapper(_AGENTRPCSTATUS) +AGENT_RPC_STATUS_OK = 0 +AGENT_RPC_STATUS_FAILED = 1 + + +_GETORCREATERUNTIMEENVREQUEST = DESCRIPTOR.message_types_by_name['GetOrCreateRuntimeEnvRequest'] +_GETORCREATERUNTIMEENVREPLY = DESCRIPTOR.message_types_by_name['GetOrCreateRuntimeEnvReply'] +_DELETERUNTIMEENVIFPOSSIBLEREQUEST = DESCRIPTOR.message_types_by_name['DeleteRuntimeEnvIfPossibleRequest'] +_DELETERUNTIMEENVIFPOSSIBLEREPLY = DESCRIPTOR.message_types_by_name['DeleteRuntimeEnvIfPossibleReply'] +_GETRUNTIMEENVSINFOREQUEST = DESCRIPTOR.message_types_by_name['GetRuntimeEnvsInfoRequest'] +_GETRUNTIMEENVSINFOREPLY = DESCRIPTOR.message_types_by_name['GetRuntimeEnvsInfoReply'] +GetOrCreateRuntimeEnvRequest = _reflection.GeneratedProtocolMessageType('GetOrCreateRuntimeEnvRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETORCREATERUNTIMEENVREQUEST, + '__module__' : 'src.ray.protobuf.runtime_env_agent_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetOrCreateRuntimeEnvRequest) + }) +_sym_db.RegisterMessage(GetOrCreateRuntimeEnvRequest) + +GetOrCreateRuntimeEnvReply = _reflection.GeneratedProtocolMessageType('GetOrCreateRuntimeEnvReply', (_message.Message,), { + 'DESCRIPTOR' : _GETORCREATERUNTIMEENVREPLY, + '__module__' : 'src.ray.protobuf.runtime_env_agent_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetOrCreateRuntimeEnvReply) + }) +_sym_db.RegisterMessage(GetOrCreateRuntimeEnvReply) + +DeleteRuntimeEnvIfPossibleRequest = _reflection.GeneratedProtocolMessageType('DeleteRuntimeEnvIfPossibleRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETERUNTIMEENVIFPOSSIBLEREQUEST, + '__module__' : 'src.ray.protobuf.runtime_env_agent_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DeleteRuntimeEnvIfPossibleRequest) + }) +_sym_db.RegisterMessage(DeleteRuntimeEnvIfPossibleRequest) + +DeleteRuntimeEnvIfPossibleReply = _reflection.GeneratedProtocolMessageType('DeleteRuntimeEnvIfPossibleReply', (_message.Message,), { + 'DESCRIPTOR' : _DELETERUNTIMEENVIFPOSSIBLEREPLY, + '__module__' : 'src.ray.protobuf.runtime_env_agent_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.DeleteRuntimeEnvIfPossibleReply) + }) +_sym_db.RegisterMessage(DeleteRuntimeEnvIfPossibleReply) + +GetRuntimeEnvsInfoRequest = _reflection.GeneratedProtocolMessageType('GetRuntimeEnvsInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETRUNTIMEENVSINFOREQUEST, + '__module__' : 'src.ray.protobuf.runtime_env_agent_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetRuntimeEnvsInfoRequest) + }) +_sym_db.RegisterMessage(GetRuntimeEnvsInfoRequest) + +GetRuntimeEnvsInfoReply = _reflection.GeneratedProtocolMessageType('GetRuntimeEnvsInfoReply', (_message.Message,), { + 'DESCRIPTOR' : _GETRUNTIMEENVSINFOREPLY, + '__module__' : 'src.ray.protobuf.runtime_env_agent_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.GetRuntimeEnvsInfoReply) + }) +_sym_db.RegisterMessage(GetRuntimeEnvsInfoReply) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _AGENTRPCSTATUS._serialized_start=943 + _AGENTRPCSTATUS._serialized_end=1013 + _GETORCREATERUNTIMEENVREQUEST._serialized_start=97 + _GETORCREATERUNTIMEENVREQUEST._serialized_end=316 + _GETORCREATERUNTIMEENVREPLY._serialized_start=319 + _GETORCREATERUNTIMEENVREPLY._serialized_end=502 + _DELETERUNTIMEENVIFPOSSIBLEREQUEST._serialized_start=505 + _DELETERUNTIMEENVIFPOSSIBLEREQUEST._serialized_end=633 + _DELETERUNTIMEENVIFPOSSIBLEREPLY._serialized_start=635 + _DELETERUNTIMEENVIFPOSSIBLEREPLY._serialized_end=754 + _GETRUNTIMEENVSINFOREQUEST._serialized_start=756 + _GETRUNTIMEENVSINFOREQUEST._serialized_end=820 + _GETRUNTIMEENVSINFOREPLY._serialized_start=822 + _GETRUNTIMEENVSINFOREPLY._serialized_end=941 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_agent_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_agent_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_agent_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_common_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_common_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..06037bd99155eb15b8cfc16574fa925fdf6785e9 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_common_pb2.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/runtime_env_common.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)src/ray/protobuf/runtime_env_common.proto\x12\x07ray.rpc\"`\n\x0eRuntimeEnvUris\x12&\n\x0fworking_dir_uri\x18\x01 \x01(\tR\rworkingDirUri\x12&\n\x0fpy_modules_uris\x18\x02 \x03(\tR\rpyModulesUris\"\x88\x01\n\x10RuntimeEnvConfig\x12\x32\n\x15setup_timeout_seconds\x18\x01 \x01(\x05R\x13setupTimeoutSeconds\x12#\n\reager_install\x18\x02 \x01(\x08R\x0c\x65\x61gerInstall\x12\x1b\n\tlog_files\x18\x03 \x03(\tR\x08logFiles\"\xbc\x01\n\x0eRuntimeEnvInfo\x12\x34\n\x16serialized_runtime_env\x18\x01 \x01(\tR\x14serializedRuntimeEnv\x12+\n\x04uris\x18\x02 \x01(\x0b\x32\x17.ray.rpc.RuntimeEnvUrisR\x04uris\x12G\n\x12runtime_env_config\x18\x03 \x01(\x0b\x32\x19.ray.rpc.RuntimeEnvConfigR\x10runtimeEnvConfig\"\xdf\x01\n\x0fRuntimeEnvState\x12\x1f\n\x0bruntime_env\x18\x01 \x01(\tR\nruntimeEnv\x12\x17\n\x07ref_cnt\x18\x02 \x01(\x03R\x06refCnt\x12\x1d\n\x07success\x18\x03 \x01(\x08H\x00R\x07success\x88\x01\x01\x12\x19\n\x05\x65rror\x18\x04 \x01(\tH\x01R\x05\x65rror\x88\x01\x01\x12-\n\x10\x63reation_time_ms\x18\x05 \x01(\x03H\x02R\x0e\x63reationTimeMs\x88\x01\x01\x42\n\n\x08_successB\x08\n\x06_errorB\x13\n\x11_creation_time_msB\x1a\n\x18io.ray.runtime.generatedb\x06proto3') + + + +_RUNTIMEENVURIS = DESCRIPTOR.message_types_by_name['RuntimeEnvUris'] +_RUNTIMEENVCONFIG = DESCRIPTOR.message_types_by_name['RuntimeEnvConfig'] +_RUNTIMEENVINFO = DESCRIPTOR.message_types_by_name['RuntimeEnvInfo'] +_RUNTIMEENVSTATE = DESCRIPTOR.message_types_by_name['RuntimeEnvState'] +RuntimeEnvUris = _reflection.GeneratedProtocolMessageType('RuntimeEnvUris', (_message.Message,), { + 'DESCRIPTOR' : _RUNTIMEENVURIS, + '__module__' : 'src.ray.protobuf.runtime_env_common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RuntimeEnvUris) + }) +_sym_db.RegisterMessage(RuntimeEnvUris) + +RuntimeEnvConfig = _reflection.GeneratedProtocolMessageType('RuntimeEnvConfig', (_message.Message,), { + 'DESCRIPTOR' : _RUNTIMEENVCONFIG, + '__module__' : 'src.ray.protobuf.runtime_env_common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RuntimeEnvConfig) + }) +_sym_db.RegisterMessage(RuntimeEnvConfig) + +RuntimeEnvInfo = _reflection.GeneratedProtocolMessageType('RuntimeEnvInfo', (_message.Message,), { + 'DESCRIPTOR' : _RUNTIMEENVINFO, + '__module__' : 'src.ray.protobuf.runtime_env_common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RuntimeEnvInfo) + }) +_sym_db.RegisterMessage(RuntimeEnvInfo) + +RuntimeEnvState = _reflection.GeneratedProtocolMessageType('RuntimeEnvState', (_message.Message,), { + 'DESCRIPTOR' : _RUNTIMEENVSTATE, + '__module__' : 'src.ray.protobuf.runtime_env_common_pb2' + # @@protoc_insertion_point(class_scope:ray.rpc.RuntimeEnvState) + }) +_sym_db.RegisterMessage(RuntimeEnvState) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\030io.ray.runtime.generated' + _RUNTIMEENVURIS._serialized_start=54 + _RUNTIMEENVURIS._serialized_end=150 + _RUNTIMEENVCONFIG._serialized_start=153 + _RUNTIMEENVCONFIG._serialized_end=289 + _RUNTIMEENVINFO._serialized_start=292 + _RUNTIMEENVINFO._serialized_end=480 + _RUNTIMEENVSTATE._serialized_start=483 + _RUNTIMEENVSTATE._serialized_end=706 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_common_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_common_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/runtime_env_common_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/usage_pb2.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/usage_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..49bf067f854925deb68fff5ac785af7ef494aeac --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/usage_pb2.py @@ -0,0 +1,136 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/ray/protobuf/usage.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1csrc/ray/protobuf/usage.proto\x12\tray.usage*\xe0\x1a\n\x06TagKey\x12\n\n\x06_TEST1\x10\x00\x12\n\n\x06_TEST2\x10\x01\x12\x13\n\x0fRLLIB_FRAMEWORK\x10\x02\x12\x13\n\x0fRLLIB_ALGORITHM\x10\x03\x12\x15\n\x11RLLIB_NUM_WORKERS\x10\x04\x12\x15\n\x11SERVE_API_VERSION\x10\x05\x12\x19\n\x15SERVE_NUM_DEPLOYMENTS\x10\x06\x12\x0f\n\x0bGCS_STORAGE\x10\x07\x12\x1d\n\x19SERVE_NUM_GPU_DEPLOYMENTS\x10\x08\x12\x16\n\x12SERVE_FASTAPI_USED\x10\t\x12\x19\n\x15SERVE_DAG_DRIVER_USED\x10\n\x12\x1b\n\x17SERVE_HTTP_ADAPTER_USED\x10\x0b\x12\x1b\n\x17SERVE_GRPC_INGRESS_USED\x10\x0c\x12\x1a\n\x16SERVE_REST_API_VERSION\x10\r\x12\x12\n\x0eSERVE_NUM_APPS\x10\x0e\x12*\n&SERVE_NUM_REPLICAS_LIGHTWEIGHT_UPDATED\x10\x0f\x12)\n%SERVE_USER_CONFIG_LIGHTWEIGHT_UPDATED\x10\x10\x12\x30\n,SERVE_AUTOSCALING_CONFIG_LIGHTWEIGHT_UPDATED\x10\x11\x12#\n\x1fSERVE_RAY_SERVE_HANDLE_API_USED\x10\x12\x12(\n$SERVE_RAY_SERVE_SYNC_HANDLE_API_USED\x10\x13\x12$\n SERVE_DEPLOYMENT_HANDLE_API_USED\x10\x14\x12\x32\n.SERVE_DEPLOYMENT_HANDLE_TO_OBJECT_REF_API_USED\x10\x15\x12\x1e\n\x1aSERVE_MULTIPLEXED_API_USED\x10\x16\x12\x19\n\x15SERVE_HTTP_PROXY_USED\x10\x17\x12\x19\n\x15SERVE_GRPC_PROXY_USED\x10\x18\x12\x19\n\x15SERVE_STATUS_API_USED\x10\x19\x12!\n\x1dSERVE_GET_APP_HANDLE_API_USED\x10\x1a\x12(\n$SERVE_GET_DEPLOYMENT_HANDLE_API_USED\x10\x1b\x12(\n$SERVE_APP_CONTAINER_RUNTIME_ENV_USED\x10\x1c\x12/\n+SERVE_DEPLOYMENT_CONTAINER_RUNTIME_ENV_USED\x10\x1d\x12\x1e\n\x1aSERVE_NUM_NODE_COMPACTIONS\x10\x1e\x12 \n\x1cSERVE_AUTO_NUM_REPLICAS_USED\x10\x1f\x12$\n SERVE_CUSTOM_REQUEST_ROUTER_USED\x10 \x12\x1e\n\x1a\x43ORE_STATE_API_LIST_ACTORS\x10\x64\x12\x1d\n\x19\x43ORE_STATE_API_LIST_TASKS\x10\x65\x12\x1c\n\x18\x43ORE_STATE_API_LIST_JOBS\x10\x66\x12\x1d\n\x19\x43ORE_STATE_API_LIST_NODES\x10g\x12(\n$CORE_STATE_API_LIST_PLACEMENT_GROUPS\x10h\x12\x1f\n\x1b\x43ORE_STATE_API_LIST_WORKERS\x10i\x12\x1f\n\x1b\x43ORE_STATE_API_LIST_OBJECTS\x10j\x12$\n CORE_STATE_API_LIST_RUNTIME_ENVS\x10k\x12&\n\"CORE_STATE_API_LIST_CLUSTER_EVENTS\x10l\x12\x1c\n\x18\x43ORE_STATE_API_LIST_LOGS\x10m\x12\x1a\n\x16\x43ORE_STATE_API_GET_LOG\x10n\x12\"\n\x1e\x43ORE_STATE_API_SUMMARIZE_TASKS\x10o\x12#\n\x1f\x43ORE_STATE_API_SUMMARIZE_ACTORS\x10p\x12$\n CORE_STATE_API_SUMMARIZE_OBJECTS\x10q\x12\x13\n\x0e\x44\x41SHBOARD_USED\x10\xc8\x01\x12)\n$DASHBOARD_METRICS_PROMETHEUS_ENABLED\x10\xc9\x01\x12&\n!DASHBOARD_METRICS_GRAFANA_ENABLED\x10\xca\x01\x12\x13\n\x0ePG_NUM_CREATED\x10\xac\x02\x12\x16\n\x11\x41\x43TOR_NUM_CREATED\x10\xad\x02\x12\x1e\n\x19WORKER_CRASH_SYSTEM_ERROR\x10\xae\x02\x12\x15\n\x10WORKER_CRASH_OOM\x10\xaf\x02\x12\x19\n\x14RAY_GET_TIMEOUT_ZERO\x10\xb0\x02\x12\x1d\n\x18NUM_ACTOR_CREATION_TASKS\x10\xb1\x02\x12\x14\n\x0fNUM_ACTOR_TASKS\x10\xb2\x02\x12\x15\n\x10NUM_NORMAL_TASKS\x10\xb3\x02\x12\x10\n\x0bNUM_DRIVERS\x10\xb4\x02\x12\"\n\x1d\x45XPERIMENTAL_STATE_API_IMPORT\x10\xb5\x02\x12\x17\n\x12\x41UTOSCALER_VERSION\x10\xb6\x02\x12\x15\n\x10\x44\x41TA_LOGICAL_OPS\x10\x90\x03\x12\x10\n\x0b\x41IR_TRAINER\x10\xf4\x03\x12\x12\n\rTUNE_SEARCHER\x10\xf5\x03\x12\x13\n\x0eTUNE_SCHEDULER\x10\xf6\x03\x12\x11\n\x0c\x41IR_ENV_VARS\x10\xf7\x03\x12%\n AIR_SETUP_WANDB_INTEGRATION_USED\x10\xf8\x03\x12&\n!AIR_SETUP_MLFLOW_INTEGRATION_USED\x10\xf9\x03\x12\x12\n\rAIR_CALLBACKS\x10\xfa\x03\x12\x1e\n\x19\x41IR_STORAGE_CONFIGURATION\x10\xfb\x03\x12\x13\n\x0e\x41IR_ENTRYPOINT\x10\xfc\x03\x12\x1b\n\x16TRAIN_TORCH_GET_DEVICE\x10\xfd\x03\x12\x1e\n\x19TRAIN_TORCH_PREPARE_MODEL\x10\xfe\x03\x12#\n\x1eTRAIN_TORCH_PREPARE_DATALOADER\x10\xff\x03\x12$\n\x1fTRAIN_LIGHTNING_PREPARE_TRAINER\x10\x80\x04\x12+\n&TRAIN_LIGHTNING_RAYTRAINREPORTCALLBACK\x10\x81\x04\x12#\n\x1eTRAIN_LIGHTNING_RAYDDPSTRATEGY\x10\x82\x04\x12$\n\x1fTRAIN_LIGHTNING_RAYFSDPSTRATEGY\x10\x83\x04\x12)\n$TRAIN_LIGHTNING_RAYDEEPSPEEDSTRATEGY\x10\x84\x04\x12,\n\'TRAIN_LIGHTNING_RAYLIGHTNINGENVIRONMENT\x10\x85\x04\x12\'\n\"TRAIN_TRANSFORMERS_PREPARE_TRAINER\x10\x86\x04\x12.\n)TRAIN_TRANSFORMERS_RAYTRAINREPORTCALLBACK\x10\x87\x04\x12\x1c\n\x17TRAIN_TORCH_GET_DEVICES\x10\x88\x04\x12\x12\n\rTRAIN_TRAINER\x10\x89\x04\x12$\n\x1fLLM_SERVE_SERVE_MULTIPLE_MODELS\x10\xd8\x04\x12\"\n\x1dLLM_SERVE_SERVE_MULTIPLE_APPS\x10\xd9\x04\x12\x1f\n\x1aLLM_SERVE_JSON_MODE_MODELS\x10\xda\x04\x12%\n LLM_SERVE_JSON_MODE_NUM_REPLICAS\x10\xdb\x04\x12\x1f\n\x1aLLM_SERVE_LORA_BASE_MODELS\x10\xdc\x04\x12(\n#LLM_SERVE_INITIAL_NUM_LORA_ADAPTERS\x10\xdd\x04\x12)\n$LLM_SERVE_AUTOSCALING_ENABLED_MODELS\x10\xde\x04\x12\'\n\"LLM_SERVE_AUTOSCALING_MIN_REPLICAS\x10\xdf\x04\x12\'\n\"LLM_SERVE_AUTOSCALING_MAX_REPLICAS\x10\xe0\x04\x12%\n LLM_SERVE_TENSOR_PARALLEL_DEGREE\x10\xe1\x04\x12\x1b\n\x16LLM_SERVE_NUM_REPLICAS\x10\xe2\x04\x12\x15\n\x10LLM_SERVE_MODELS\x10\xe3\x04\x12\x17\n\x12LLM_SERVE_GPU_TYPE\x10\xe4\x04\x12\x17\n\x12LLM_SERVE_NUM_GPUS\x10\xe5\x04\x12$\n\x1fLLM_BATCH_PROCESSOR_CONFIG_NAME\x10\xe6\x04\x12!\n\x1cLLM_BATCH_MODEL_ARCHITECTURE\x10\xe7\x04\x12\x13\n\x0eLLM_BATCH_SIZE\x10\xe8\x04\x12\x1f\n\x1aLLM_BATCH_ACCELERATOR_TYPE\x10\xe9\x04\x12\x1a\n\x15LLM_BATCH_CONCURRENCY\x10\xea\x04\x12\x18\n\x13LLM_BATCH_TASK_TYPE\x10\xeb\x04\x12%\n LLM_BATCH_PIPELINE_PARALLEL_SIZE\x10\xec\x04\x12#\n\x1eLLM_BATCH_TENSOR_PARALLEL_SIZE\x10\xed\x04\x12!\n\x1cLLM_BATCH_DATA_PARALLEL_SIZE\x10\xee\x04\x62\x06proto3') + +_TAGKEY = DESCRIPTOR.enum_types_by_name['TagKey'] +TagKey = enum_type_wrapper.EnumTypeWrapper(_TAGKEY) +_TEST1 = 0 +_TEST2 = 1 +RLLIB_FRAMEWORK = 2 +RLLIB_ALGORITHM = 3 +RLLIB_NUM_WORKERS = 4 +SERVE_API_VERSION = 5 +SERVE_NUM_DEPLOYMENTS = 6 +GCS_STORAGE = 7 +SERVE_NUM_GPU_DEPLOYMENTS = 8 +SERVE_FASTAPI_USED = 9 +SERVE_DAG_DRIVER_USED = 10 +SERVE_HTTP_ADAPTER_USED = 11 +SERVE_GRPC_INGRESS_USED = 12 +SERVE_REST_API_VERSION = 13 +SERVE_NUM_APPS = 14 +SERVE_NUM_REPLICAS_LIGHTWEIGHT_UPDATED = 15 +SERVE_USER_CONFIG_LIGHTWEIGHT_UPDATED = 16 +SERVE_AUTOSCALING_CONFIG_LIGHTWEIGHT_UPDATED = 17 +SERVE_RAY_SERVE_HANDLE_API_USED = 18 +SERVE_RAY_SERVE_SYNC_HANDLE_API_USED = 19 +SERVE_DEPLOYMENT_HANDLE_API_USED = 20 +SERVE_DEPLOYMENT_HANDLE_TO_OBJECT_REF_API_USED = 21 +SERVE_MULTIPLEXED_API_USED = 22 +SERVE_HTTP_PROXY_USED = 23 +SERVE_GRPC_PROXY_USED = 24 +SERVE_STATUS_API_USED = 25 +SERVE_GET_APP_HANDLE_API_USED = 26 +SERVE_GET_DEPLOYMENT_HANDLE_API_USED = 27 +SERVE_APP_CONTAINER_RUNTIME_ENV_USED = 28 +SERVE_DEPLOYMENT_CONTAINER_RUNTIME_ENV_USED = 29 +SERVE_NUM_NODE_COMPACTIONS = 30 +SERVE_AUTO_NUM_REPLICAS_USED = 31 +SERVE_CUSTOM_REQUEST_ROUTER_USED = 32 +CORE_STATE_API_LIST_ACTORS = 100 +CORE_STATE_API_LIST_TASKS = 101 +CORE_STATE_API_LIST_JOBS = 102 +CORE_STATE_API_LIST_NODES = 103 +CORE_STATE_API_LIST_PLACEMENT_GROUPS = 104 +CORE_STATE_API_LIST_WORKERS = 105 +CORE_STATE_API_LIST_OBJECTS = 106 +CORE_STATE_API_LIST_RUNTIME_ENVS = 107 +CORE_STATE_API_LIST_CLUSTER_EVENTS = 108 +CORE_STATE_API_LIST_LOGS = 109 +CORE_STATE_API_GET_LOG = 110 +CORE_STATE_API_SUMMARIZE_TASKS = 111 +CORE_STATE_API_SUMMARIZE_ACTORS = 112 +CORE_STATE_API_SUMMARIZE_OBJECTS = 113 +DASHBOARD_USED = 200 +DASHBOARD_METRICS_PROMETHEUS_ENABLED = 201 +DASHBOARD_METRICS_GRAFANA_ENABLED = 202 +PG_NUM_CREATED = 300 +ACTOR_NUM_CREATED = 301 +WORKER_CRASH_SYSTEM_ERROR = 302 +WORKER_CRASH_OOM = 303 +RAY_GET_TIMEOUT_ZERO = 304 +NUM_ACTOR_CREATION_TASKS = 305 +NUM_ACTOR_TASKS = 306 +NUM_NORMAL_TASKS = 307 +NUM_DRIVERS = 308 +EXPERIMENTAL_STATE_API_IMPORT = 309 +AUTOSCALER_VERSION = 310 +DATA_LOGICAL_OPS = 400 +AIR_TRAINER = 500 +TUNE_SEARCHER = 501 +TUNE_SCHEDULER = 502 +AIR_ENV_VARS = 503 +AIR_SETUP_WANDB_INTEGRATION_USED = 504 +AIR_SETUP_MLFLOW_INTEGRATION_USED = 505 +AIR_CALLBACKS = 506 +AIR_STORAGE_CONFIGURATION = 507 +AIR_ENTRYPOINT = 508 +TRAIN_TORCH_GET_DEVICE = 509 +TRAIN_TORCH_PREPARE_MODEL = 510 +TRAIN_TORCH_PREPARE_DATALOADER = 511 +TRAIN_LIGHTNING_PREPARE_TRAINER = 512 +TRAIN_LIGHTNING_RAYTRAINREPORTCALLBACK = 513 +TRAIN_LIGHTNING_RAYDDPSTRATEGY = 514 +TRAIN_LIGHTNING_RAYFSDPSTRATEGY = 515 +TRAIN_LIGHTNING_RAYDEEPSPEEDSTRATEGY = 516 +TRAIN_LIGHTNING_RAYLIGHTNINGENVIRONMENT = 517 +TRAIN_TRANSFORMERS_PREPARE_TRAINER = 518 +TRAIN_TRANSFORMERS_RAYTRAINREPORTCALLBACK = 519 +TRAIN_TORCH_GET_DEVICES = 520 +TRAIN_TRAINER = 521 +LLM_SERVE_SERVE_MULTIPLE_MODELS = 600 +LLM_SERVE_SERVE_MULTIPLE_APPS = 601 +LLM_SERVE_JSON_MODE_MODELS = 602 +LLM_SERVE_JSON_MODE_NUM_REPLICAS = 603 +LLM_SERVE_LORA_BASE_MODELS = 604 +LLM_SERVE_INITIAL_NUM_LORA_ADAPTERS = 605 +LLM_SERVE_AUTOSCALING_ENABLED_MODELS = 606 +LLM_SERVE_AUTOSCALING_MIN_REPLICAS = 607 +LLM_SERVE_AUTOSCALING_MAX_REPLICAS = 608 +LLM_SERVE_TENSOR_PARALLEL_DEGREE = 609 +LLM_SERVE_NUM_REPLICAS = 610 +LLM_SERVE_MODELS = 611 +LLM_SERVE_GPU_TYPE = 612 +LLM_SERVE_NUM_GPUS = 613 +LLM_BATCH_PROCESSOR_CONFIG_NAME = 614 +LLM_BATCH_MODEL_ARCHITECTURE = 615 +LLM_BATCH_SIZE = 616 +LLM_BATCH_ACCELERATOR_TYPE = 617 +LLM_BATCH_CONCURRENCY = 618 +LLM_BATCH_TASK_TYPE = 619 +LLM_BATCH_PIPELINE_PARALLEL_SIZE = 620 +LLM_BATCH_TENSOR_PARALLEL_SIZE = 621 +LLM_BATCH_DATA_PARALLEL_SIZE = 622 + + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _TAGKEY._serialized_start=44 + _TAGKEY._serialized_end=3468 +# @@protoc_insertion_point(module_scope) diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/usage_pb2_grpc.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/usage_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/generated/usage_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66b3f497d3a1a4a093c6acf1de26f9da1a28e1f4 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/plasma/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/plasma/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/plasma/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/plasma/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b52052733d36583234e38fa072a3c539192e626f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/plasma/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b1c1a26b7634326915752eda24ac4dd43ece584 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/gcs/gcs_server b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/gcs/gcs_server new file mode 100644 index 0000000000000000000000000000000000000000..2579ba6dddb90c26964ad261cf02350115cd65a1 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/gcs/gcs_server @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd7ee8ebdf5d86fbb52baf3839b7a18e337ee7db2efde6b475e3a2616db0b4eb +size 28226016 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/raylet/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/raylet/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/raylet/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/raylet/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7ad298e88cf168c7746572f031c3bcf31f27e8d9 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/raylet/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/raylet/raylet b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/raylet/raylet new file mode 100644 index 0000000000000000000000000000000000000000..ce4f3e085301ee64043f6b1a4dfaf0c0c3a3bb89 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/core/src/ray/raylet/raylet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21fb27c00295a9007e612b9a1a3558f49bb597b80679263a028579b272f5ad74 +size 31013984 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c1c60b50484fd32918ede8b1be57601f3589d3ec Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/base.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/base.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7bed6395da29584c7f76265b3bdca2b85801ba28 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/base.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/class_node.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/class_node.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..872ed42e36cb92a3cc8790a9498f5542326318ae Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/class_node.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/collective_node.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/collective_node.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12eac08623d749625894d8de70b4a2ea1f94fbfd Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/collective_node.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/compiled_dag_node.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/compiled_dag_node.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4191b6cbac0cfde417a409fd5584f93d1fe7b48b --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/compiled_dag_node.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13f33ed7afb72cf0a87a411b43470abfe30d8633244051d46d45c428d75e3db6 +size 127399 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/conftest.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/conftest.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12a487415b9f257ce0db0c8df412e3028444fd69 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/conftest.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/constants.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/constants.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2cac0e3271ab8f9df866a5508d8e723eae30f50b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/constants.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/context.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/context.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..45e6c4071f91391421ea0695ef6f6bcf4e3ca250 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/context.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/dag_node.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/dag_node.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..85cd53cbefe4ba6a6990176ceaee79a0397a1b4f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/dag_node.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/dag_node_operation.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/dag_node_operation.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d207dc71360c49c3b659b08e227b42a3ad4c2dca Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/dag_node_operation.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/dag_operation_future.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/dag_operation_future.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c460effffa29507fa315f2ce0f16b71f5204498e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/dag_operation_future.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/format_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/format_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96802275f7af2ed32314cc4c881d433c52574278 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/format_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/function_node.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/function_node.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..445ce8302f933fe81461a03715ae0a7540d79025 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/function_node.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/input_node.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/input_node.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d5f3132d35c30fa0ae1e0d8e3d6637abc30e85ce Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/input_node.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/output_node.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/output_node.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..292d3d9dd95dacc1aa0cc874f28617a19e136ad9 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/output_node.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/py_obj_scanner.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/py_obj_scanner.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6411bd974ea299ef69217b596d2adbfa9b025503 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/py_obj_scanner.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7d4bb24459b909dc83a3635505c08a656105ae52 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/vis_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/vis_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5e7d4a2868a49e97a80418202a2d889b0ab21973 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/__pycache__/vis_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/experimental/__init__.py b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/experimental/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dag/experimental/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/experimental/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..167c24281942106937a7610a0cdf578b5568429c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dag/experimental/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/__init__.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..491bf5265497dbefd19199e7e4a49f6e94926709 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/__init__.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/agent.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/agent.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c37c9360023746bd0ace9abeb7be10f9d4d66dbd Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/agent.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/consts.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/consts.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8d09025452ffb7cfee4f9ea5625bb6e173a60e9e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/consts.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/dashboard.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/dashboard.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1642b4caae1a82ea7c52b6b7723e8e15c41666a0 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/dashboard.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/dashboard_metrics.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/dashboard_metrics.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e81e662d918738bb6cf45efa15862159c75cc4e Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/dashboard_metrics.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/head.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/head.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d9139459d0129430d08c1630f3c9ccc8bca04740 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/head.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/http_server_agent.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/http_server_agent.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6a0d450514679f5bfc01b51a14a94fc506b86563 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/http_server_agent.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/http_server_head.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/http_server_head.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2f140d6ef4a3543b7ba2f6875f0fe3f472dc5511 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/http_server_head.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/k8s_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/k8s_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a7cfd5f2e0322d1584adfafde0f61a4a856f533b Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/k8s_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/memory_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/memory_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f6060f4a40ca185e8e0d89d9be9d0769937703c Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/memory_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/optional_deps.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/optional_deps.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90e53a6a85598748da890d5c31c4b4bdbb395f20 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/optional_deps.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/optional_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/optional_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c9f8557c90735a422aa403ad24742a3665b18bb Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/optional_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/routes.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/routes.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94ef54fe60fc58242204970f63217cd4a06c756f Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/routes.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/state_aggregator.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/state_aggregator.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b0548e666a9f26c3d13a3c96f3f339a499f70026 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/state_aggregator.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/state_api_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/state_api_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7cbd5bdfb8a65a43e70d7b65f8cb813c532b214 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/state_api_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/timezone_utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/timezone_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..018a26e2156166e9d83061098a3bf50ef72010fc Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/timezone_utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/utils.cpython-312.pyc b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..54e8086d497951c7d4d861e378e898398da9d915 Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/__pycache__/utils.cpython-312.pyc differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/asset-manifest.json b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/asset-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..37ed84c6082dc4d17bbe1e2546932011b99e683e --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/asset-manifest.json @@ -0,0 +1,42 @@ +{ + "files": { + "main.css": "./static/css/main.388a904b.css", + "main.js": "./static/js/main.b3a3eb48.js", + "static/js/495.01ff0983.chunk.js": "./static/js/495.01ff0983.chunk.js", + "static/js/591.222f4f03.chunk.js": "./static/js/591.222f4f03.chunk.js", + "static/media/roboto-latin-900italic.woff": "./static/media/roboto-latin-900italic.c20d916c1a1b094c1cec.woff", + "static/media/roboto-latin-300italic.woff": "./static/media/roboto-latin-300italic.bd5b7a13f2c52b531a2a.woff", + "static/media/roboto-latin-500italic.woff": "./static/media/roboto-latin-500italic.18d00f739ff1e1c52db1.woff", + "static/media/roboto-latin-400italic.woff": "./static/media/roboto-latin-400italic.b1d9d9904bfca8802a63.woff", + "static/media/roboto-latin-100italic.woff": "./static/media/roboto-latin-100italic.451d4e559d6f57cdf6a1.woff", + "static/media/roboto-latin-700italic.woff": "./static/media/roboto-latin-700italic.9360531f9bb817f917f0.woff", + "static/media/roboto-latin-500.woff": "./static/media/roboto-latin-500.cea99d3e3e13a3a599a0.woff", + "static/media/roboto-latin-900.woff": "./static/media/roboto-latin-900.bac8362e7a6ea60b6983.woff", + "static/media/roboto-latin-100.woff": "./static/media/roboto-latin-100.a45108d3b34af91f9113.woff", + "static/media/roboto-latin-700.woff": "./static/media/roboto-latin-700.2267169ee7270a22a963.woff", + "static/media/roboto-latin-300.woff": "./static/media/roboto-latin-300.865f928cbabcc9f8f2b5.woff", + "static/media/roboto-latin-400.woff": "./static/media/roboto-latin-400.49ae34d4cc6b98c00c69.woff", + "static/media/roboto-latin-900italic.woff2": "./static/media/roboto-latin-900italic.cb5ad999740e9d8a8bd1.woff2", + "static/media/roboto-latin-300italic.woff2": "./static/media/roboto-latin-300italic.c64e7e354c88e613c77c.woff2", + "static/media/roboto-latin-400italic.woff2": "./static/media/roboto-latin-400italic.d022bc70dc1bf7b3425d.woff2", + "static/media/roboto-latin-500italic.woff2": "./static/media/roboto-latin-500italic.0d8bb5b3ee5f5dac9e44.woff2", + "static/media/roboto-latin-700italic.woff2": "./static/media/roboto-latin-700italic.7d8125ff7f707231fd89.woff2", + "static/media/roboto-latin-100italic.woff2": "./static/media/roboto-latin-100italic.7f839a8652da29745ce4.woff2", + "static/media/roboto-latin-500.woff2": "./static/media/roboto-latin-500.f5b74d7ffcdf85b9dd60.woff2", + "static/media/roboto-latin-700.woff2": "./static/media/roboto-latin-700.c18ee39fb002ad58b6dc.woff2", + "static/media/roboto-latin-100.woff2": "./static/media/roboto-latin-100.c2aa4ab115bf9c6057cb.woff2", + "static/media/roboto-latin-300.woff2": "./static/media/roboto-latin-300.37a7069dc30fc663c878.woff2", + "static/media/roboto-latin-400.woff2": "./static/media/roboto-latin-400.176f8f5bd5f02b3abfcf.woff2", + "static/media/roboto-latin-900.woff2": "./static/media/roboto-latin-900.870c8c1486f76054301a.woff2", + "static/media/logo.svg": "./static/media/logo.3704c1bbca650bb72a64b5d4c3fa5ced.svg", + "index.html": "./index.html", + "main.388a904b.css.map": "./static/css/main.388a904b.css.map", + "main.b3a3eb48.js.map": "./static/js/main.b3a3eb48.js.map", + "495.01ff0983.chunk.js.map": "./static/js/495.01ff0983.chunk.js.map", + "591.222f4f03.chunk.js.map": "./static/js/591.222f4f03.chunk.js.map" + }, + "entrypoints": [ + "static/css/main.388a904b.css", + "static/js/main.b3a3eb48.js" + ] +} \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/favicon.ico b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..9417b6ada1d3a2399d631c76f2fb49981adf27cf Binary files /dev/null and b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/favicon.ico differ diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/index.html b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/index.html new file mode 100644 index 0000000000000000000000000000000000000000..3bc503572e68d05efe9c178969fa19e9f2b8cb4b --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/index.html @@ -0,0 +1 @@ +Ray Dashboard
\ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/LICENSE b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..baf3e9d982fc948620518a9e57e8a718fcaea4ec --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Jamie Wong + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/README b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/README new file mode 100644 index 0000000000000000000000000000000000000000..4d897271d380a3fd9964a4aad334ffb4e76c5429 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/README @@ -0,0 +1,2 @@ +This is a self-contained release of https://github.com/jlfwong/speedscope. +To use it, open index.html in Chrome or Firefox. diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/demangle-cpp.8a387750.js b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/demangle-cpp.8a387750.js new file mode 100644 index 0000000000000000000000000000000000000000..73686d88c66534c4567a288953879bae5f36d220 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/demangle-cpp.8a387750.js @@ -0,0 +1,4 @@ +parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f0&&$e.streams[2].object.output("\\n".charCodeAt(0)),$e.streams[3]&&$e.streams[3].object.output.buffer.length>0&&$e.streams[3].object.output("\\n".charCodeAt(0)))}},Je=Ja;Ve.unshift({func:function(){$e.ignorePermissions=!1,$e.init.initialized||$e.init()}}),Be.push({func:function(){$e.quit()}}),Ya(0),ae.buf=_(12,"void*",we),Module.callMain=function(r){function a(){for(var r=0;r<3;r++)i.push(0)}var e=r.length+1,i=[_(p("/bin/this.program"),"i8",we)];a();for(var v=0;v>2]=0|He.__str,Se[ri+4>>2]=0|He.__str1,Se[ri+16>>2]=0|He.__str2,Se[ri+20>>2]=0|He.__str3,Se[ri+32>>2]=0|He.__str4,Se[ri+36>>2]=0|He.__str5,Se[ri+48>>2]=0|He.__str6,Se[ri+52>>2]=0|He.__str7,Se[ri+64>>2]=0|He.__str8,Se[ri+68>>2]=0|He.__str7,Se[ri+80>>2]=0|He.__str9,Se[ri+84>>2]=0|He.__str10,Se[ri+96>>2]=0|He.__str11,Se[ri+100>>2]=0|He.__str12,Se[ri+112>>2]=0|He.__str13,Se[ri+116>>2]=0|He.__str14,Se[ri+128>>2]=0|He.__str15,Se[ri+132>>2]=0|He.__str16,Se[ri+144>>2]=0|He.__str17,Se[ri+148>>2]=0|He.__str18,Se[ri+160>>2]=0|He.__str19,Se[ri+164>>2]=0|He.__str20,Se[ri+176>>2]=0|He.__str21,Se[ri+180>>2]=0|He.__str22,Se[ri+192>>2]=0|He.__str23,Se[ri+196>>2]=0|He.__str24,Se[ri+208>>2]=0|He.__str25,Se[ri+212>>2]=0|He.__str26,Se[ri+224>>2]=0|He.__str27,Se[ri+228>>2]=0|He.__str28,Se[ri+240>>2]=0|He.__str29,Se[ri+244>>2]=0|He.__str30,Se[ri+256>>2]=0|He.__str31,Se[ri+260>>2]=0|He.__str32,Se[ri+272>>2]=0|He.__str33,Se[ri+276>>2]=0|He.__str34,Se[ri+288>>2]=0|He.__str35,Se[ri+292>>2]=0|He.__str36,Se[ri+304>>2]=0|He.__str37,Se[ri+308>>2]=0|He.__str38,Se[ri+320>>2]=0|He.__str39,Se[ri+324>>2]=0|He.__str40,Se[ri+336>>2]=0|He.__str41,Se[ri+340>>2]=0|He.__str42,Se[ri+352>>2]=0|He.__str43,Se[ri+356>>2]=0|He.__str44,Se[ri+368>>2]=0|He.__str45,Se[ri+372>>2]=0|He.__str46,Se[ri+384>>2]=0|He.__str47,Se[ri+388>>2]=0|He.__str48,Se[ri+400>>2]=0|He.__str49,Se[ri+404>>2]=0|He.__str119289,Se[ri+416>>2]=0|He.__str51,Se[ri+420>>2]=0|He.__str20,Se[ri+432>>2]=0|He.__str52,Se[ri+436>>2]=0|He.__str53,Se[ri+448>>2]=0|He.__str54,Se[ri+452>>2]=0|He.__str55,Se[ri+464>>2]=0|He.__str56,Se[ri+468>>2]=0|He.__str57,Se[ri+480>>2]=0|He.__str58,Se[ri+484>>2]=0|He.__str119289,Se[ri+496>>2]=0|He.__str59,Se[ri+500>>2]=0|He.__str60,Se[ri+512>>2]=0|He.__str61,Se[ri+516>>2]=0|He.__str62,Se[ri+528>>2]=0|He.__str63,Se[ri+532>>2]=0|He.__str64,Se[ri+544>>2]=0|He.__str65,Se[ri+548>>2]=0|He.__str66,Se[ri+560>>2]=0|He.__str67,Se[ri+564>>2]=0|He.__str68,Se[ri+576>>2]=0|He.__str69,Se[ri+580>>2]=0|He.__str70,Se[ri+592>>2]=0|He.__str71,Se[ri+596>>2]=0|He.__str72,Se[ri+608>>2]=0|He.__str73,Se[ri+612>>2]=0|He.__str74,Se[ri+624>>2]=0|He.__str75,Se[ri+628>>2]=0|He.__str76,Se[ri+640>>2]=0|He.__str77,Se[ri+644>>2]=0|He.__str72,Se[ri+656>>2]=0|He.__str78,Se[ri+660>>2]=0|He.__str79,Se[ri+672>>2]=0|He.__str80,Se[ri+676>>2]=0|He.__str81,Se[ri+688>>2]=0|He.__str82,Se[ri+692>>2]=0|He.__str83,Se[ri+704>>2]=0|He.__str84,Se[ri+708>>2]=0|He.__str85,Se[ri+720>>2]=0|He.__str86,Se[ri+724>>2]=0|He.__str87,Se[ri+736>>2]=0|He.__str88,Se[ri+740>>2]=0|He.__str89,Se[ri+752>>2]=0|He.__str90,Se[ri+756>>2]=0|He.__str91,Se[ri+768>>2]=0|He.__str92,Se[ri+772>>2]=0|He.__str91,Se[ai>>2]=0|He.__str145315,Se[ai+8>>2]=0|He.__str145315,Se[ai+20>>2]=0|He.__str167337,Se[ai+28>>2]=0|He.__str95,Se[ai+40>>2]=0|He.__str146316,Se[ai+48>>2]=0|He.__str97,Se[ai+60>>2]=0|He.__str155325,Se[ai+68>>2]=0|He.__str155325,Se[ai+80>>2]=0|He.__str156326,Se[ai+88>>2]=0|He.__str156326,Se[ai+100>>2]=0|He.__str154324,Se[ai+108>>2]=0|He.__str154324,Se[ai+120>>2]=0|He.__str101,Se[ai+128>>2]=0|He.__str101,Se[ai+140>>2]=0|He.__str147317,Se[ai+148>>2]=0|He.__str147317,Se[ai+160>>2]=0|He.__str150320,Se[ai+168>>2]=0|He.__str150320,Se[ai+180>>2]=0|He.__str151321,Se[ai+188>>2]=0|He.__str105,Se[ai+220>>2]=0|He.__str152322,Se[ai+228>>2]=0|He.__str152322,Se[ai+240>>2]=0|He.__str153323,Se[ai+248>>2]=0|He.__str153323,Se[ai+260>>2]=0|He.__str165335,Se[ai+268>>2]=0|He.__str165335,Se[ai+280>>2]=0|He.__str166336,Se[ai+288>>2]=0|He.__str166336,Se[ai+360>>2]=0|He.__str148318,Se[ai+368>>2]=0|He.__str148318,Se[ai+380>>2]=0|He.__str149319,Se[ai+388>>2]=0|He.__str149319,Se[ai+420>>2]=0|He.__str84254,Se[ai+428>>2]=0|He.__str84254,Se[ai+440>>2]=0|He.__str168338,Se[ai+448>>2]=0|He.__str146316,Se[ai+460>>2]=0|He.__str114,Se[ai+468>>2]=0|He.__str152322,Se[ai+480>>2]=0|He.__str115,Se[ai+488>>2]=0|He.__str115,Se[ai+500>>2]=0|He.__str110280,Se[ai+508>>2]=0|He.__str110280,Se[ei+4>>2]=0|He.__str152,Se[ei+12>>2]=0|He.__str152,Se[ei+32>>2]=0|He.__str153,Se[ei+40>>2]=0|He.__str153,Se[ei+48>>2]=0|He.__str154,Se[ei+60>>2]=0|He.__str155,Se[ei+68>>2]=0|He.__str155,Se[ei+76>>2]=0|He.__str156,Se[ei+88>>2]=0|He.__str157,Se[ei+96>>2]=0|He.__str158,Se[ei+104>>2]=0|He.__str156,Se[ei+116>>2]=0|He.__str159,Se[ei+124>>2]=0|He.__str160,Se[ei+132>>2]=0|He.__str161,Se[ei+144>>2]=0|He.__str162,Se[ei+152>>2]=0|He.__str163,Se[ei+160>>2]=0|He.__str164,Se[ei+172>>2]=0|He.__str165,Se[ei+180>>2]=0|He.__str166,Se[ei+188>>2]=0|He.__str167,Se[si+4>>2]=bi,Se[ni+4>>2]=ki,oi=_([2,0,0,0,0],["i8*",0,0,0,0],we),Se[bi>>2]=oi+8|0,Se[bi+4>>2]=0|He.__ZTSSt9bad_alloc,Se[bi+8>>2]=li,Se[ki>>2]=oi+8|0,Se[ki+4>>2]=0|He.__ZTSSt20bad_array_new_length,Se[ki+8>>2]=bi,ui=16,ci=6,hi=18,di=6,wi=6,pe=[0,0,Jr,0,va,0,ya,0,ga,0,wa,0,Sa,0,pa,0,Ea,0,ma,0],Module.FUNCTION_TABLE=pe,Module.run=ee,Module.preRun&&Module.preRun(),0==Ke){ee()}Module.postRun&&Module.postRun(),Module.___cxa_demangle=G;var pi=v("__cxa_demangle","string",["string","string","number","number"]);return function(r){return pi(r,"",1,0)}}();\n'; +},{}]},{},[180], null) +//# sourceMappingURL=demangle-cpp.8a387750.map \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/favicon-16x16.361d2b26.png b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/favicon-16x16.361d2b26.png new file mode 100644 index 0000000000000000000000000000000000000000..e292da07e1f445448df3650d1953a31455f80018 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/favicon-16x16.361d2b26.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a62a6da7742b43ee798b106b709aa82eafd1b500ef050427cfec05e4d41dacac +size 679 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/favicon-32x32.1165a94e.png b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/favicon-32x32.1165a94e.png new file mode 100644 index 0000000000000000000000000000000000000000..e46848eb96c0f650ec2e065a651a6c0bd3ecdaf3 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/favicon-32x32.1165a94e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ea6e6d13b7b8064187866deba1e8674d8ba25071279ba7b15f34b54df2508d0 +size 1585 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/file-format-schema.json b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/file-format-schema.json new file mode 100644 index 0000000000000000000000000000000000000000..63842505efb74d1d8e57f4bfe1591a7a28abcc0e --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/file-format-schema.json @@ -0,0 +1,324 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "FileFormat.Profile": { + "anyOf": [ + { + "$ref": "#/definitions/FileFormat.EventedProfile" + }, + { + "$ref": "#/definitions/FileFormat.SampledProfile" + } + ] + }, + "FileFormat.File": { + "title": "FileFormat.File", + "type": "object", + "properties": { + "$schema": { + "type": "string", + "enum": [ + "https://www.speedscope.app/file-format-schema.json" + ], + "title": "$schema" + }, + "shared": { + "type": "object", + "properties": { + "frames": { + "type": "array", + "items": { + "$ref": "#/definitions/FileFormat.Frame" + }, + "title": "frames" + } + }, + "required": [ + "frames" + ], + "title": "shared" + }, + "profiles": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/FileFormat.EventedProfile" + }, + { + "$ref": "#/definitions/FileFormat.SampledProfile" + } + ] + }, + "title": "profiles" + }, + "name": { + "type": "string", + "title": "name" + }, + "activeProfileIndex": { + "type": "number", + "title": "activeProfileIndex" + }, + "exporter": { + "type": "string", + "title": "exporter" + } + }, + "required": [ + "$schema", + "profiles", + "shared" + ] + }, + "FileFormat.Frame": { + "title": "FileFormat.Frame", + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "name" + }, + "file": { + "type": "string", + "title": "file" + }, + "line": { + "type": "number", + "title": "line" + }, + "col": { + "type": "number", + "title": "col" + } + }, + "required": [ + "name" + ] + }, + "FileFormat.ProfileType": { + "title": "FileFormat.ProfileType", + "enum": [ + "evented", + "sampled" + ], + "type": "string" + }, + "FileFormat.IProfile": { + "title": "FileFormat.IProfile", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/FileFormat.ProfileType", + "title": "type" + } + }, + "required": [ + "type" + ] + }, + "FileFormat.EventedProfile": { + "title": "FileFormat.EventedProfile", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "evented" + ], + "title": "type" + }, + "name": { + "type": "string", + "title": "name" + }, + "unit": { + "$ref": "#/definitions/FileFormat.ValueUnit", + "title": "unit" + }, + "startValue": { + "type": "number", + "title": "startValue" + }, + "endValue": { + "type": "number", + "title": "endValue" + }, + "events": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OpenFrameEvent" + }, + { + "$ref": "#/definitions/CloseFrameEvent" + } + ] + }, + "title": "events" + } + }, + "required": [ + "endValue", + "events", + "name", + "startValue", + "type", + "unit" + ] + }, + "SampledStack": { + "type": "array", + "items": { + "type": "number" + } + }, + "FileFormat.SampledProfile": { + "title": "FileFormat.SampledProfile", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "sampled" + ], + "title": "type" + }, + "name": { + "type": "string", + "title": "name" + }, + "unit": { + "$ref": "#/definitions/FileFormat.ValueUnit", + "title": "unit" + }, + "startValue": { + "type": "number", + "title": "startValue" + }, + "endValue": { + "type": "number", + "title": "endValue" + }, + "samples": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + }, + "title": "samples" + }, + "weights": { + "type": "array", + "items": { + "type": "number" + }, + "title": "weights" + } + }, + "required": [ + "endValue", + "name", + "samples", + "startValue", + "type", + "unit", + "weights" + ] + }, + "FileFormat.ValueUnit": { + "title": "FileFormat.ValueUnit", + "enum": [ + "bytes", + "microseconds", + "milliseconds", + "nanoseconds", + "none", + "seconds" + ], + "type": "string" + }, + "FileFormat.EventType": { + "title": "FileFormat.EventType", + "enum": [ + "C", + "O" + ], + "type": "string" + }, + "IEvent": { + "title": "IEvent", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/FileFormat.EventType", + "title": "type" + }, + "at": { + "type": "number", + "title": "at" + } + }, + "required": [ + "at", + "type" + ] + }, + "OpenFrameEvent": { + "title": "OpenFrameEvent", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "O" + ], + "title": "type" + }, + "frame": { + "type": "number", + "title": "frame" + }, + "at": { + "type": "number", + "title": "at" + } + }, + "required": [ + "at", + "frame", + "type" + ] + }, + "CloseFrameEvent": { + "title": "CloseFrameEvent", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "C" + ], + "title": "type" + }, + "frame": { + "type": "number", + "title": "frame" + }, + "at": { + "type": "number", + "title": "at" + } + }, + "required": [ + "at", + "frame", + "type" + ] + } + }, + "$ref": "#/definitions/FileFormat.File" +} diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/import.a03c2bef.js b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/import.a03c2bef.js new file mode 100644 index 0000000000000000000000000000000000000000..483e825f3d3e8f9eb1a20acd592000af909cf934 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/import.a03c2bef.js @@ -0,0 +1,113 @@ +parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;fe.id)}),r.children.forEach(e)}(e),t}function t(e,t){return e.map((r,n)=>{return r-(0===n?1e6*t:e[n-1])})}function r(r){return{samples:r.samples,startTime:1e6*r.startTime,endTime:1e6*r.endTime,nodes:e(r.head),timeDeltas:t(r.timestamps,r.startTime)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.chromeTreeToNodes=r; +},{}],146:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isChromeTimeline=i,exports.importFromChromeTimeline=o,exports.importFromChromeCPUProfile=f,exports.importFromOldV8CPUProfile=u;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters"),n=require("./v8cpuFormatter");function i(e){if(!Array.isArray(e))return!1;if(e.length<1)return!1;const t=e[0];return"pid"in t&&"tid"in t&&"ph"in t&&"cat"in t&&!!e.find(e=>"CpuProfile"===e.name||"Profile"===e.name||"ProfileChunk"===e.name)}function o(e,r){const n=new Map,i=new Map,o=new Map;(0,t.sortBy)(e,e=>e.ts);for(let t of e){if("CpuProfile"===t.name){const e=`${t.pid}:${t.tid}`,r=t.id||e;n.set(r,t.args.data.cpuProfile),i.set(r,e)}if("Profile"===t.name){const e=`${t.pid}:${t.tid}`;n.set(t.id||e,Object.assign({startTime:0,endTime:0,nodes:[],samples:[],timeDeltas:[]},t.args.data)),t.id&&i.set(t.id,`${t.pid}:${t.tid}`)}if("thread_name"===t.name&&o.set(`${t.pid}:${t.tid}`,t.args.name),"ProfileChunk"===t.name){const e=`${t.pid}:${t.tid}`,r=n.get(t.id||e);if(r){const e=t.args.data;e.cpuProfile&&(e.cpuProfile.nodes&&(r.nodes=r.nodes.concat(e.cpuProfile.nodes)),e.cpuProfile.samples&&(r.samples=r.samples.concat(e.cpuProfile.samples))),e.timeDeltas&&(r.timeDeltas=r.timeDeltas.concat(e.timeDeltas)),null!=e.startTime&&(r.startTime=e.startTime),null!=e.endTime&&(r.endTime=e.endTime)}else console.warn(`Ignoring ProfileChunk for undeclared Profile with id ${t.id||e}`)}}if(n.size>0){const e=[];let l=0;return(0,t.itForEach)(n.keys(),t=>{let a=null,s=i.get(t);s&&(a=o.get(s)||null);const m=f(n.get(t));a&&n.size>1?(m.setName(`${r} - ${a}`),"CrRendererMain"===a&&(l=e.length)):m.setName(`${r}`),e.push(m)}),{name:r,indexToView:l,profiles:e}}throw new Error("Could not find CPU profile in Timeline")}const l=new Map;function a(e){return(0,t.getOrInsert)(l,e,e=>{const t=e.functionName||"(anonymous)",r=e.url,n=e.lineNumber,i=e.columnNumber;return{key:`${t}:${r}:${n}:${i}`,name:t,file:r,line:n,col:i}})}function s(e){const{functionName:t,url:r}=e;return"native dummy.js"===r||("(root)"===t||"(idle)"===t)}function m(e){return"(garbage collector)"===e||"(program)"===e}function f(n){const i=new e.CallTreeProfileBuilder(n.endTime-n.startTime),o=new Map;for(let e of n.nodes)o.set(e.id,e);for(let e of n.nodes)if("number"==typeof e.parent&&(e.parent=o.get(e.parent)),e.children)for(let t of e.children){const r=o.get(t);r&&(r.parent=e)}const l=[],f=[];let u=n.timeDeltas[0],c=NaN;for(let e=0;e0&&(0,t.lastOf)(p)!=c;){const e=a(p.pop().callFrame);i.leaveFrame(e,r)}const d=[];for(let e=u;e&&e!=c&&!s(e.callFrame);e=m(e.callFrame.functionName)?(0,t.lastOf)(p):e.parent||null)d.push(e);d.reverse();for(let e of d)i.enterFrame(a(e.callFrame),r);p=p.concat(d)}for(let e=p.length-1;e>=0;e--)i.leaveFrame(a(p[e].callFrame),(0,t.lastOf)(f));return i.setValueFormatter(new r.TimeFormatter("microseconds")),i.build()}function u(e){return f((0,n.chromeTreeToNodes)(e))} +},{"../lib/profile":139,"../lib/utils":70,"../lib/value-formatters":140,"./v8cpuFormatter":172}],147:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromStackprof=r;var e=require("../lib/profile"),t=require("../lib/value-formatters");function r(r){const o=r.raw_timestamp_deltas.reduce((e,t)=>e+t,0),a=new e.StackListProfileBuilder(o),{frames:l,raw:s,raw_timestamp_deltas:i}=r;let n=0,c=[];for(let e=0;e=0;)e[t]=0}var i=0,l=1,d=2,f=3,o=258,b=29,s=256,u=s+1+b,c=30,p=19,h=2*u+1,v=15,y=16,x=7,g=256,m=16,w=17,A=18,k=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],j=512,B=new Array(2*(u+2));a(B);var C=new Array(2*c);a(C);var D=new Array(j);a(D);var E=new Array(o-f+1);a(E);var F=new Array(b);a(F);var G,H,I,J=new Array(c);function K(e,t,n,_,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=_,this.max_length=r,this.has_stree=e&&e.length}function L(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function M(e){return e<256?D[e]:D[256+(e>>>7)]}function N(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function O(e,t,n){e.bi_valid>y-n?(e.bi_buf|=t<>y-e.bi_valid,e.bi_valid+=n-y):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function R(e){16===e.bi_valid?(N(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function T(e,t){var n,_,r,a,i,l,d=t.dyn_tree,f=t.max_code,o=t.stat_desc.static_tree,b=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,c=t.stat_desc.max_length,p=0;for(a=0;a<=v;a++)e.bl_count[a]=0;for(d[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;nc&&(a=c,p++),d[2*_+1]=a,_>f||(e.bl_count[a]++,i=0,_>=u&&(i=s[_-u]),l=d[2*_],e.opt_len+=l*(a+i),b&&(e.static_len+=l*(o[2*_+1]+i)));if(0!==p){do{for(a=c-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[c]--,p-=2}while(p>0);for(a=c;0!==a;a--)for(_=e.bl_count[a];0!==_;)(r=e.heap[--n])>f||(d[2*r+1]!==a&&(e.opt_len+=(a-d[2*r+1])*d[2*r],d[2*r+1]=a),_--)}}function U(e,t,n){var _,r,a=new Array(v+1),i=0;for(_=1;_<=v;_++)a[_]=i=i+n[_-1]<<1;for(r=0;r<=t;r++){var l=e[2*r+1];0!==l&&(e[2*r]=Q(a[l]++,l))}}function V(){var e,t,n,_,r,a=new Array(v+1);for(n=0,_=0;_>=7;_8?N(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Y(t,n,_,r){X(t),r&&(N(t,_),N(t,~_)),e.arraySet(t.pending_buf,t.window,n,_,t.pending),t.pending+=_}function Z(e,t,n,_){var r=2*t,a=2*n;return e[r]>1;n>=1;n--)$(e,a,n);r=d;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$(e,a,1),_=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=_,a[2*r]=a[2*n]+a[2*_],e.depth[r]=(e.depth[n]>=e.depth[_]?e.depth[n]:e.depth[_])+1,a[2*n+1]=a[2*_+1]=r,e.heap[1]=r++,$(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],T(e,t),U(a,f,e.bl_count)}function ne(e,t,n){var _,r,a=-1,i=t[1],l=0,d=7,f=4;for(0===i&&(d=138,f=3),t[2*(n+1)+1]=65535,_=0;_<=n;_++)r=i,i=t[2*(_+1)+1],++l=3&&0===e.bl_tree[2*S[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function ae(e,t,n,_){var r;for(O(e,t-257,5),O(e,n-1,5),O(e,_-4,4),r=0;r<_;r++)O(e,e.bl_tree[2*S[r]+1],3);_e(e,e.dyn_ltree,t-1),_e(e,e.dyn_dtree,n-1)}function ie(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return n;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return _;for(t=32;t0?(e.strm.data_type===r&&(e.strm.data_type=ie(e)),te(e,e.l_desc),te(e,e.d_desc),o=re(e),i=e.opt_len+3+7>>>3,(f=e.static_len+3+7>>>3)<=i&&(i=f)):i=f=_+5,_+4<=i&&-1!==n?fe(e,n,_,a):e.strategy===t||f===i?(O(e,(l<<1)+(a?1:0),3),ee(e,B,C)):(O(e,(d<<1)+(a?1:0),3),ae(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ee(e,e.dyn_ltree,e.dyn_dtree)),W(e),a&&X(e)}function se(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(E[n]+s+1)]++,e.dyn_dtree[2*M(t)]++),e.last_lit===e.lit_bufsize-1}exports._tr_init=de,exports._tr_stored_block=fe,exports._tr_flush_block=be,exports._tr_tally=se,exports._tr_align=oe; +},{"../utils/common":178}],191:[function(require,module,exports) { +"use strict";function e(e,r,o,t){for(var u=65535&e|0,i=e>>>16&65535|0,n=0;0!==o;){o-=n=o>2e3?2e3:o;do{i=i+(u=u+r[t++]|0)|0}while(--n);u%=65521,i%=65521}return u|i<<16|0}module.exports=e; +},{}],192:[function(require,module,exports) { +"use strict";function r(){for(var r,o=[],t=0;t<256;t++){r=t;for(var n=0;n<8;n++)r=1&r?3988292384^r>>>1:r>>>1;o[t]=r}return o}var o=r();function t(r,t,n,u){var a=o,e=u+n;r^=-1;for(var f=u;f>>8^a[255&(r^t[f])];return-1^r}module.exports=t; +},{}],185:[function(require,module,exports) { +"use strict";module.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}; +},{}],182:[function(require,module,exports) { +"use strict";var t,a=require("../utils/common"),e=require("./trees"),s=require("./adler32"),i=require("./crc32"),r=require("./messages"),n=0,h=1,l=3,_=4,d=5,o=0,u=1,g=-2,f=-3,c=-5,p=-1,m=1,w=2,v=3,k=4,z=0,b=2,x=8,y=9,B=15,S=8,q=29,I=256,A=I+1+q,C=30,R=19,j=2*A+1,D=15,E=3,H=258,K=H+E+1,N=32,F=42,G=69,J=73,L=91,M=103,O=113,P=666,Q=1,T=2,U=3,V=4,W=3;function X(t,a){return t.msg=r[a],a}function Y(t){return(t<<1)-(t>4?9:0)}function Z(t){for(var a=t.length;--a>=0;)t[a]=0}function $(t){var e=t.state,s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(a.arraySet(t.output,e.pending_buf,e.pending_out,s,t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))}function tt(t,a){e._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,a),t.block_start=t.strstart,$(t.strm)}function at(t,a){t.pending_buf[t.pending++]=a}function et(t,a){t.pending_buf[t.pending++]=a>>>8&255,t.pending_buf[t.pending++]=255&a}function st(t,e,r,n){var h=t.avail_in;return h>n&&(h=n),0===h?0:(t.avail_in-=h,a.arraySet(e,t.input,t.next_in,h,r),1===t.state.wrap?t.adler=s(t.adler,e,h,r):2===t.state.wrap&&(t.adler=i(t.adler,e,h,r)),t.next_in+=h,t.total_in+=h,h)}function it(t,a){var e,s,i=t.max_chain_length,r=t.strstart,n=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-K?t.strstart-(t.w_size-K):0,_=t.window,d=t.w_mask,o=t.prev,u=t.strstart+H,g=_[r+n-1],f=_[r+n];t.prev_length>=t.good_match&&(i>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(e=a)+n]===f&&_[e+n-1]===g&&_[e]===_[r]&&_[++e]===_[r+1]){r+=2,e++;do{}while(_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&rn){if(t.match_start=a,n=s,s>=h)break;g=_[r+n-1],f=_[r+n]}}}while((a=o[a&d])>l&&0!=--i);return n<=t.lookahead?n:t.lookahead}function rt(t){var e,s,i,r,n,h=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=h+(h-K)){a.arraySet(t.window,t.window,h,h,0),t.match_start-=h,t.strstart-=h,t.block_start-=h,e=s=t.hash_size;do{i=t.head[--e],t.head[e]=i>=h?i-h:0}while(--s);e=s=h;do{i=t.prev[--e],t.prev[e]=i>=h?i-h:0}while(--s);r+=h}if(0===t.strm.avail_in)break;if(s=st(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=s,t.lookahead+t.insert>=E)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(e=t.pending_buf_size-5);;){if(t.lookahead<=1){if(rt(t),0===t.lookahead&&a===n)return Q;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var s=t.block_start+e;if((0===t.strstart||t.strstart>=s)&&(t.lookahead=t.strstart-s,t.strstart=s,tt(t,!1),0===t.strm.avail_out))return Q;if(t.strstart-t.block_start>=t.w_size-K&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=0,a===_?(tt(t,!0),0===t.strm.avail_out?U:V):(t.strstart>t.block_start&&(tt(t,!1),t.strm.avail_out),Q)}function ht(t,a){for(var s,i;;){if(t.lookahead=E&&(t.ins_h=(t.ins_h<=E)if(i=e._tr_tally(t,t.strstart-t.match_start,t.match_length-E),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=E){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=E&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=E-1)),t.prev_length>=E&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-E,i=e._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-E),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<=E&&t.strstart>0&&(i=l[r=t.strstart-1])===l[++r]&&i===l[++r]&&i===l[++r]){h=t.strstart+H;do{}while(i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=E?(s=e._tr_tally(t,1,t.match_length-E),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=e._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=0,a===_?(tt(t,!0),0===t.strm.avail_out?U:V):t.last_lit&&(tt(t,!1),0===t.strm.avail_out)?Q:T}function dt(t,a){for(var s;;){if(0===t.lookahead&&(rt(t),0===t.lookahead)){if(a===n)return Q;break}if(t.match_length=0,s=e._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=0,a===_?(tt(t,!0),0===t.strm.avail_out?U:V):t.last_lit&&(tt(t,!1),0===t.strm.avail_out)?Q:T}function ot(t,a,e,s,i){this.good_length=t,this.max_lazy=a,this.nice_length=e,this.max_chain=s,this.func=i}function ut(a){a.window_size=2*a.w_size,Z(a.head),a.max_lazy_match=t[a.level].max_lazy,a.good_match=t[a.level].good_length,a.nice_match=t[a.level].nice_length,a.max_chain_length=t[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=E-1,a.match_available=0,a.ins_h=0}function gt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*j),this.dyn_dtree=new a.Buf16(2*(2*C+1)),this.bl_tree=new a.Buf16(2*(2*R+1)),Z(this.dyn_ltree),Z(this.dyn_dtree),Z(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(D+1),this.heap=new a.Buf16(2*A+1),Z(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*A+1),Z(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ft(t){var a;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=b,(a=t.state).pending=0,a.pending_out=0,a.wrap<0&&(a.wrap=-a.wrap),a.status=a.wrap?F:O,t.adler=2===a.wrap?0:1,a.last_flush=n,e._tr_init(a),o):X(t,g)}function ct(t){var a=ft(t);return a===o&&ut(t.state),a}function pt(t,a){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=a,o):g}function mt(t,e,s,i,r,n){if(!t)return g;var h=1;if(e===p&&(e=6),i<0?(h=0,i=-i):i>15&&(h=2,i-=16),r<1||r>y||s!==x||i<8||i>15||e<0||e>9||n<0||n>k)return X(t,g);8===i&&(i=9);var l=new gt;return t.state=l,l.strm=t,l.wrap=h,l.gzhead=null,l.w_bits=i,l.w_size=1<d||s<0)return a?X(a,g):g;if(f=a.state,!a.output||!a.input&&0!==a.avail_in||f.status===P&&s!==_)return X(a,0===a.avail_out?c:g);if(f.strm=a,r=f.last_flush,f.last_flush=s,f.status===F)if(2===f.wrap)a.adler=0,at(f,31),at(f,139),at(f,8),f.gzhead?(at(f,(f.gzhead.text?1:0)+(f.gzhead.hcrc?2:0)+(f.gzhead.extra?4:0)+(f.gzhead.name?8:0)+(f.gzhead.comment?16:0)),at(f,255&f.gzhead.time),at(f,f.gzhead.time>>8&255),at(f,f.gzhead.time>>16&255),at(f,f.gzhead.time>>24&255),at(f,9===f.level?2:f.strategy>=w||f.level<2?4:0),at(f,255&f.gzhead.os),f.gzhead.extra&&f.gzhead.extra.length&&(at(f,255&f.gzhead.extra.length),at(f,f.gzhead.extra.length>>8&255)),f.gzhead.hcrc&&(a.adler=i(a.adler,f.pending_buf,f.pending,0)),f.gzindex=0,f.status=G):(at(f,0),at(f,0),at(f,0),at(f,0),at(f,0),at(f,9===f.level?2:f.strategy>=w||f.level<2?4:0),at(f,W),f.status=O);else{var k=x+(f.w_bits-8<<4)<<8;k|=(f.strategy>=w||f.level<2?0:f.level<6?1:6===f.level?2:3)<<6,0!==f.strstart&&(k|=N),k+=31-k%31,f.status=O,et(f,k),0!==f.strstart&&(et(f,a.adler>>>16),et(f,65535&a.adler)),a.adler=1}if(f.status===G)if(f.gzhead.extra){for(p=f.pending;f.gzindex<(65535&f.gzhead.extra.length)&&(f.pending!==f.pending_buf_size||(f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),$(a),p=f.pending,f.pending!==f.pending_buf_size));)at(f,255&f.gzhead.extra[f.gzindex]),f.gzindex++;f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),f.gzindex===f.gzhead.extra.length&&(f.gzindex=0,f.status=J)}else f.status=J;if(f.status===J)if(f.gzhead.name){p=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),$(a),p=f.pending,f.pending===f.pending_buf_size)){m=1;break}m=f.gzindexp&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),0===m&&(f.gzindex=0,f.status=L)}else f.status=L;if(f.status===L)if(f.gzhead.comment){p=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),$(a),p=f.pending,f.pending===f.pending_buf_size)){m=1;break}m=f.gzindexp&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),0===m&&(f.status=M)}else f.status=M;if(f.status===M&&(f.gzhead.hcrc?(f.pending+2>f.pending_buf_size&&$(a),f.pending+2<=f.pending_buf_size&&(at(f,255&a.adler),at(f,a.adler>>8&255),a.adler=0,f.status=O)):f.status=O),0!==f.pending){if($(a),0===a.avail_out)return f.last_flush=-1,o}else if(0===a.avail_in&&Y(s)<=Y(r)&&s!==_)return X(a,c);if(f.status===P&&0!==a.avail_in)return X(a,c);if(0!==a.avail_in||0!==f.lookahead||s!==n&&f.status!==P){var z=f.strategy===w?dt(f,s):f.strategy===v?_t(f,s):t[f.level].func(f,s);if(z!==U&&z!==V||(f.status=P),z===Q||z===U)return 0===a.avail_out&&(f.last_flush=-1),o;if(z===T&&(s===h?e._tr_align(f):s!==d&&(e._tr_stored_block(f,0,0,!1),s===l&&(Z(f.head),0===f.lookahead&&(f.strstart=0,f.block_start=0,f.insert=0))),$(a),0===a.avail_out))return f.last_flush=-1,o}return s!==_?o:f.wrap<=0?u:(2===f.wrap?(at(f,255&a.adler),at(f,a.adler>>8&255),at(f,a.adler>>16&255),at(f,a.adler>>24&255),at(f,255&a.total_in),at(f,a.total_in>>8&255),at(f,a.total_in>>16&255),at(f,a.total_in>>24&255)):(et(f,a.adler>>>16),et(f,65535&a.adler)),$(a),f.wrap>0&&(f.wrap=-f.wrap),0!==f.pending?o:u)}function kt(t){var a;return t&&t.state?(a=t.state.status)!==F&&a!==G&&a!==J&&a!==L&&a!==M&&a!==O&&a!==P?X(t,g):(t.state=null,a===O?X(t,f):o):g}function zt(t,e){var i,r,n,h,l,_,d,u,f=e.length;if(!t||!t.state)return g;if(2===(h=(i=t.state).wrap)||1===h&&i.status!==F||i.lookahead)return g;for(1===h&&(t.adler=s(t.adler,e,f,0)),i.wrap=0,f>=i.w_size&&(0===h&&(Z(i.head),i.strstart=0,i.block_start=0,i.insert=0),u=new a.Buf8(i.w_size),a.arraySet(u,e,f-i.w_size,i.w_size,0),e=u,f=i.w_size),l=t.avail_in,_=t.next_in,d=t.input,t.avail_in=f,t.next_in=0,t.input=e,rt(i);i.lookahead>=E;){r=i.strstart,n=i.lookahead-(E-1);do{i.ins_h=(i.ins_h<=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function f(e,o){if(o<65537&&(e.subarray&&t||!e.subarray&&n))return String.fromCharCode.apply(null,r.shrinkBuf(e,o));for(var f="",u=0;u>>6,t[u++]=128|63&e):e<65536?(t[u++]=224|e>>>12,t[u++]=128|e>>>6&63,t[u++]=128|63&e):(t[u++]=240|e>>>18,t[u++]=128|e>>>12&63,t[u++]=128|e>>>6&63,t[u++]=128|63&e);return t},exports.buf2binstring=function(r){return f(r,r.length)},exports.binstring2buf=function(n){for(var t=new r.Buf8(n.length),e=0,o=t.length;e4)h[o++]=65533,t+=a-1;else{for(u&=2===a?31:3===a?15:7;a>1&&t1?h[o++]=65533:u<65536?h[o++]=u:(u-=65536,h[o++]=55296|u>>10&1023,h[o++]=56320|1023&u)}return f(h,o)},exports.utf8border=function(r,n){var t;for((n=n||r.length)>r.length&&(n=r.length),t=n-1;t>=0&&128==(192&r[t]);)t--;return t<0?n:0===t?n:t+e[r[t]]>n?t:n}; +},{"./common":178}],184:[function(require,module,exports) { +"use strict";function t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}module.exports=t; +},{}],176:[function(require,module,exports) { +"use strict";var t=require("./zlib/deflate"),i=require("./utils/common"),e=require("./utils/strings"),n=require("./zlib/messages"),r=require("./zlib/zstream"),s=Object.prototype.toString,o=0,a=4,u=0,h=1,d=2,l=-1,f=0,p=8;function w(o){if(!(this instanceof w))return new w(o);this.options=i.assign({level:l,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},o||{});var a=this.options;a.raw&&a.windowBits>0?a.windowBits=-a.windowBits:a.gzip&&a.windowBits>0&&a.windowBits<16&&(a.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;var h=t.deflateInit2(this.strm,a.level,a.method,a.windowBits,a.memLevel,a.strategy);if(h!==u)throw new Error(n[h]);if(a.header&&t.deflateSetHeader(this.strm,a.header),a.dictionary){var d;if(d="string"==typeof a.dictionary?e.string2buf(a.dictionary):"[object ArrayBuffer]"===s.call(a.dictionary)?new Uint8Array(a.dictionary):a.dictionary,(h=t.deflateSetDictionary(this.strm,d))!==u)throw new Error(n[h]);this._dict_set=!0}}function c(t,i){var e=new w(i);if(e.push(t,!0),e.err)throw e.msg||n[e.err];return e.result}function m(t,i){return(i=i||{}).raw=!0,c(t,i)}function g(t,i){return(i=i||{}).gzip=!0,c(t,i)}w.prototype.push=function(n,r){var l,f,p=this.strm,w=this.options.chunkSize;if(this.ended)return!1;f=r===~~r?r:!0===r?a:o,"string"==typeof n?p.input=e.string2buf(n):"[object ArrayBuffer]"===s.call(n)?p.input=new Uint8Array(n):p.input=n,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(w),p.next_out=0,p.avail_out=w),(l=t.deflate(p,f))!==h&&l!==u)return this.onEnd(l),this.ended=!0,!1;0!==p.avail_out&&(0!==p.avail_in||f!==a&&f!==d)||("string"===this.options.to?this.onData(e.buf2binstring(i.shrinkBuf(p.output,p.next_out))):this.onData(i.shrinkBuf(p.output,p.next_out)))}while((p.avail_in>0||0===p.avail_out)&&l!==h);return f===a?(l=t.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===u):f!==d||(this.onEnd(u),p.avail_out=0,!0)},w.prototype.onData=function(t){this.chunks.push(t)},w.prototype.onEnd=function(t){t===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},exports.Deflate=w,exports.deflate=c,exports.deflateRaw=m,exports.gzip=g; +},{"./zlib/deflate":182,"./utils/common":178,"./utils/strings":183,"./zlib/messages":185,"./zlib/zstream":184}],199:[function(require,module,exports) { +"use strict";var i=30,e=12;module.exports=function(o,a){var t,d,n,l,s,f,r,b,c,u,v,m,w,h,k,_,x,g,p,z,j,q,y,A,B;t=o.state,d=o.next_in,A=o.input,n=d+(o.avail_in-5),l=o.next_out,B=o.output,s=l-(a-o.avail_out),f=l+(o.avail_out-257),r=t.dmax,b=t.wsize,c=t.whave,u=t.wnext,v=t.window,m=t.hold,w=t.bits,h=t.lencode,k=t.distcode,_=(1<>>=p=g>>>24,w-=p,0===(p=g>>>16&255))B[l++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=h[(65535&g)+(m&(1<>>=p,w-=p),w<15&&(m+=A[d++]<>>=p=g>>>24,w-=p,!(16&(p=g>>>16&255))){if(0==(64&p)){g=k[(65535&g)+(m&(1<r){o.msg="invalid distance too far back",t.mode=i;break i}if(m>>>=p,w-=p,j>(p=l-s)){if((p=j-p)>c&&t.sane){o.msg="invalid distance too far back",t.mode=i;break i}if(q=0,y=v,0===u){if(q+=b-p,p2;)B[l++]=y[q++],B[l++]=y[q++],B[l++]=y[q++],z-=3;z&&(B[l++]=y[q++],z>1&&(B[l++]=y[q++]))}else{q=l-j;do{B[l++]=B[q++],B[l++]=B[q++],B[l++]=B[q++],z-=3}while(z>2);z&&(B[l++]=B[q++],z>1&&(B[l++]=B[q++]))}break}}break}}while(d>3,m&=(1<<(w-=z<<3))-1,o.next_in=d,o.next_out=l,o.avail_in=d=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return d[v++]=20971520,d[v++]=20971520,h.bits=1,0;for(F=1;F0&&(a===e||1!==G))return-1;for(Q[1]=0,D=1;Di||a===t&&L>o)return 1;for(;;){y=D-J,B[E]j?(z=R[S+B[E]],A=N[O+B[E]]):(z=96,A=0),k=1<>J)+(p-=k)]=y<<24|z<<16|A|0}while(0!==p);for(k=1<>=1;if(0!==k?(M&=k-1,M+=k):M=0,E++,0==--P[D]){if(D===G)break;D=c[m+B[E]]}if(D>H&&(M&x)!==q){for(0===J&&(J=H),g+=F,K=1<<(I=D-J);I+Ji||a===t&&L>o)return 1;d[q=M&x]=H<<24|I<<16|g-v|0}}return 0!==M&&(d[g+M]=D-J<<24|64<<16|0),h.bits=H,0}; +},{"../utils/common":178}],187:[function(require,module,exports) { +"use strict";var e=require("../utils/common"),a=require("./adler32"),t=require("./crc32"),i=require("./inffast"),s=require("./inftrees"),n=0,r=1,o=2,d=4,l=5,f=6,c=0,h=1,k=2,b=-2,m=-3,w=-4,u=-5,g=8,v=1,x=2,p=3,_=4,y=5,z=6,B=7,S=8,q=9,C=10,I=11,R=12,j=13,A=14,D=15,E=16,G=17,H=18,K=19,N=20,F=21,J=22,L=23,M=24,O=25,P=26,Q=27,T=28,U=29,V=30,W=31,X=32,Y=852,Z=592,$=15,ee=$;function ae(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function te(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ie(a){var t;return a&&a.state?(t=a.state,a.total_in=a.total_out=t.total=0,a.msg="",t.wrap&&(a.adler=1&t.wrap),t.mode=v,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new e.Buf32(Y),t.distcode=t.distdyn=new e.Buf32(Z),t.sane=1,t.back=-1,c):b}function se(e){var a;return e&&e.state?((a=e.state).wsize=0,a.whave=0,a.wnext=0,ie(e)):b}function ne(e,a){var t,i;return e&&e.state?(i=e.state,a<0?(t=0,a=-a):(t=1+(a>>4),a<48&&(a&=15)),a&&(a<8||a>15)?b:(null!==i.window&&i.wbits!==a&&(i.window=null),i.wrap=t,i.wbits=a,se(e))):b}function re(e,a){var t,i;return e?(i=new te,e.state=i,i.window=null,(t=ne(e,a))!==c&&(e.state=null),t):b}function oe(e){return re(e,ee)}var de,le,fe=!0;function ce(a){if(fe){var t;for(de=new e.Buf32(512),le=new e.Buf32(32),t=0;t<144;)a.lens[t++]=8;for(;t<256;)a.lens[t++]=9;for(;t<280;)a.lens[t++]=7;for(;t<288;)a.lens[t++]=8;for(s(r,a.lens,0,288,de,0,a.work,{bits:9}),t=0;t<32;)a.lens[t++]=5;s(o,a.lens,0,32,le,0,a.work,{bits:5}),fe=!1}a.lencode=de,a.lenbits=9,a.distcode=le,a.distbits=5}function he(a,t,i,s){var n,r=a.state;return null===r.window&&(r.wsize=1<=r.wsize?(e.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((n=r.wsize-r.wnext)>s&&(n=s),e.arraySet(r.window,t,i-s,n,r.wnext),(s-=n)?(e.arraySet(r.window,t,i-s,s,0),r.wnext=s,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,$.check=t($.check,qe,2,0),oe=0,de=0,$.mode=x;break}if($.flags=0,$.head&&($.head.done=!1),!(1&$.wrap)||(((255&oe)<<8)+(oe>>8))%31){Y.msg="incorrect header check",$.mode=V;break}if((15&oe)!==g){Y.msg="unknown compression method",$.mode=V;break}if(de-=4,_e=8+(15&(oe>>>=4)),0===$.wbits)$.wbits=_e;else if(_e>$.wbits){Y.msg="invalid window size",$.mode=V;break}$.dmax=1<<_e,Y.adler=$.check=1,$.mode=512&oe?C:R,oe=0,de=0;break;case x:for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<>8&1),512&$.flags&&(qe[0]=255&oe,qe[1]=oe>>>8&255,$.check=t($.check,qe,2,0)),oe=0,de=0,$.mode=p;case p:for(;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>8&255,qe[2]=oe>>>16&255,qe[3]=oe>>>24&255,$.check=t($.check,qe,4,0)),oe=0,de=0,$.mode=_;case _:for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<>8),512&$.flags&&(qe[0]=255&oe,qe[1]=oe>>>8&255,$.check=t($.check,qe,2,0)),oe=0,de=0,$.mode=y;case y:if(1024&$.flags){for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>8&255,$.check=t($.check,qe,2,0)),oe=0,de=0}else $.head&&($.head.extra=null);$.mode=z;case z:if(1024&$.flags&&((ke=$.length)>ne&&(ke=ne),ke&&($.head&&(_e=$.head.extra_len-$.length,$.head.extra||($.head.extra=new Array($.head.extra_len)),e.arraySet($.head.extra,ee,ie,ke,_e)),512&$.flags&&($.check=t($.check,ee,ke,ie)),ne-=ke,ie+=ke,$.length-=ke),$.length))break e;$.length=0,$.mode=B;case B:if(2048&$.flags){if(0===ne)break e;ke=0;do{_e=ee[ie+ke++],$.head&&_e&&$.length<65536&&($.head.name+=String.fromCharCode(_e))}while(_e&&ke>9&1,$.head.done=!0),Y.adler=$.check=0,$.mode=R;break;case C:for(;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=7&de,de-=7&de,$.mode=Q;break}for(;de<3;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=1)){case 0:$.mode=A;break;case 1:if(ce($),$.mode=N,Z===f){oe>>>=2,de-=2;break e}break;case 2:$.mode=G;break;case 3:Y.msg="invalid block type",$.mode=V}oe>>>=2,de-=2;break;case A:for(oe>>>=7&de,de-=7&de;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>16^65535)){Y.msg="invalid stored block lengths",$.mode=V;break}if($.length=65535&oe,oe=0,de=0,$.mode=D,Z===f)break e;case D:$.mode=E;case E:if(ke=$.length){if(ke>ne&&(ke=ne),ke>re&&(ke=re),0===ke)break e;e.arraySet(te,ee,ie,ke,se),ne-=ke,ie+=ke,re-=ke,se+=ke,$.length-=ke;break}$.mode=R;break;case G:for(;de<14;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=5,de-=5,$.ndist=1+(31&oe),oe>>>=5,de-=5,$.ncode=4+(15&oe),oe>>>=4,de-=4,$.nlen>286||$.ndist>30){Y.msg="too many length or distance symbols",$.mode=V;break}$.have=0,$.mode=H;case H:for(;$.have<$.ncode;){for(;de<3;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=3,de-=3}for(;$.have<19;)$.lens[Ce[$.have++]]=0;if($.lencode=$.lendyn,$.lenbits=7,ze={bits:$.lenbits},ye=s(n,$.lens,0,19,$.lencode,0,$.work,ze),$.lenbits=ze.bits,ye){Y.msg="invalid code lengths set",$.mode=V;break}$.have=0,$.mode=K;case K:for(;$.have<$.nlen+$.ndist;){for(;ue=(Se=$.lencode[oe&(1<<$.lenbits)-1])>>>16&255,ge=65535&Se,!((we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=we,de-=we,$.lens[$.have++]=ge;else{if(16===ge){for(Be=we+2;de>>=we,de-=we,0===$.have){Y.msg="invalid bit length repeat",$.mode=V;break}_e=$.lens[$.have-1],ke=3+(3&oe),oe>>>=2,de-=2}else if(17===ge){for(Be=we+3;de>>=we)),oe>>>=3,de-=3}else{for(Be=we+7;de>>=we)),oe>>>=7,de-=7}if($.have+ke>$.nlen+$.ndist){Y.msg="invalid bit length repeat",$.mode=V;break}for(;ke--;)$.lens[$.have++]=_e}}if($.mode===V)break;if(0===$.lens[256]){Y.msg="invalid code -- missing end-of-block",$.mode=V;break}if($.lenbits=9,ze={bits:$.lenbits},ye=s(r,$.lens,0,$.nlen,$.lencode,0,$.work,ze),$.lenbits=ze.bits,ye){Y.msg="invalid literal/lengths set",$.mode=V;break}if($.distbits=6,$.distcode=$.distdyn,ze={bits:$.distbits},ye=s(o,$.lens,$.nlen,$.ndist,$.distcode,0,$.work,ze),$.distbits=ze.bits,ye){Y.msg="invalid distances set",$.mode=V;break}if($.mode=N,Z===f)break e;case N:$.mode=F;case F:if(ne>=6&&re>=258){Y.next_out=se,Y.avail_out=re,Y.next_in=ie,Y.avail_in=ne,$.hold=oe,$.bits=de,i(Y,fe),se=Y.next_out,te=Y.output,re=Y.avail_out,ie=Y.next_in,ee=Y.input,ne=Y.avail_in,oe=$.hold,de=$.bits,$.mode===R&&($.back=-1);break}for($.back=0;ue=(Se=$.lencode[oe&(1<<$.lenbits)-1])>>>16&255,ge=65535&Se,!((we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>ve)])>>>16&255,ge=65535&Se,!(ve+(we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=ve,de-=ve,$.back+=ve}if(oe>>>=we,de-=we,$.back+=we,$.length=ge,0===ue){$.mode=P;break}if(32&ue){$.back=-1,$.mode=R;break}if(64&ue){Y.msg="invalid literal/length code",$.mode=V;break}$.extra=15&ue,$.mode=J;case J:if($.extra){for(Be=$.extra;de>>=$.extra,de-=$.extra,$.back+=$.extra}$.was=$.length,$.mode=L;case L:for(;ue=(Se=$.distcode[oe&(1<<$.distbits)-1])>>>16&255,ge=65535&Se,!((we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>ve)])>>>16&255,ge=65535&Se,!(ve+(we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=ve,de-=ve,$.back+=ve}if(oe>>>=we,de-=we,$.back+=we,64&ue){Y.msg="invalid distance code",$.mode=V;break}$.offset=ge,$.extra=15&ue,$.mode=M;case M:if($.extra){for(Be=$.extra;de>>=$.extra,de-=$.extra,$.back+=$.extra}if($.offset>$.dmax){Y.msg="invalid distance too far back",$.mode=V;break}$.mode=O;case O:if(0===re)break e;if(ke=fe-re,$.offset>ke){if((ke=$.offset-ke)>$.whave&&$.sane){Y.msg="invalid distance too far back",$.mode=V;break}ke>$.wnext?(ke-=$.wnext,be=$.wsize-ke):be=$.wnext-ke,ke>$.length&&(ke=$.length),me=$.window}else me=te,be=se-$.offset,ke=$.length;ke>re&&(ke=re),re-=ke,$.length-=ke;do{te[se++]=me[be++]}while(--ke);0===$.length&&($.mode=F);break;case P:if(0===re)break e;te[se++]=$.length,re--,$.mode=F;break;case Q:if($.wrap){for(;de<32;){if(0===ne)break e;ne--,oe|=ee[ie++]<=0&&u.windowBits<16&&(u.windowBits=-u.windowBits,0===u.windowBits&&(u.windowBits=-15)),!(u.windowBits>=0&&u.windowBits<16)||n&&n.windowBits||(u.windowBits+=32),u.windowBits>15&&u.windowBits<48&&0==(15&u.windowBits)&&(u.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new e,this.strm.avail_out=0;var h=t.inflateInit2(this.strm,u.windowBits);if(h!==s.Z_OK)throw new Error(r[h]);this.header=new o,t.inflateGetHeader(this.strm,this.header)}function h(t,i){var n=new a(i);if(n.push(t,!0),n.err)throw n.msg||r[n.err];return n.result}function _(t,i){return(i=i||{}).raw=!0,h(t,i)}a.prototype.push=function(r,e){var o,a,h,_,w,l,d=this.strm,f=this.options.chunkSize,p=this.options.dictionary,c=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof r?d.input=n.binstring2buf(r):"[object ArrayBuffer]"===u.call(r)?d.input=new Uint8Array(r):d.input=r,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(f),d.next_out=0,d.avail_out=f),(o=t.inflate(d,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(l="string"==typeof p?n.string2buf(p):"[object ArrayBuffer]"===u.call(p)?new Uint8Array(p):p,o=t.inflateSetDictionary(this.strm,l)),o===s.Z_BUF_ERROR&&!0===c&&(o=s.Z_OK,c=!1),o!==s.Z_STREAM_END&&o!==s.Z_OK)return this.onEnd(o),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&o!==s.Z_STREAM_END&&(0!==d.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(h=n.utf8border(d.output,d.next_out),_=d.next_out-h,w=n.buf2string(d.output,h),d.next_out=_,d.avail_out=f-_,_&&i.arraySet(d.output,d.output,h,_,0),this.onData(w)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(c=!0)}while((d.avail_in>0||0===d.avail_out)&&o!==s.Z_STREAM_END);return o===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(o=t.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),d.avail_out=0,!0)},a.prototype.onData=function(t){this.chunks.push(t)},a.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},exports.Inflate=a,exports.inflate=h,exports.inflateRaw=_,exports.ungzip=h; +},{"./zlib/inflate":187,"./utils/common":178,"./utils/strings":183,"./zlib/constants":179,"./zlib/messages":185,"./zlib/zstream":184,"./zlib/gzheader":188}],175:[function(require,module,exports) { +"use strict";var e=require("./lib/utils/common").assign,i=require("./lib/deflate"),r=require("./lib/inflate"),l=require("./lib/zlib/constants"),s={};e(s,i,r,l),module.exports=s; +},{"./lib/utils/common":178,"./lib/deflate":176,"./lib/inflate":177,"./lib/zlib/constants":179}],154:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MaybeCompressedDataReader=exports.TextProfileDataSource=void 0;var e=require("pako"),r=t(e);function t(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}var n=function(e,r,t,n){return new(t||(t=Promise))(function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new t(function(r){r(e.value)}).then(s,a)}u((n=n.apply(e,r||[])).next())})};class o{constructor(e,r){this.fileName=e,this.contents=r}name(){return n(this,void 0,void 0,function*(){return this.fileName})}readAsArrayBuffer(){return n(this,void 0,void 0,function*(){return new ArrayBuffer(0)})}readAsText(){return n(this,void 0,void 0,function*(){return this.contents})}}exports.TextProfileDataSource=o;class i{constructor(e,t){this.namePromise=e,this.uncompressedData=t.then(e=>n(this,void 0,void 0,function*(){try{return r.inflate(new Uint8Array(e)).buffer}catch(r){return e}}))}name(){return n(this,void 0,void 0,function*(){return yield this.namePromise})}readAsArrayBuffer(){return n(this,void 0,void 0,function*(){return yield this.uncompressedData})}readAsText(){return n(this,void 0,void 0,function*(){const e=yield this.readAsArrayBuffer();let r="";if("undefined"!=typeof TextDecoder){return(new TextDecoder).decode(e)}{const t=new Uint8Array(e);for(let e=0;e{const t=new FileReader;t.addEventListener("loadend",()=>{if(!(t.result instanceof ArrayBuffer))throw new Error("Expected reader.result to be an instance of ArrayBuffer");r(t.result)}),t.readAsArrayBuffer(e)});return new i(Promise.resolve(e.name),r)}static fromArrayBuffer(e,r){return new i(Promise.resolve(e),Promise.resolve(r))}}exports.MaybeCompressedDataReader=i; +},{"pako":175}],148:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UID=void 0,exports.importFromInstrumentsDeepCopy=a,exports.importFromInstrumentsTrace=w,exports.importRunFromInstrumentsTrace=g,exports.importThreadFromInstrumentsTrace=b,exports.readInstrumentsKeyedArchive=y,exports.decodeUTF8=v;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters"),n=require("./utils"),s=function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}l((n=n.apply(e,t||[])).next())})};function i(e){const t=e.split("\n").map(e=>e.split("\t")),r=t.shift();if(!r)return[];const n=new Map;for(let e=0;e0;){const e=a.pop();l=Math.max(l,e.endValue),n.leaveFrame(e,l)}return"Bytes Used"in s[0]?n.setValueFormatter(new r.ByteFormatter):("Weight"in s[0]||"Running Time"in s[0])&&n.setValueFormatter(new r.TimeFormatter("milliseconds")),n.build()}function l(e){return s(this,void 0,void 0,function*(){const t={name:e.name,files:new Map,subdirectories:new Map},r=yield new Promise((t,r)=>{e.createReader().readEntries(e=>{t(e)},r)});for(let e of r)if(e.isDirectory){const r=yield l(e);t.subdirectories.set(r.name,r)}else{const r=yield new Promise((t,r)=>{e.file(t,r)});t.files.set(r.name,r)}return t})}function c(e){return n.MaybeCompressedDataReader.fromFile(e).readAsArrayBuffer()}function u(e){return n.MaybeCompressedDataReader.fromFile(e).readAsText()}function f(e,r){const n=(0,t.getOrThrow)(e.subdirectories,"corespace"),s=(0,t.getOrThrow)(n.subdirectories,`run${r}`);return(0,t.getOrThrow)(s.subdirectories,"core")}class h{constructor(e){this.bytePos=0,this.view=new DataView(e)}seek(e){this.bytePos=e}skip(e){this.bytePos+=e}hasMore(){return this.bytePosthis.view.byteLength?0:this.view.getUint8(this.bytePos-1)}readUint32(){return this.bytePos+=4,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-4,!0)}readUint48(){return this.bytePos+=6,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-6,!0)+this.view.getUint16(this.bytePos-2,!0)*Math.pow(2,32)}readUint64(){return this.bytePos+=8,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-8,!0)+this.view.getUint32(this.bytePos-4,!0)*Math.pow(2,32)}}function p(e){return s(this,void 0,void 0,function*(){const r=(0,t.getOrThrow)(e.subdirectories,"stores");for(let e of r.subdirectories.values()){const r=e.files.get("schema.xml");if(!r)continue;const n=yield u(r);if(!/name="time-profile"/.exec(n))continue;const s=new h(yield c((0,t.getOrThrow)(e.files,"bulkstore")));s.readUint32(),s.readUint32(),s.readUint32();const i=s.readUint32(),o=s.readUint32();s.seek(i);const a=[];for(;;){const e=s.readUint48();if(0===e)break;const t=s.readUint32();s.skip(o-6-4-4);const r=s.readUint32();a.push({timestamp:e,threadID:t,backtraceID:r})}return a}throw new Error("Could not find sample list")})}function d(e,r){return s(this,void 0,void 0,function*(){const e=(0,t.getOrThrow)(r.subdirectories,"uniquing"),n=(0,t.getOrThrow)(e.subdirectories,"arrayUniquer"),s=(0,t.getOrThrow)(n.files,"integeruniquer.index"),i=(0,t.getOrThrow)(n.files,"integeruniquer.data"),o=new h(yield c(s)),a=new h(yield c(i));o.seek(32);let l=[];for(;o.hasMore();){const e=o.readUint32()+1048576*o.readUint32();if(0===e)continue;a.seek(e);let t=a.readUint32(),r=[];for(;t--;)r.push(a.readUint64());l.push(r)}return l})}function m(e){return s(this,void 0,void 0,function*(){const r=y(yield c((0,t.getOrThrow)(e.files,"form.template"))),n=r["com.apple.xray.owner.template.version"];let s=1;"com.apple.xray.owner.template"in r&&(s=r["com.apple.xray.owner.template"].get("_selectedRunNumber"));let i=r.$1;"stubInfoByUUID"in r&&(i=Array.from(r.stubInfoByUUID.keys())[0]);const o=r["com.apple.xray.run.data"],a=[];for(let e of o.runNumbers){const r=(0,t.getOrThrow)(o.runData,e),n=(0,t.getOrThrow)(r,"symbolsByPid"),s=new Map;for(let r of n.values()){for(let e of r.symbols){if(!e)continue;const{sourcePath:r,symbolName:n,addressToLine:i}=e;for(let e of i.keys())(0,t.getOrInsert)(s,e,()=>{const s=n||`0x${(0,t.zeroPad)(e.toString(16),16)}`,i={key:`${r}:${s}`,name:s};return r&&(i.file=r),i})}a.push({number:e,addressToFrameMap:s})}}return{version:n,instrument:i,selectedRunNumber:s,runs:a}})}function w(e){return s(this,void 0,void 0,function*(){const t=yield l(e),{version:r,runs:n,instrument:s,selectedRunNumber:i}=yield m(t);if("com.apple.xray.instrument-type.coresampler2"!==s)throw new Error(`The only supported instrument from .trace import is "com.apple.xray.instrument-type.coresampler2". Got ${s}`);console.log("version: ",r),console.log("Importing time profile");const o=[];let a=0;for(let r of n){const{addressToFrameMap:n,number:s}=r,l=yield g({fileName:e.name,tree:t,addressToFrameMap:n,runNumber:s});r.number===i&&(a=o.length+l.indexToView),o.push(...l.profiles)}return{name:e.name,indexToView:a,profiles:o}})}function g(e){return s(this,void 0,void 0,function*(){const{fileName:r,tree:n,addressToFrameMap:s,runNumber:i}=e,o=f(n,i);let a=yield p(o);const l=yield d(a,o),c=new Map;for(let e of a)c.set(e.threadID,(0,t.getOrElse)(c,e.threadID,()=>0)+1);const u=Array.from(c.entries());(0,t.sortBy)(u,e=>-e[1]);const h=u.map(e=>e[0]);return{name:r,indexToView:0,profiles:h.map(e=>b({threadID:e,fileName:r,arrays:l,addressToFrameMap:s,samples:a}))}})}function b(n){let{fileName:s,addressToFrameMap:i,arrays:o,threadID:a,samples:l}=n;const c=new Map;l=l.filter(e=>e.threadID===a);const u=new e.StackListProfileBuilder((0,t.lastOf)(l).timestamp);function f(e,r){const n=i.get(e);if(n)r.push(n);else if(e in o)for(let t of o[e])f(t,r);else{const n={key:e,name:`0x${(0,t.zeroPad)(e.toString(16),16)}`};i.set(e,n),r.push(n)}}u.setName(`${s} - thread ${a}`);let h=null;for(let e of l){const r=(0,t.getOrInsert)(c,e.backtraceID,e=>{const t=[];return f(e,t),t.reverse(),t});if(null===h&&(u.appendSampleWithWeight([],e.timestamp),h=e.timestamp),e.timestamp{switch(e){case"NSTextStorage":case"NSParagraphStyle":case"NSFont":return null;case"PFTSymbolData":{const e=Object.create(null);e.symbolName=t.$0,e.sourcePath=t.$1,e.addressToLine=new Map;for(let r=3;;r+=2){const n=t["$"+r],s=t["$"+(r+1)];if(null==n||null==s)break;e.addressToLine.set(n,s)}return e}case"PFTOwnerData":{const e=Object.create(null);return e.ownerName=t.$0,e.ownerPath=t.$1,e}case"PFTPersistentSymbols":{const e=Object.create(null),r=t.$4;e.threadNames=t.$3,e.symbols=[];for(let n=1;ne)){if(1e5!==e.$version||"NSKeyedArchiver"!==e.$archiver||!S(e.$top)||!U(e.$objects))throw new Error("Invalid keyed archive");"$null"===e.$objects[0]&&(e.$objects[0]=null);for(let r=0;r{if(t instanceof x)return e.$objects[t.index];if(U(t))for(let e=0;ee)){if(S(t)&&t.$class){let n=N(e,t.$class).$classname;switch(n){case"NSDecimalNumberPlaceholder":{let e=t["NS.length"],r=t["NS.exponent"],n=t["NS.mantissa.bo"],s=t["NS.negative"],i=new Uint16Array(new Uint8Array(t["NS.mantissa"]).buffer),o=0;for(let t=0;t>8|(255&e)<<8),o+=e*Math.pow(65536,t)}return o*=Math.pow(10,r),s?-o:o}case"NSData":case"NSMutableData":return t["NS.bytes"]||t["NS.data"];case"NSString":case"NSMutableString":return t["NS.string"]?t["NS.string"]:t["NS.bytes"]?v(t["NS.bytes"]):(console.warn(`Unexpected ${n} format: `,t),null);case"NSArray":case"NSMutableArray":if("NS.objects"in t)return t["NS.objects"];let e=[];for(;;){let r="NS.object."+e.length;if(!(r in t))break;e.push(t[r])}return e;case"_NSKeyedCoderOldStyleArray":{const e=t["NS.count"];let r=[];for(let n=0;n>4){case 0:return this.parseSingleton(e,r);case 1:return this.parseInteger(e,1<(r.push({stack:t.split(";").map(e=>({key:e,name:e})),duration:parseInt(i,10)}),e)),r}function t(t){const i=r(t),n=i.reduce((e,r)=>e+r.duration,0),o=new e.StackListProfileBuilder(n);if(0===i.length)return null;for(let e of i)o.appendSampleWithWeight(e.stack,e.duration);return o.build()} +},{"../lib/profile":139}],150:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromFirefox=l;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters");function l(l){const n=l.profile,s=1===n.threads.length?n.threads[0]:n.threads.filter(e=>"GeckoMain"===e.name)[0],a=new Map;function o(e){let r=e[0];const l=[];for(;null!=r;){const e=s.stackTable.data[r],[t,n]=e;l.push(n),r=t}return l.reverse(),l.map(e=>{const r=s.frameTable.data[e],l=s.stringTable[r[0]],n=/(.*)\s+\((.*?):?(\d+)?\)$/.exec(l);return n?n[2].startsWith("resource:")||"self-hosted"===n[2]||n[2].startsWith("self-hosted:")?null:(0,t.getOrInsert)(a,l,()=>({key:l,name:n[1],file:n[2],line:n[3]?parseInt(n[3]):void 0})):null}).filter(e=>null!=e)}const i=new e.CallTreeProfileBuilder(l.duration);let u=[];for(let e of s.samples.data){const t=o(e),r=e[1];let l=-1;for(let e=0;el;e--)i.leaveFrame(u[e],r);for(let e=l+1;e0?e[1]:"(anonymous)",file:e[2].length>0?e[2]:"(unknown file)",line:parseInt(e[3],10),col:parseInt(e[4],10)};break}case"CODE":switch(e.kind){case"LoadIC":case"StoreIC":case"KeyedStoreIC":case"KeyedLoadIC":case"LoadGlobalIC":case"Handler":r="(IC) "+r;break;case"BytecodeHandler":r="(bytecode) ~"+r;break;case"Stub":r="(stub) "+r;break;case"Builtin":r="(builtin) "+r;break;case"RegExp":r="(regexp) "+r}break;default:r=`(${e.type}) ${r}`}return{key:r,name:r}}function n(n){const s=new e.StackListProfileBuilder,o=new Map;let c=0;(0,t.sortBy)(n.ticks,e=>e.tm);for(let e of n.ticks){const r=[];for(let s=e.s.length-2;s>=0;s-=2){const c=e.s[s];-1!==c&&(c>n.code.length?r.push({key:c,name:`0x${c.toString(16)}`}):r.push((i=c,(0,t.getOrInsert)(o,i,e=>a(n.code[e],n)))))}s.appendSampleWithWeight(r,e.tm-c),c=e.tm}var i;return s.setValueFormatter(new r.TimeFormatter("microseconds")),s.build()} +},{"../lib/profile":139,"../lib/utils":70,"../lib/value-formatters":140}],152:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromLinuxPerf=r;var e=require("../lib/profile"),t=require("../lib/utils"),n=require("../lib/value-formatters");function s(e){const t=e.split("\n").filter(e=>!/^\s*#/.exec(e)),n={command:null,processID:null,threadID:null,time:null,eventType:"",stack:[]},s=t.shift();if(!s)return null;const r=/^(\S.+?)\s+(\d+)(?:\/?(\d+))?\s+/.exec(s);if(!r)return null;n.command=r[1],r[3]?(n.processID=parseInt(r[2],10),n.threadID=parseInt(r[3],10)):n.threadID=parseInt(r[2],10);const l=/\s+(\d+\.\d+):\s+/.exec(s);l&&(n.time=parseFloat(l[1]));const i=/(\S+):\s*$/.exec(s);i&&(n.eventType=i[1]);for(let e of t){const t=/^\s*(\w+)\s*(.+) \((\S*)\)/.exec(e);if(!t)continue;let[,s,r,l]=t;r=r.replace(/\+0x[\da-f]+$/,""),n.stack.push({address:`0x${s}`,symbolName:r,file:l})}return n.stack.reverse(),n}function r(r){const l=new Map;let i=null;const o=r.split("\n\n").map(s);for(let s of o){if(null==s)continue;if(null!=i&&i!=s.eventType)continue;if(null==s.time)continue;i=s.eventType;let r=[];s.command&&r.push(s.command),s.processID&&r.push(`pid: ${s.processID}`),s.threadID&&r.push(`tid: ${s.threadID}`);const o=r.join(" ");(0,t.getOrInsert)(l,o,()=>{const t=new e.StackListProfileBuilder;return t.setName(o),t.setValueFormatter(new n.TimeFormatter("seconds")),t}).appendSampleWithTimestamp(s.stack.map(({symbolName:e,file:t})=>({key:`${e} (${t})`,name:"[unknown]"===e?`??? (${t})`:e,file:t})),s.time)}return 0===l.size?null:{name:1===l.size?Array.from(l.keys())[0]:"",indexToView:0,profiles:Array.from((0,t.itMap)(l.values(),e=>e.build()))}} +},{"../lib/profile":139,"../lib/utils":70,"../lib/value-formatters":140}],153:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromHaskell=l;var e=require("../lib/profile"),r=require("../lib/value-formatters");function t(e,r,l,o,i){if(0===e.ticks&&0===e.entries&&0===e.alloc&&0===e.children.length)return r;let a=r,s=o.get(e.id);l.enterFrame(s,a);for(let r of e.children)a=t(r,a,l,o,i);return a+=i(e),l.leaveFrame(s,a),a}function l(l){const o=new Map;for(let e of l.cost_centres){const r={key:e.id,name:`${e.module}.${e.label}`};e.src_loc.startsWith("<")||(r.file=e.src_loc),o.set(e.id,r)}const i=new e.CallTreeProfileBuilder(l.total_ticks);t(l.profile,0,i,o,e=>e.ticks),i.setValueFormatter(new r.TimeFormatter("milliseconds")),i.setName(`${l.program} time`);const a=new e.CallTreeProfileBuilder(l.total_ticks);return t(l.profile,0,a,o,e=>e.alloc),a.setValueFormatter(new r.ByteFormatter),a.setName(`${l.program} allocation`),{name:l.program,indexToView:0,profiles:[i.build(),a.build()]}} +},{"../lib/profile":139,"../lib/value-formatters":140}],206:[function(require,module,exports) { +"use strict";function n(n,e){for(var r=new Array(arguments.length-1),t=0,l=2,o=!0;l1&&"="===r.charAt(e);)++a;return Math.ceil(3*r.length)/4-a};for(var e=new Array(64),a=new Array(123),t=0;t<64;)a[e[t]=t<26?t+65:t<52?t+71:t<62?t-4:t-59|43]=t++;r.encode=function(r,a,t){for(var n,i=null,o=[],c=0,s=0;a>2],n=(3&h)<<4,s=1;break;case 1:o[c++]=e[n|h>>4],n=(15&h)<<2,s=2;break;case 2:o[c++]=e[n|h>>6],o[c++]=e[63&h],s=0}c>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),c=0)}return s&&(o[c++]=e[n],o[c++]=61,1===s&&(o[c++]=61)),i?(c&&i.push(String.fromCharCode.apply(String,o.slice(0,c))),i.join("")):String.fromCharCode.apply(String,o.slice(0,c))};var n="invalid encoding";r.decode=function(r,e,t){for(var i,o=t,c=0,s=0;s1)break;if(void 0===(h=a[h]))throw Error(n);switch(c){case 0:i=h,c=1;break;case 1:e[t++]=i<<2|(48&h)>>4,i=h,c=2;break;case 2:e[t++]=(15&i)<<4|(60&h)>>2,i=h,c=3;break;case 3:e[t++]=(3&i)<<6|h,c=0}}if(1===c)throw Error(n);return t-o},r.test=function(r){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(r)}; +},{}],207:[function(require,module,exports) { +"use strict";function t(){this._listeners={}}module.exports=t,t.prototype.on=function(t,s,e){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:s,ctx:e||this}),this},t.prototype.off=function(t,s){if(void 0===t)this._listeners={};else if(void 0===s)this._listeners[t]=[];else for(var e=this._listeners[t],i=0;i0?0:2147483648,t,r);else if(isNaN(e))n(2143289344,t,r);else if(e>3.4028234663852886e38)n((o<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)n((o<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var u=Math.floor(Math.log(e)/Math.LN2);n((o<<31|u+127<<23|8388607&Math.round(e*Math.pow(2,-u)*8388608))>>>0,t,r)}}function i(n,e,t){var r=n(e,t),o=2*(r>>31)+1,u=r>>>23&255,i=8388607&r;return 255===u?i?NaN:o*(1/0):0===u?1.401298464324817e-45*o*i:o*Math.pow(2,u-150)*(i+8388608)}n.writeFloatLE=u.bind(null,e),n.writeFloatBE=u.bind(null,t),n.readFloatLE=i.bind(null,r),n.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),r=128===t[7];function o(n,r,o){e[0]=n,r[o]=t[0],r[o+1]=t[1],r[o+2]=t[2],r[o+3]=t[3],r[o+4]=t[4],r[o+5]=t[5],r[o+6]=t[6],r[o+7]=t[7]}function u(n,r,o){e[0]=n,r[o]=t[7],r[o+1]=t[6],r[o+2]=t[5],r[o+3]=t[4],r[o+4]=t[3],r[o+5]=t[2],r[o+6]=t[1],r[o+7]=t[0]}function i(n,r){return t[0]=n[r],t[1]=n[r+1],t[2]=n[r+2],t[3]=n[r+3],t[4]=n[r+4],t[5]=n[r+5],t[6]=n[r+6],t[7]=n[r+7],e[0]}function a(n,r){return t[7]=n[r],t[6]=n[r+1],t[5]=n[r+2],t[4]=n[r+3],t[3]=n[r+4],t[2]=n[r+5],t[1]=n[r+6],t[0]=n[r+7],e[0]}n.writeDoubleLE=r?o:u,n.writeDoubleBE=r?u:o,n.readDoubleLE=r?i:a,n.readDoubleBE=r?a:i}():function(){function u(n,e,t,r,o,u){var i=r<0?1:0;if(i&&(r=-r),0===r)n(0,o,u+e),n(1/r>0?0:2147483648,o,u+t);else if(isNaN(r))n(0,o,u+e),n(2146959360,o,u+t);else if(r>1.7976931348623157e308)n(0,o,u+e),n((i<<31|2146435072)>>>0,o,u+t);else{var a;if(r<2.2250738585072014e-308)n((a=r/5e-324)>>>0,o,u+e),n((i<<31|a/4294967296)>>>0,o,u+t);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),n(4503599627370496*(a=r*Math.pow(2,-l))>>>0,o,u+e),n((i<<31|l+1023<<20|1048576*a&1048575)>>>0,o,u+t)}}}function i(n,e,t,r,o){var u=n(r,o+e),i=n(r,o+t),a=2*(i>>31)+1,l=i>>>20&2047,f=4294967296*(1048575&i)+u;return 2047===l?f?NaN:a*(1/0):0===l?5e-324*a*f:a*Math.pow(2,l-1075)*(f+4503599627370496)}n.writeDoubleLE=u.bind(null,e,0,4),n.writeDoubleBE=u.bind(null,t,4,0),n.readDoubleLE=i.bind(null,r,0,4),n.readDoubleBE=i.bind(null,o,4,0)}(),n}function e(n,e,t){e[t]=255&n,e[t+1]=n>>>8&255,e[t+2]=n>>>16&255,e[t+3]=n>>>24}function t(n,e,t){e[t]=n>>>24,e[t+1]=n>>>16&255,e[t+2]=n>>>8&255,e[t+3]=255&n}function r(n,e){return(n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24)>>>0}function o(n,e){return(n[e]<<24|n[e+1]<<16|n[e+2]<<8|n[e+3])>>>0}module.exports=n(n); +},{}],209:[function(require,module,exports) { +"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire; +},{}],210:[function(require,module,exports) { +"use strict";var r=exports;r.length=function(r){for(var t=0,n=0,e=0;e191&&e<224?a[i++]=(31&e)<<6|63&r[t++]:e>239&&e<365?(e=((7&e)<<18|(63&r[t++])<<12|(63&r[t++])<<6|63&r[t++])-65536,a[i++]=55296+(e>>10),a[i++]=56320+(1023&e)):a[i++]=(15&e)<<12|(63&r[t++])<<6|63&r[t++],i>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),i=0);return o?(i&&o.push(String.fromCharCode.apply(String,a.slice(0,i))),o.join("")):String.fromCharCode.apply(String,a.slice(0,i))},r.write=function(r,t,n){for(var e,o,a=n,i=0;i>6|192,t[n++]=63&e|128):55296==(64512&e)&&56320==(64512&(o=r.charCodeAt(i+1)))?(e=65536+((1023&e)<<10)+(1023&o),++i,t[n++]=e>>18|240,t[n++]=e>>12&63|128,t[n++]=e>>6&63|128,t[n++]=63&e|128):(t[n++]=e>>12|224,t[n++]=e>>6&63|128,t[n++]=63&e|128);return n-a}; +},{}],211:[function(require,module,exports) { +"use strict";function r(r,n,t){var u=t||8192,e=u>>>1,l=null,c=u;return function(t){if(t<1||t>e)return r(t);c+t>u&&(l=r(u),c=0);var i=n.call(l,c,c+=t);return 7&c&&(c=1+(7|c)),i}}module.exports=r; +},{}],203:[function(require,module,exports) { +"use strict";module.exports=i;var t=require("../util/minimal");function i(t,i){this.lo=t>>>0,this.hi=i>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var r=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return o;var r=t<0;r&&(t=-t);var h=t>>>0,n=(t-h)/4294967296>>>0;return r&&(n=~n>>>0,h=~h>>>0,++h>4294967295&&(h=0,++n>4294967295&&(n=0))),new i(h,n)},i.from=function(r){if("number"==typeof r)return i.fromNumber(r);if(t.isString(r)){if(!t.Long)return i.fromNumber(parseInt(r,10));r=t.Long.fromString(r)}return r.low||r.high?new i(r.low>>>0,r.high>>>0):o},i.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var i=1+~this.lo>>>0,o=~this.hi>>>0;return i||(o=o+1>>>0),-(i+4294967296*o)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(i){return t.Long?new t.Long(0|this.lo,0|this.hi,Boolean(i)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(i)}};var h=String.prototype.charCodeAt;i.fromHash=function(t){return t===r?o:new i((h.call(t,0)|h.call(t,1)<<8|h.call(t,2)<<16|h.call(t,3)<<24)>>>0,(h.call(t,4)|h.call(t,5)<<8|h.call(t,6)<<16|h.call(t,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},i.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},i.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return 0===o?0===i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:o<128?9:10}; +},{"../util/minimal":201}],212:[function(require,module,exports) { +"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){for(var n,o=h(r),a=o[0],u=o[1],i=new e(c(r,a,u)),f=0,A=u>0?a-4:a,d=0;d>16&255,i[f++]=n>>8&255,i[f++]=255&n;return 2===u&&(n=t[r.charCodeAt(d)]<<2|t[r.charCodeAt(d+1)]>>4,i[f++]=255&n),1===u&&(n=t[r.charCodeAt(d)]<<10|t[r.charCodeAt(d+1)]<<4|t[r.charCodeAt(d+2)]>>2,i[f++]=n>>8&255,i[f++]=255&n),i}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;au?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63; +},{}],213:[function(require,module,exports) { +exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; +},{}],214:[function(require,module,exports) { +var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}; +},{}],204:[function(require,module,exports) { + +var global = arguments[3]; +var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;of&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;ci)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var i="",o=r;oe)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} +},{"base64-js":212,"ieee754":213,"isarray":214,"buffer":204}],201:[function(require,module,exports) { +var global = arguments[3]; +var Buffer = require("buffer").Buffer; +var e=arguments[3],r=require("buffer").Buffer,t=exports;function n(e,r,t){for(var n=Object.keys(r),o=0;o0)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var n=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(n.lo,n.hi,r):n.toNumber(Boolean(r))},t.merge=n,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=o,t.ProtocolError=o("ProtocolError"),t.oneOfGetter=function(e){for(var r={},t=0;t-1;--t)if(1===r[e[t]]&&void 0!==this[e[t]]&&null!==this[e[t]])return e[t]}},t.oneOfSetter=function(e){return function(r){for(var t=0;t127;)i[n++]=127&t|128,t>>>=7;i[n]=t}function a(t,i){this.len=t,this.next=void 0,this.val=i}function f(t,i,n){for(;t.hi;)i[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)i[n++]=127&t.lo|128,t.lo=t.lo>>>7;i[n++]=t.lo}function c(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}u.create=i.Buffer?function(){return(u.create=function(){return new t})()}:function(){return new u},u.alloc=function(t){return new i.Array(t)},i.Array!==Array&&(u.alloc=i.pool(u.alloc,i.Array.prototype.subarray)),u.prototype._push=function(t,i,n){return this.tail=this.tail.next=new r(t,i,n),this.len+=i,this},a.prototype=Object.create(r.prototype),a.prototype.fn=p,u.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new a((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},u.prototype.int32=function(t){return t<0?this._push(f,10,n.fromNumber(t)):this.uint32(t)},u.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},u.prototype.uint64=function(t){var i=n.from(t);return this._push(f,i.length(),i)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(t){var i=n.from(t).zzEncode();return this._push(f,i.length(),i)},u.prototype.bool=function(t){return this._push(l,1,t?1:0)},u.prototype.fixed32=function(t){return this._push(c,4,t>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(t){var i=n.from(t);return this._push(c,4,i.lo)._push(c,4,i.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(t){return this._push(i.float.writeFloatLE,4,t)},u.prototype.double=function(t){return this._push(i.float.writeDoubleLE,8,t)};var y=i.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var e=0;e>>0;if(!n)return this._push(l,1,0);if(i.isString(t)){var o=u.alloc(n=e.length(t));e.decode(t,o,0),t=o}return this.uint32(n)._push(y,n,t)},u.prototype.string=function(t){var i=o.length(t);return i?this.uint32(i)._push(o.write,i,t):this._push(l,1,0)},u.prototype.fork=function(){return this.states=new h(this),this.head=this.tail=new r(s,0,0),this.len=0,this},u.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new r(s,0,0),this.len=0),this},u.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},u.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},u._configure=function(i){t=i}; +},{"./util/minimal":201}],194:[function(require,module,exports) { + +"use strict";module.exports=n;var t=require("./writer");(n.prototype=Object.create(t.prototype)).constructor=n;var e=require("./util/minimal"),r=e.Buffer;function n(){t.call(this)}n.alloc=function(t){return(n.alloc=e._Buffer_allocUnsafe)(t)};var i=r&&r.prototype instanceof Uint8Array&&"set"===r.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n>>0;return this.uint32(r),r&&this._push(i,r,t),this},n.prototype.string=function(t){var e=r.byteLength(t);return this.uint32(e),e&&this._push(o,e,t),this}; +},{"./writer":193,"./util/minimal":201}],195:[function(require,module,exports) { +"use strict";module.exports=h;var t,i=require("./util/minimal"),s=i.LongBits,r=i.utf8;function o(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length}var n="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function e(){var t=new s(0,0),i=0;if(!(this.len-this.pos>4)){for(;i<3;++i){if(this.pos>=this.len)throw o(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,this.len-this.pos>4){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw o(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function u(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw o(this,8);return new s(u(this.buf,this.pos+=4),u(this.buf,this.pos+=4))}h.create=i.Buffer?function(s){return(h.create=function(s){return i.Buffer.isBuffer(s)?new t(s):n(s)})(s)}:n,h.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,h.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return t}}(),h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){return 0!==this.uint32()},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return u(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|u(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var t=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var t=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),i=this.pos,s=this.pos+t;if(s>this.len)throw o(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,s):i===s?new this.buf.constructor(0):this._slice.call(this.buf,i,s)},h.prototype.string=function(){var t=this.bytes();return r.read(t,0,t.length)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw o(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},h.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h._configure=function(s){t=s;var r=i.Long?"toLong":"toNumber";i.merge(h.prototype,{int64:function(){return e.call(this)[r](!1)},uint64:function(){return e.call(this)[r](!0)},sint64:function(){return e.call(this).zzDecode()[r](!1)},fixed64:function(){return f.call(this)[r](!0)},sfixed64:function(){return f.call(this)[r](!1)}})}; +},{"./util/minimal":201}],196:[function(require,module,exports) { +"use strict";module.exports=r;var t=require("./reader");(r.prototype=Object.create(t.prototype)).constructor=r;var e=require("./util/minimal");function r(e){t.call(this,e)}e.Buffer&&(r.prototype._slice=e.Buffer.prototype.slice),r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}; +},{"./reader":195,"./util/minimal":201}],202:[function(require,module,exports) { +"use strict";module.exports=t;var e=require("../util/minimal");function t(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(r),this.responseDelimited=Boolean(i)}(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t,t.prototype.rpcCall=function t(r,i,n,o,l){if(!o)throw TypeError("request must be specified");var u=this;if(!l)return e.asPromise(t,u,r,i,n,o);if(u.rpcImpl)try{return u.rpcImpl(r,i[u.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,t){if(e)return u.emit("error",e,r),l(e);if(null!==t){if(!(t instanceof n))try{t=n[u.responseDelimited?"decodeDelimited":"decode"](t)}catch(e){return u.emit("error",e,r),l(e)}return u.emit("data",t,r),l(null,t)}u.end(!0)})}catch(e){return u.emit("error",e,r),void setTimeout(function(){l(e)},0)}else setTimeout(function(){l(Error("already ended"))},0)},t.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}; +},{"../util/minimal":201}],197:[function(require,module,exports) { +"use strict";var e=exports;e.Service=require("./rpc/service"); +},{"./rpc/service":202}],198:[function(require,module,exports) { +"use strict";module.exports={}; +},{}],189:[function(require,module,exports) { +"use strict";var r=exports;function e(){r.Reader._configure(r.BufferReader),r.util._configure()}r.build="minimal",r.Writer=require("./writer"),r.BufferWriter=require("./writer_buffer"),r.Reader=require("./reader"),r.BufferReader=require("./reader_buffer"),r.util=require("./util/minimal"),r.rpc=require("./rpc"),r.roots=require("./roots"),r.configure=e,r.Writer._configure(r.BufferWriter),e(); +},{"./writer":193,"./writer_buffer":194,"./reader":195,"./reader_buffer":196,"./util/minimal":201,"./rpc":197,"./roots":198}],186:[function(require,module,exports) { +"use strict";module.exports=require("./src/index-minimal"); +},{"./src/index-minimal":189}],174:[function(require,module,exports) { +"use strict";var e=require("protobufjs/minimal"),n=e.Reader,t=e.Writer,o=e.util,r=e.roots.default||(e.roots.default={});r.perftools=function(){var i,l={};return l.profiles=((i={}).Profile=function(){function i(e){if(this.sampleType=[],this.sample=[],this.mapping=[],this.location=[],this.function=[],this.stringTable=[],this.comment=[],e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.sampleType&&i.sampleType.length||(i.sampleType=[]),i.sampleType.push(r.perftools.profiles.ValueType.decode(e,e.uint32()));break;case 2:i.sample&&i.sample.length||(i.sample=[]),i.sample.push(r.perftools.profiles.Sample.decode(e,e.uint32()));break;case 3:i.mapping&&i.mapping.length||(i.mapping=[]),i.mapping.push(r.perftools.profiles.Mapping.decode(e,e.uint32()));break;case 4:i.location&&i.location.length||(i.location=[]),i.location.push(r.perftools.profiles.Location.decode(e,e.uint32()));break;case 5:i.function&&i.function.length||(i.function=[]),i.function.push(r.perftools.profiles.Function.decode(e,e.uint32()));break;case 6:i.stringTable&&i.stringTable.length||(i.stringTable=[]),i.stringTable.push(e.string());break;case 7:i.dropFrames=e.int64();break;case 8:i.keepFrames=e.int64();break;case 9:i.timeNanos=e.int64();break;case 10:i.durationNanos=e.int64();break;case 11:i.periodType=r.perftools.profiles.ValueType.decode(e,e.uint32());break;case 12:i.period=e.int64();break;case 13:if(i.comment&&i.comment.length||(i.comment=[]),2==(7&l))for(var s=e.uint32()+e.pos;e.pos>>0,e.dropFrames.high>>>0).toNumber())),null!=e.keepFrames&&(o.Long?(n.keepFrames=o.Long.fromValue(e.keepFrames)).unsigned=!1:"string"==typeof e.keepFrames?n.keepFrames=parseInt(e.keepFrames,10):"number"==typeof e.keepFrames?n.keepFrames=e.keepFrames:"object"==typeof e.keepFrames&&(n.keepFrames=new o.LongBits(e.keepFrames.low>>>0,e.keepFrames.high>>>0).toNumber())),null!=e.timeNanos&&(o.Long?(n.timeNanos=o.Long.fromValue(e.timeNanos)).unsigned=!1:"string"==typeof e.timeNanos?n.timeNanos=parseInt(e.timeNanos,10):"number"==typeof e.timeNanos?n.timeNanos=e.timeNanos:"object"==typeof e.timeNanos&&(n.timeNanos=new o.LongBits(e.timeNanos.low>>>0,e.timeNanos.high>>>0).toNumber())),null!=e.durationNanos&&(o.Long?(n.durationNanos=o.Long.fromValue(e.durationNanos)).unsigned=!1:"string"==typeof e.durationNanos?n.durationNanos=parseInt(e.durationNanos,10):"number"==typeof e.durationNanos?n.durationNanos=e.durationNanos:"object"==typeof e.durationNanos&&(n.durationNanos=new o.LongBits(e.durationNanos.low>>>0,e.durationNanos.high>>>0).toNumber())),null!=e.periodType){if("object"!=typeof e.periodType)throw TypeError(".perftools.profiles.Profile.periodType: object expected");n.periodType=r.perftools.profiles.ValueType.fromObject(e.periodType)}if(null!=e.period&&(o.Long?(n.period=o.Long.fromValue(e.period)).unsigned=!1:"string"==typeof e.period?n.period=parseInt(e.period,10):"number"==typeof e.period?n.period=e.period:"object"==typeof e.period&&(n.period=new o.LongBits(e.period.low>>>0,e.period.high>>>0).toNumber())),e.comment){if(!Array.isArray(e.comment))throw TypeError(".perftools.profiles.Profile.comment: array expected");for(n.comment=[],t=0;t>>0,e.comment[t].high>>>0).toNumber())}return null!=e.defaultSampleType&&(o.Long?(n.defaultSampleType=o.Long.fromValue(e.defaultSampleType)).unsigned=!1:"string"==typeof e.defaultSampleType?n.defaultSampleType=parseInt(e.defaultSampleType,10):"number"==typeof e.defaultSampleType?n.defaultSampleType=e.defaultSampleType:"object"==typeof e.defaultSampleType&&(n.defaultSampleType=new o.LongBits(e.defaultSampleType.low>>>0,e.defaultSampleType.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if((n.arrays||n.defaults)&&(t.sampleType=[],t.sample=[],t.mapping=[],t.location=[],t.function=[],t.stringTable=[],t.comment=[]),n.defaults){if(o.Long){var i=new o.Long(0,0,!1);t.dropFrames=n.longs===String?i.toString():n.longs===Number?i.toNumber():i}else t.dropFrames=n.longs===String?"0":0;o.Long?(i=new o.Long(0,0,!1),t.keepFrames=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.keepFrames=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!1),t.timeNanos=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.timeNanos=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!1),t.durationNanos=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.durationNanos=n.longs===String?"0":0,t.periodType=null,o.Long?(i=new o.Long(0,0,!1),t.period=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.period=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!1),t.defaultSampleType=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.defaultSampleType=n.longs===String?"0":0}if(e.sampleType&&e.sampleType.length){t.sampleType=[];for(var l=0;l>>0,e.dropFrames.high>>>0).toNumber():e.dropFrames),null!=e.keepFrames&&e.hasOwnProperty("keepFrames")&&("number"==typeof e.keepFrames?t.keepFrames=n.longs===String?String(e.keepFrames):e.keepFrames:t.keepFrames=n.longs===String?o.Long.prototype.toString.call(e.keepFrames):n.longs===Number?new o.LongBits(e.keepFrames.low>>>0,e.keepFrames.high>>>0).toNumber():e.keepFrames),null!=e.timeNanos&&e.hasOwnProperty("timeNanos")&&("number"==typeof e.timeNanos?t.timeNanos=n.longs===String?String(e.timeNanos):e.timeNanos:t.timeNanos=n.longs===String?o.Long.prototype.toString.call(e.timeNanos):n.longs===Number?new o.LongBits(e.timeNanos.low>>>0,e.timeNanos.high>>>0).toNumber():e.timeNanos),null!=e.durationNanos&&e.hasOwnProperty("durationNanos")&&("number"==typeof e.durationNanos?t.durationNanos=n.longs===String?String(e.durationNanos):e.durationNanos:t.durationNanos=n.longs===String?o.Long.prototype.toString.call(e.durationNanos):n.longs===Number?new o.LongBits(e.durationNanos.low>>>0,e.durationNanos.high>>>0).toNumber():e.durationNanos),null!=e.periodType&&e.hasOwnProperty("periodType")&&(t.periodType=r.perftools.profiles.ValueType.toObject(e.periodType,n)),null!=e.period&&e.hasOwnProperty("period")&&("number"==typeof e.period?t.period=n.longs===String?String(e.period):e.period:t.period=n.longs===String?o.Long.prototype.toString.call(e.period):n.longs===Number?new o.LongBits(e.period.low>>>0,e.period.high>>>0).toNumber():e.period),e.comment&&e.comment.length)for(t.comment=[],l=0;l>>0,e.comment[l].high>>>0).toNumber():e.comment[l];return null!=e.defaultSampleType&&e.hasOwnProperty("defaultSampleType")&&("number"==typeof e.defaultSampleType?t.defaultSampleType=n.longs===String?String(e.defaultSampleType):e.defaultSampleType:t.defaultSampleType=n.longs===String?o.Long.prototype.toString.call(e.defaultSampleType):n.longs===Number?new o.LongBits(e.defaultSampleType.low>>>0,e.defaultSampleType.high>>>0).toNumber():e.defaultSampleType),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.ValueType=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.type=e.int64();break;case 2:i.unit=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!(o.isInteger(e.type)||e.type&&o.isInteger(e.type.low)&&o.isInteger(e.type.high))?"type: integer|Long expected":null!=e.unit&&e.hasOwnProperty("unit")&&!(o.isInteger(e.unit)||e.unit&&o.isInteger(e.unit.low)&&o.isInteger(e.unit.high))?"unit: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.ValueType)return e;var n=new r.perftools.profiles.ValueType;return null!=e.type&&(o.Long?(n.type=o.Long.fromValue(e.type)).unsigned=!1:"string"==typeof e.type?n.type=parseInt(e.type,10):"number"==typeof e.type?n.type=e.type:"object"==typeof e.type&&(n.type=new o.LongBits(e.type.low>>>0,e.type.high>>>0).toNumber())),null!=e.unit&&(o.Long?(n.unit=o.Long.fromValue(e.unit)).unsigned=!1:"string"==typeof e.unit?n.unit=parseInt(e.unit,10):"number"==typeof e.unit?n.unit=e.unit:"object"==typeof e.unit&&(n.unit=new o.LongBits(e.unit.low>>>0,e.unit.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!1);t.type=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.type=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.unit=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.unit=n.longs===String?"0":0}return null!=e.type&&e.hasOwnProperty("type")&&("number"==typeof e.type?t.type=n.longs===String?String(e.type):e.type:t.type=n.longs===String?o.Long.prototype.toString.call(e.type):n.longs===Number?new o.LongBits(e.type.low>>>0,e.type.high>>>0).toNumber():e.type),null!=e.unit&&e.hasOwnProperty("unit")&&("number"==typeof e.unit?t.unit=n.longs===String?String(e.unit):e.unit:t.unit=n.longs===String?o.Long.prototype.toString.call(e.unit):n.longs===Number?new o.LongBits(e.unit.low>>>0,e.unit.high>>>0).toNumber():e.unit),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Sample=function(){function i(e){if(this.locationId=[],this.value=[],this.label=[],e)for(var n=Object.keys(e),t=0;t>>3){case 1:if(i.locationId&&i.locationId.length||(i.locationId=[]),2==(7&l))for(var s=e.uint32()+e.pos;e.pos>>0,e.locationId[t].high>>>0).toNumber(!0))}if(e.value){if(!Array.isArray(e.value))throw TypeError(".perftools.profiles.Sample.value: array expected");for(n.value=[],t=0;t>>0,e.value[t].high>>>0).toNumber())}if(e.label){if(!Array.isArray(e.label))throw TypeError(".perftools.profiles.Sample.label: array expected");for(n.label=[],t=0;t>>0,e.locationId[i].high>>>0).toNumber(!0):e.locationId[i]}if(e.value&&e.value.length)for(t.value=[],i=0;i>>0,e.value[i].high>>>0).toNumber():e.value[i];if(e.label&&e.label.length)for(t.label=[],i=0;i>>3){case 1:i.key=e.int64();break;case 2:i.str=e.int64();break;case 3:i.num=e.int64();break;case 4:i.numUnit=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!(o.isInteger(e.key)||e.key&&o.isInteger(e.key.low)&&o.isInteger(e.key.high))?"key: integer|Long expected":null!=e.str&&e.hasOwnProperty("str")&&!(o.isInteger(e.str)||e.str&&o.isInteger(e.str.low)&&o.isInteger(e.str.high))?"str: integer|Long expected":null!=e.num&&e.hasOwnProperty("num")&&!(o.isInteger(e.num)||e.num&&o.isInteger(e.num.low)&&o.isInteger(e.num.high))?"num: integer|Long expected":null!=e.numUnit&&e.hasOwnProperty("numUnit")&&!(o.isInteger(e.numUnit)||e.numUnit&&o.isInteger(e.numUnit.low)&&o.isInteger(e.numUnit.high))?"numUnit: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Label)return e;var n=new r.perftools.profiles.Label;return null!=e.key&&(o.Long?(n.key=o.Long.fromValue(e.key)).unsigned=!1:"string"==typeof e.key?n.key=parseInt(e.key,10):"number"==typeof e.key?n.key=e.key:"object"==typeof e.key&&(n.key=new o.LongBits(e.key.low>>>0,e.key.high>>>0).toNumber())),null!=e.str&&(o.Long?(n.str=o.Long.fromValue(e.str)).unsigned=!1:"string"==typeof e.str?n.str=parseInt(e.str,10):"number"==typeof e.str?n.str=e.str:"object"==typeof e.str&&(n.str=new o.LongBits(e.str.low>>>0,e.str.high>>>0).toNumber())),null!=e.num&&(o.Long?(n.num=o.Long.fromValue(e.num)).unsigned=!1:"string"==typeof e.num?n.num=parseInt(e.num,10):"number"==typeof e.num?n.num=e.num:"object"==typeof e.num&&(n.num=new o.LongBits(e.num.low>>>0,e.num.high>>>0).toNumber())),null!=e.numUnit&&(o.Long?(n.numUnit=o.Long.fromValue(e.numUnit)).unsigned=!1:"string"==typeof e.numUnit?n.numUnit=parseInt(e.numUnit,10):"number"==typeof e.numUnit?n.numUnit=e.numUnit:"object"==typeof e.numUnit&&(n.numUnit=new o.LongBits(e.numUnit.low>>>0,e.numUnit.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!1);t.key=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.key=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.str=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.str=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.num=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.num=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.numUnit=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.numUnit=n.longs===String?"0":0}return null!=e.key&&e.hasOwnProperty("key")&&("number"==typeof e.key?t.key=n.longs===String?String(e.key):e.key:t.key=n.longs===String?o.Long.prototype.toString.call(e.key):n.longs===Number?new o.LongBits(e.key.low>>>0,e.key.high>>>0).toNumber():e.key),null!=e.str&&e.hasOwnProperty("str")&&("number"==typeof e.str?t.str=n.longs===String?String(e.str):e.str:t.str=n.longs===String?o.Long.prototype.toString.call(e.str):n.longs===Number?new o.LongBits(e.str.low>>>0,e.str.high>>>0).toNumber():e.str),null!=e.num&&e.hasOwnProperty("num")&&("number"==typeof e.num?t.num=n.longs===String?String(e.num):e.num:t.num=n.longs===String?o.Long.prototype.toString.call(e.num):n.longs===Number?new o.LongBits(e.num.low>>>0,e.num.high>>>0).toNumber():e.num),null!=e.numUnit&&e.hasOwnProperty("numUnit")&&("number"==typeof e.numUnit?t.numUnit=n.longs===String?String(e.numUnit):e.numUnit:t.numUnit=n.longs===String?o.Long.prototype.toString.call(e.numUnit):n.longs===Number?new o.LongBits(e.numUnit.low>>>0,e.numUnit.high>>>0).toNumber():e.numUnit),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Mapping=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.id=e.uint64();break;case 2:i.memoryStart=e.uint64();break;case 3:i.memoryLimit=e.uint64();break;case 4:i.fileOffset=e.uint64();break;case 5:i.filename=e.int64();break;case 6:i.buildId=e.int64();break;case 7:i.hasFunctions=e.bool();break;case 8:i.hasFilenames=e.bool();break;case 9:i.hasLineNumbers=e.bool();break;case 10:i.hasInlineFrames=e.bool();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!(o.isInteger(e.id)||e.id&&o.isInteger(e.id.low)&&o.isInteger(e.id.high))?"id: integer|Long expected":null!=e.memoryStart&&e.hasOwnProperty("memoryStart")&&!(o.isInteger(e.memoryStart)||e.memoryStart&&o.isInteger(e.memoryStart.low)&&o.isInteger(e.memoryStart.high))?"memoryStart: integer|Long expected":null!=e.memoryLimit&&e.hasOwnProperty("memoryLimit")&&!(o.isInteger(e.memoryLimit)||e.memoryLimit&&o.isInteger(e.memoryLimit.low)&&o.isInteger(e.memoryLimit.high))?"memoryLimit: integer|Long expected":null!=e.fileOffset&&e.hasOwnProperty("fileOffset")&&!(o.isInteger(e.fileOffset)||e.fileOffset&&o.isInteger(e.fileOffset.low)&&o.isInteger(e.fileOffset.high))?"fileOffset: integer|Long expected":null!=e.filename&&e.hasOwnProperty("filename")&&!(o.isInteger(e.filename)||e.filename&&o.isInteger(e.filename.low)&&o.isInteger(e.filename.high))?"filename: integer|Long expected":null!=e.buildId&&e.hasOwnProperty("buildId")&&!(o.isInteger(e.buildId)||e.buildId&&o.isInteger(e.buildId.low)&&o.isInteger(e.buildId.high))?"buildId: integer|Long expected":null!=e.hasFunctions&&e.hasOwnProperty("hasFunctions")&&"boolean"!=typeof e.hasFunctions?"hasFunctions: boolean expected":null!=e.hasFilenames&&e.hasOwnProperty("hasFilenames")&&"boolean"!=typeof e.hasFilenames?"hasFilenames: boolean expected":null!=e.hasLineNumbers&&e.hasOwnProperty("hasLineNumbers")&&"boolean"!=typeof e.hasLineNumbers?"hasLineNumbers: boolean expected":null!=e.hasInlineFrames&&e.hasOwnProperty("hasInlineFrames")&&"boolean"!=typeof e.hasInlineFrames?"hasInlineFrames: boolean expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Mapping)return e;var n=new r.perftools.profiles.Mapping;return null!=e.id&&(o.Long?(n.id=o.Long.fromValue(e.id)).unsigned=!0:"string"==typeof e.id?n.id=parseInt(e.id,10):"number"==typeof e.id?n.id=e.id:"object"==typeof e.id&&(n.id=new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0))),null!=e.memoryStart&&(o.Long?(n.memoryStart=o.Long.fromValue(e.memoryStart)).unsigned=!0:"string"==typeof e.memoryStart?n.memoryStart=parseInt(e.memoryStart,10):"number"==typeof e.memoryStart?n.memoryStart=e.memoryStart:"object"==typeof e.memoryStart&&(n.memoryStart=new o.LongBits(e.memoryStart.low>>>0,e.memoryStart.high>>>0).toNumber(!0))),null!=e.memoryLimit&&(o.Long?(n.memoryLimit=o.Long.fromValue(e.memoryLimit)).unsigned=!0:"string"==typeof e.memoryLimit?n.memoryLimit=parseInt(e.memoryLimit,10):"number"==typeof e.memoryLimit?n.memoryLimit=e.memoryLimit:"object"==typeof e.memoryLimit&&(n.memoryLimit=new o.LongBits(e.memoryLimit.low>>>0,e.memoryLimit.high>>>0).toNumber(!0))),null!=e.fileOffset&&(o.Long?(n.fileOffset=o.Long.fromValue(e.fileOffset)).unsigned=!0:"string"==typeof e.fileOffset?n.fileOffset=parseInt(e.fileOffset,10):"number"==typeof e.fileOffset?n.fileOffset=e.fileOffset:"object"==typeof e.fileOffset&&(n.fileOffset=new o.LongBits(e.fileOffset.low>>>0,e.fileOffset.high>>>0).toNumber(!0))),null!=e.filename&&(o.Long?(n.filename=o.Long.fromValue(e.filename)).unsigned=!1:"string"==typeof e.filename?n.filename=parseInt(e.filename,10):"number"==typeof e.filename?n.filename=e.filename:"object"==typeof e.filename&&(n.filename=new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber())),null!=e.buildId&&(o.Long?(n.buildId=o.Long.fromValue(e.buildId)).unsigned=!1:"string"==typeof e.buildId?n.buildId=parseInt(e.buildId,10):"number"==typeof e.buildId?n.buildId=e.buildId:"object"==typeof e.buildId&&(n.buildId=new o.LongBits(e.buildId.low>>>0,e.buildId.high>>>0).toNumber())),null!=e.hasFunctions&&(n.hasFunctions=Boolean(e.hasFunctions)),null!=e.hasFilenames&&(n.hasFilenames=Boolean(e.hasFilenames)),null!=e.hasLineNumbers&&(n.hasLineNumbers=Boolean(e.hasLineNumbers)),null!=e.hasInlineFrames&&(n.hasInlineFrames=Boolean(e.hasInlineFrames)),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!0);t.id=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.id=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!0),t.memoryStart=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.memoryStart=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!0),t.memoryLimit=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.memoryLimit=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!0),t.fileOffset=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.fileOffset=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.filename=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.filename=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.buildId=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.buildId=n.longs===String?"0":0,t.hasFunctions=!1,t.hasFilenames=!1,t.hasLineNumbers=!1,t.hasInlineFrames=!1}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?t.id=n.longs===String?String(e.id):e.id:t.id=n.longs===String?o.Long.prototype.toString.call(e.id):n.longs===Number?new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.memoryStart&&e.hasOwnProperty("memoryStart")&&("number"==typeof e.memoryStart?t.memoryStart=n.longs===String?String(e.memoryStart):e.memoryStart:t.memoryStart=n.longs===String?o.Long.prototype.toString.call(e.memoryStart):n.longs===Number?new o.LongBits(e.memoryStart.low>>>0,e.memoryStart.high>>>0).toNumber(!0):e.memoryStart),null!=e.memoryLimit&&e.hasOwnProperty("memoryLimit")&&("number"==typeof e.memoryLimit?t.memoryLimit=n.longs===String?String(e.memoryLimit):e.memoryLimit:t.memoryLimit=n.longs===String?o.Long.prototype.toString.call(e.memoryLimit):n.longs===Number?new o.LongBits(e.memoryLimit.low>>>0,e.memoryLimit.high>>>0).toNumber(!0):e.memoryLimit),null!=e.fileOffset&&e.hasOwnProperty("fileOffset")&&("number"==typeof e.fileOffset?t.fileOffset=n.longs===String?String(e.fileOffset):e.fileOffset:t.fileOffset=n.longs===String?o.Long.prototype.toString.call(e.fileOffset):n.longs===Number?new o.LongBits(e.fileOffset.low>>>0,e.fileOffset.high>>>0).toNumber(!0):e.fileOffset),null!=e.filename&&e.hasOwnProperty("filename")&&("number"==typeof e.filename?t.filename=n.longs===String?String(e.filename):e.filename:t.filename=n.longs===String?o.Long.prototype.toString.call(e.filename):n.longs===Number?new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber():e.filename),null!=e.buildId&&e.hasOwnProperty("buildId")&&("number"==typeof e.buildId?t.buildId=n.longs===String?String(e.buildId):e.buildId:t.buildId=n.longs===String?o.Long.prototype.toString.call(e.buildId):n.longs===Number?new o.LongBits(e.buildId.low>>>0,e.buildId.high>>>0).toNumber():e.buildId),null!=e.hasFunctions&&e.hasOwnProperty("hasFunctions")&&(t.hasFunctions=e.hasFunctions),null!=e.hasFilenames&&e.hasOwnProperty("hasFilenames")&&(t.hasFilenames=e.hasFilenames),null!=e.hasLineNumbers&&e.hasOwnProperty("hasLineNumbers")&&(t.hasLineNumbers=e.hasLineNumbers),null!=e.hasInlineFrames&&e.hasOwnProperty("hasInlineFrames")&&(t.hasInlineFrames=e.hasInlineFrames),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Location=function(){function i(e){if(this.line=[],e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.id=e.uint64();break;case 2:i.mappingId=e.uint64();break;case 3:i.address=e.uint64();break;case 4:i.line&&i.line.length||(i.line=[]),i.line.push(r.perftools.profiles.Line.decode(e,e.uint32()));break;case 5:i.isFolded=e.bool();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!(o.isInteger(e.id)||e.id&&o.isInteger(e.id.low)&&o.isInteger(e.id.high)))return"id: integer|Long expected";if(null!=e.mappingId&&e.hasOwnProperty("mappingId")&&!(o.isInteger(e.mappingId)||e.mappingId&&o.isInteger(e.mappingId.low)&&o.isInteger(e.mappingId.high)))return"mappingId: integer|Long expected";if(null!=e.address&&e.hasOwnProperty("address")&&!(o.isInteger(e.address)||e.address&&o.isInteger(e.address.low)&&o.isInteger(e.address.high)))return"address: integer|Long expected";if(null!=e.line&&e.hasOwnProperty("line")){if(!Array.isArray(e.line))return"line: array expected";for(var n=0;n>>0,e.id.high>>>0).toNumber(!0))),null!=e.mappingId&&(o.Long?(n.mappingId=o.Long.fromValue(e.mappingId)).unsigned=!0:"string"==typeof e.mappingId?n.mappingId=parseInt(e.mappingId,10):"number"==typeof e.mappingId?n.mappingId=e.mappingId:"object"==typeof e.mappingId&&(n.mappingId=new o.LongBits(e.mappingId.low>>>0,e.mappingId.high>>>0).toNumber(!0))),null!=e.address&&(o.Long?(n.address=o.Long.fromValue(e.address)).unsigned=!0:"string"==typeof e.address?n.address=parseInt(e.address,10):"number"==typeof e.address?n.address=e.address:"object"==typeof e.address&&(n.address=new o.LongBits(e.address.low>>>0,e.address.high>>>0).toNumber(!0))),e.line){if(!Array.isArray(e.line))throw TypeError(".perftools.profiles.Location.line: array expected");n.line=[];for(var t=0;t>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.mappingId&&e.hasOwnProperty("mappingId")&&("number"==typeof e.mappingId?t.mappingId=n.longs===String?String(e.mappingId):e.mappingId:t.mappingId=n.longs===String?o.Long.prototype.toString.call(e.mappingId):n.longs===Number?new o.LongBits(e.mappingId.low>>>0,e.mappingId.high>>>0).toNumber(!0):e.mappingId),null!=e.address&&e.hasOwnProperty("address")&&("number"==typeof e.address?t.address=n.longs===String?String(e.address):e.address:t.address=n.longs===String?o.Long.prototype.toString.call(e.address):n.longs===Number?new o.LongBits(e.address.low>>>0,e.address.high>>>0).toNumber(!0):e.address),e.line&&e.line.length){t.line=[];for(var l=0;l>>3){case 1:i.functionId=e.uint64();break;case 2:i.line=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.functionId&&e.hasOwnProperty("functionId")&&!(o.isInteger(e.functionId)||e.functionId&&o.isInteger(e.functionId.low)&&o.isInteger(e.functionId.high))?"functionId: integer|Long expected":null!=e.line&&e.hasOwnProperty("line")&&!(o.isInteger(e.line)||e.line&&o.isInteger(e.line.low)&&o.isInteger(e.line.high))?"line: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Line)return e;var n=new r.perftools.profiles.Line;return null!=e.functionId&&(o.Long?(n.functionId=o.Long.fromValue(e.functionId)).unsigned=!0:"string"==typeof e.functionId?n.functionId=parseInt(e.functionId,10):"number"==typeof e.functionId?n.functionId=e.functionId:"object"==typeof e.functionId&&(n.functionId=new o.LongBits(e.functionId.low>>>0,e.functionId.high>>>0).toNumber(!0))),null!=e.line&&(o.Long?(n.line=o.Long.fromValue(e.line)).unsigned=!1:"string"==typeof e.line?n.line=parseInt(e.line,10):"number"==typeof e.line?n.line=e.line:"object"==typeof e.line&&(n.line=new o.LongBits(e.line.low>>>0,e.line.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!0);t.functionId=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.functionId=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.line=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.line=n.longs===String?"0":0}return null!=e.functionId&&e.hasOwnProperty("functionId")&&("number"==typeof e.functionId?t.functionId=n.longs===String?String(e.functionId):e.functionId:t.functionId=n.longs===String?o.Long.prototype.toString.call(e.functionId):n.longs===Number?new o.LongBits(e.functionId.low>>>0,e.functionId.high>>>0).toNumber(!0):e.functionId),null!=e.line&&e.hasOwnProperty("line")&&("number"==typeof e.line?t.line=n.longs===String?String(e.line):e.line:t.line=n.longs===String?o.Long.prototype.toString.call(e.line):n.longs===Number?new o.LongBits(e.line.low>>>0,e.line.high>>>0).toNumber():e.line),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Function=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.id=e.uint64();break;case 2:i.name=e.int64();break;case 3:i.systemName=e.int64();break;case 4:i.filename=e.int64();break;case 5:i.startLine=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!(o.isInteger(e.id)||e.id&&o.isInteger(e.id.low)&&o.isInteger(e.id.high))?"id: integer|Long expected":null!=e.name&&e.hasOwnProperty("name")&&!(o.isInteger(e.name)||e.name&&o.isInteger(e.name.low)&&o.isInteger(e.name.high))?"name: integer|Long expected":null!=e.systemName&&e.hasOwnProperty("systemName")&&!(o.isInteger(e.systemName)||e.systemName&&o.isInteger(e.systemName.low)&&o.isInteger(e.systemName.high))?"systemName: integer|Long expected":null!=e.filename&&e.hasOwnProperty("filename")&&!(o.isInteger(e.filename)||e.filename&&o.isInteger(e.filename.low)&&o.isInteger(e.filename.high))?"filename: integer|Long expected":null!=e.startLine&&e.hasOwnProperty("startLine")&&!(o.isInteger(e.startLine)||e.startLine&&o.isInteger(e.startLine.low)&&o.isInteger(e.startLine.high))?"startLine: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Function)return e;var n=new r.perftools.profiles.Function;return null!=e.id&&(o.Long?(n.id=o.Long.fromValue(e.id)).unsigned=!0:"string"==typeof e.id?n.id=parseInt(e.id,10):"number"==typeof e.id?n.id=e.id:"object"==typeof e.id&&(n.id=new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0))),null!=e.name&&(o.Long?(n.name=o.Long.fromValue(e.name)).unsigned=!1:"string"==typeof e.name?n.name=parseInt(e.name,10):"number"==typeof e.name?n.name=e.name:"object"==typeof e.name&&(n.name=new o.LongBits(e.name.low>>>0,e.name.high>>>0).toNumber())),null!=e.systemName&&(o.Long?(n.systemName=o.Long.fromValue(e.systemName)).unsigned=!1:"string"==typeof e.systemName?n.systemName=parseInt(e.systemName,10):"number"==typeof e.systemName?n.systemName=e.systemName:"object"==typeof e.systemName&&(n.systemName=new o.LongBits(e.systemName.low>>>0,e.systemName.high>>>0).toNumber())),null!=e.filename&&(o.Long?(n.filename=o.Long.fromValue(e.filename)).unsigned=!1:"string"==typeof e.filename?n.filename=parseInt(e.filename,10):"number"==typeof e.filename?n.filename=e.filename:"object"==typeof e.filename&&(n.filename=new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber())),null!=e.startLine&&(o.Long?(n.startLine=o.Long.fromValue(e.startLine)).unsigned=!1:"string"==typeof e.startLine?n.startLine=parseInt(e.startLine,10):"number"==typeof e.startLine?n.startLine=e.startLine:"object"==typeof e.startLine&&(n.startLine=new o.LongBits(e.startLine.low>>>0,e.startLine.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!0);t.id=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.id=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.name=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.name=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.systemName=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.systemName=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.filename=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.filename=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.startLine=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.startLine=n.longs===String?"0":0}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?t.id=n.longs===String?String(e.id):e.id:t.id=n.longs===String?o.Long.prototype.toString.call(e.id):n.longs===Number?new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.name&&e.hasOwnProperty("name")&&("number"==typeof e.name?t.name=n.longs===String?String(e.name):e.name:t.name=n.longs===String?o.Long.prototype.toString.call(e.name):n.longs===Number?new o.LongBits(e.name.low>>>0,e.name.high>>>0).toNumber():e.name),null!=e.systemName&&e.hasOwnProperty("systemName")&&("number"==typeof e.systemName?t.systemName=n.longs===String?String(e.systemName):e.systemName:t.systemName=n.longs===String?o.Long.prototype.toString.call(e.systemName):n.longs===Number?new o.LongBits(e.systemName.low>>>0,e.systemName.high>>>0).toNumber():e.systemName),null!=e.filename&&e.hasOwnProperty("filename")&&("number"==typeof e.filename?t.filename=n.longs===String?String(e.filename):e.filename:t.filename=n.longs===String?o.Long.prototype.toString.call(e.filename):n.longs===Number?new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber():e.filename),null!=e.startLine&&e.hasOwnProperty("startLine")&&("number"==typeof e.startLine?t.startLine=n.longs===String?String(e.startLine):e.startLine:t.startLine=n.longs===String?o.Long.prototype.toString.call(e.startLine):n.longs===Number?new o.LongBits(e.startLine.low>>>0,e.startLine.high>>>0).toNumber():e.startLine),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i),l}(),module.exports=r; +},{"protobufjs/minimal":186}],155:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importAsPprofProfile=r;var e=require("./profile.proto.js"),n=require("../lib/profile"),t=require("../lib/utils"),l=require("../lib/value-formatters");function r(r){if(0===r.byteLength)return null;let o;try{o=e.perftools.profiles.Profile.decode(new Uint8Array(r))}catch(e){return null}function i(e){return"number"==typeof e?e:e.low}function u(e){return o.stringTable[i(e)]||null}const s=new Map;function a(e){const{name:n,filename:t,startLine:l}=e,r=null!=n&&u(n)||"(unknown)",o=null!=t?u(t):null,i=null!=l?+l:null,s={key:`${r}:${o}:${i}`,name:r};return null!=o&&(s.file=o),null!=i&&(s.line=i),s}for(let e of o.function)if(e.id){const n=a(e);null!=n&&s.set(i(e.id),n)}function c(e){const{line:n}=e;if(null==n)return null;const l=(0,t.lastOf)(n);return null==l?null:l.functionId&&s.get(i(l.functionId))||null}const f=new Map;for(let e of o.location)if(null!=e.id){const n=c(e);n&&f.set(i(e.id),n)}const p=o.sampleType.map(e=>({type:e.type&&u(e.type)||"samples",unit:e.unit&&u(e.unit)||"count"})),d=o.defaultSampleType?+o.defaultSampleType:p.length-1,m=p[d],y=new n.StackListProfileBuilder;switch(m.unit){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":y.setValueFormatter(new l.TimeFormatter(m.unit));break;case"bytes":y.setValueFormatter(new l.ByteFormatter)}for(let e of o.sample){const n=e.locationId?e.locationId.map(e=>f.get(i(e))):[];n.reverse();const t=e.value[d];y.appendSampleWithWeight(n.filter(e=>null!=e),+t)}return y.build()} +},{"./profile.proto.js":174,"../lib/profile":139,"../lib/utils":70,"../lib/value-formatters":140}],156:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromChromeHeapProfile=o;var e=require("../lib/profile"),r=require("../lib/utils"),t=require("../lib/value-formatters");const n=new Map;function i(e){return(0,r.getOrInsert)(n,e,e=>{const r=e.functionName||"(anonymous)",t=e.url,n=e.lineNumber,i=e.columnNumber;return{key:`${r}:${t}:${n}:${i}`,name:r,file:t,line:n,col:i}})}function o(r){const n=new Map;let o=0;const l=(e,r)=>{e.id=o++,n.set(e.id,e),r&&(e.parent=r.id),e.children.forEach(r=>l(r,e))};l(r.head);const u=e=>{if(0===e.children.length)return e.selfSize||0;const r=e.children.reduce((e,r)=>e+=u(r),e.selfSize);return e.totalSize=r,r},a=u(r.head),s=[];for(let e of n.values()){let r=[];for(r.push(e);void 0!==e.parent;){const t=n.get(e.parent);if(void 0===t)break;r.unshift(t),e=t}s.push(r)}const c=new e.StackListProfileBuilder(a);for(let e of s){const r=e[e.length-1];c.appendSampleWithWeight(e.map(e=>i(e.callFrame)),r.selfSize)}return c.setValueFormatter(new t.ByteFormatter),c.build()} +},{"../lib/profile":139,"../lib/utils":70,"../lib/value-formatters":140}],157:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isTraceEventFormatted=l,exports.importTraceEvents=p;var e=require("../lib/utils"),t=require("../lib/profile"),r=require("../lib/value-formatters");function n(e){const t=[];for(let r of e)switch(r.ph){case"B":case"E":case"X":t.push(r)}return t}function i(e){const t=[];for(let r of e)switch(r.ph){case"B":case"E":t.push(r);break;case"X":let e=null;if(null!=r.dur?e=r.dur:null!=r.tdur&&(e=r.tdur),null==e){console.warn("Found a complete event (X) with no duration. Skipping: ",r);continue}t.push(Object.assign({},r,{ph:"B"})),t.push(Object.assign({},r,{ph:"E",ts:r.ts+e}));break;default:return r}return t}function s(e){const t=new Map;for(let r of e)"M"===r.ph&&"process_name"===r.name&&r.args&&r.args.name&&t.set(r.pid,r.args.name);return t}function a(e){const t=new Map;for(let r of e)if("M"===r.ph&&"thread_name"===r.name&&r.args&&r.args.name){const e=`${r.pid}:${r.tid}`;t.set(e,r.args.name)}return t}function u(e){let t=`${e.name||"(unnamed)"}`;return e.args&&(t+=` ${JSON.stringify(e.args)}`),t}function o(o){const c=new Map,f=i(n(o)),l=s(o),p=a(o);if(f.sort((e,t)=>{if(e.tst.ts)return 1;if(e.pidt.pid)return 1;if(e.tidt.tid)return 1;if(u(e)===u(t)){if("B"===e.ph&&"E"===t.ph)return-1;if("E"===e.ph&&"B"===t.ph)return 1}else{if("B"===e.ph&&"E"===t.ph)return 1;if("E"===e.ph&&"B"===t.ph)return-1}return 0}),f.length>0){const e=f[0].ts;for(let t of f)t.ts-=e}function d(n,i){const s=`${(0,e.zeroPad)(""+n,10)}:${(0,e.zeroPad)(""+i,10)}`;let a=c.get(s);if(null!=a)return a;let u=new t.CallTreeProfileBuilder;a={profile:u,eventStack:[]},u.setValueFormatter(new r.TimeFormatter("microseconds")),c.set(s,a);const o=l.get(n),f=p.get(`${n}:${i}`);return null!=o&&null!=f?u.setName(`${o} (pid ${n}), ${f} (tid ${i})`):null!=o?u.setName(`${o} (pid ${n}, tid ${i})`):null!=f?u.setName(`${f} (pid ${n}, tid ${i})`):u.setName(`pid ${n}, tid ${i}`),a}for(let t of f){const{profile:r,eventStack:n}=d(t.pid,t.tid),i=u(t),s={key:i,name:i};switch(t.ph){case"B":n.push(t),r.enterFrame(s,t.ts);break;case"E":const i=(0,e.lastOf)(n);null!=i&&i.name===t.name?(r.leaveFrame(s,t.ts),n.pop()):console.warn("Event discarded because it did not match top-of-stack. Discarded event:",t,"Top of stack:",i);break;default:return t}}const h=Array.from(c.entries());return(0,e.sortBy)(h,e=>e[0]),{name:"",indexToView:0,profiles:h.map(e=>e[1].profile)}}function c(e){if(!Array.isArray(e))return!1;if(0===e.length)return!1;for(let t of e){if(!("ph"in t))return!1;switch(t.ph){case"B":case"E":case"X":if(!("ts"in t))return!1}}return!0}function f(e){return"traceEvents"in e&&c(e.traceEvents)}function l(e){return f(e)||c(e)}function p(e){if(f(e))return o(e.traceEvents);if(c(e))return o(e);return e} +},{"../lib/utils":70,"../lib/profile":139,"../lib/value-formatters":140}],104:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importProfileGroupFromText=g,exports.importProfileGroupFromBase64=h,exports.importProfilesFromFile=F,exports.importProfilesFromArrayBuffer=y,exports.importFromFileSystemDirectoryEntry=C;var e=require("./chrome"),r=require("./stackprof"),o=require("./instruments"),t=require("./bg-flamegraph"),i=require("./firefox"),n=require("../lib/file-format"),s=require("./v8proflog"),p=require("./linux-tools-perf"),l=require("./haskell"),m=require("./utils"),a=require("./pprof"),f=require("../lib/utils"),u=require("./v8heapalloc"),c=require("./trace-event"),d=function(e,r,o,t){return new(o||(o=Promise))(function(i,n){function s(e){try{l(t.next(e))}catch(e){n(e)}}function p(e){try{l(t.throw(e))}catch(e){n(e)}}function l(e){e.done?i(e.value):new o(function(r){r(e.value)}).then(s,p)}l((t=t.apply(e,r||[])).next())})};function g(e,r){return d(this,void 0,void 0,function*(){return yield P(new m.TextProfileDataSource(e,r))})}function h(e,r){return d(this,void 0,void 0,function*(){return yield P(m.MaybeCompressedDataReader.fromArrayBuffer(e,(0,f.decodeBase64)(r).buffer))})}function F(e){return d(this,void 0,void 0,function*(){return P(m.MaybeCompressedDataReader.fromFile(e))})}function y(e,r){return d(this,void 0,void 0,function*(){return P(m.MaybeCompressedDataReader.fromArrayBuffer(e,r))})}function P(e){return d(this,void 0,void 0,function*(){const r=yield e.name(),o=yield I(e);if(o){o.name||(o.name=r);for(let e of o.profiles)e&&!e.getName()&&e.setName(r);return o}return null})}function v(e){return e?{name:e.getName(),indexToView:0,profiles:[e]}:null}function x(e){return"["===(e=e.trim())[0]&&"]"!==(e=e.replace(/,\s*$/,""))[e.length-1]&&(e+="]"),e}function I(m){return d(this,void 0,void 0,function*(){const f=yield m.name(),d=yield m.readAsArrayBuffer();{const e=(0,a.importAsPprofProfile)(d);if(e)return console.log("Importing as protobuf encoded pprof file"),v(e)}const g=yield m.readAsText();if(f.endsWith(".speedscope.json"))return console.log("Importing as speedscope json file"),(0,n.importSpeedscopeProfiles)(JSON.parse(g));if(f.endsWith(".chrome.json")||/Profile-\d{8}T\d{6}/.exec(f))return console.log("Importing as Chrome Timeline"),(0,e.importFromChromeTimeline)(JSON.parse(g),f);if(f.endsWith(".stackprof.json"))return console.log("Importing as stackprof profile"),v((0,r.importFromStackprof)(JSON.parse(g)));if(f.endsWith(".instruments.txt"))return console.log("Importing as Instruments.app deep copy"),v((0,o.importFromInstrumentsDeepCopy)(g));if(f.endsWith(".linux-perf.txt"))return console.log("Importing as output of linux perf script"),(0,p.importFromLinuxPerf)(g);if(f.endsWith(".collapsedstack.txt"))return console.log("Importing as collapsed stack format"),v((0,t.importFromBGFlameGraph)(g));if(f.endsWith(".v8log.json"))return console.log("Importing as --prof-process v8 log"),v((0,s.importFromV8ProfLog)(JSON.parse(g)));if(f.endsWith(".heapprofile"))return console.log("Importing as Chrome Heap Profile"),v((0,u.importFromChromeHeapProfile)(JSON.parse(g)));let h;try{h=JSON.parse(x(g))}catch(e){}if(h){if("https://www.speedscope.app/file-format-schema.json"===h.$schema)return console.log("Importing as speedscope json file"),(0,n.importSpeedscopeProfiles)(JSON.parse(g));if(h.systemHost&&"Firefox"==h.systemHost.name)return console.log("Importing as Firefox profile"),v((0,i.importFromFirefox)(h));if((0,e.isChromeTimeline)(h))return console.log("Importing as Chrome Timeline"),(0,e.importFromChromeTimeline)(h,f);if("nodes"in h&&"samples"in h&&"timeDeltas"in h)return console.log("Importing as Chrome CPU Profile"),v((0,e.importFromChromeCPUProfile)(h));if((0,c.isTraceEventFormatted)(h))return console.log("Importing as Trace Event Format profile"),(0,c.importTraceEvents)(h);if("head"in h&&"samples"in h&&"timestamps"in h)return console.log("Importing as Chrome CPU Profile (old format)"),v((0,e.importFromOldV8CPUProfile)(h));if("mode"in h&&"frames"in h&&"raw_timestamp_deltas"in h)return console.log("Importing as stackprof profile"),v((0,r.importFromStackprof)(h));if("code"in h&&"functions"in h&&"ticks"in h)return console.log("Importing as --prof-process v8 log"),v((0,s.importFromV8ProfLog)(h));if("head"in h&&"selfSize"in h.head)return console.log("Importing as Chrome Heap Profile"),v((0,u.importFromChromeHeapProfile)(JSON.parse(g)));if("rts_arguments"in h&&"initial_capabilities"in h)return console.log("Importing as Haskell GHC JSON Profile"),(0,l.importFromHaskell)(h)}else{if(/^[\w \t\(\)]*\tSymbol Name/.exec(g))return console.log("Importing as Instruments.app deep copy"),v((0,o.importFromInstrumentsDeepCopy)(g));const e=g.split(/\n/).length;if(e>=1&&e===g.split(/ \d+\r?\n/).length)return console.log("Importing as collapsed stack format"),v((0,t.importFromBGFlameGraph)(g));const r=(0,p.importFromLinuxPerf)(g);if(r)return console.log("Importing from linux perf script output"),r}return null})}function C(e){return d(this,void 0,void 0,function*(){return(0,o.importFromInstrumentsTrace)(e)})} +},{"./chrome":146,"./stackprof":147,"./instruments":148,"./bg-flamegraph":149,"./firefox":150,"../lib/file-format":83,"./v8proflog":151,"./linux-tools-perf":152,"./haskell":153,"./utils":154,"./pprof":155,"../lib/utils":70,"./v8heapalloc":156,"./trace-event":157}]},{},[104], null) +//# sourceMappingURL=import.a03c2bef.map \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/index.html b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/index.html new file mode 100644 index 0000000000000000000000000000000000000000..3db6f9064ca2689094c6aed55b7abd4426a5dbad --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/index.html @@ -0,0 +1 @@ + speedscope \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/perf-vertx-stacks-01-collapsed-all.3e0a632c.txt b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/perf-vertx-stacks-01-collapsed-all.3e0a632c.txt new file mode 100644 index 0000000000000000000000000000000000000000..4b5f79febeeeff7e439b6e6e2b4af9baa6d1dccf --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/perf-vertx-stacks-01-collapsed-all.3e0a632c.txt @@ -0,0 +1,199 @@ +java;read;check_events_[k];hypercall_page_[k] 1 +java;start_thread;java_start;GCTaskThread::run;ScavengeRootsTask::do_it;ClassLoaderDataGraph::oops_do;ClassLoaderData::oops_do;PSScavengeKlassClosure::do_klass 1 +java;start_thread;java_start;GCTaskThread::run;StealTask::do_it;PSPromotionManager::drain_stacks_depth;oopDesc* PSPromotionManager::copy_to_survivor_space;InstanceKlass::oop_push_contents 1 +java;start_thread;java_start;GCTaskThread::run;StealTask::do_it;ParallelTaskTerminator::offer_termination 5 +java;start_thread;java_start;GCTaskThread::run;StealTask::do_it;SpinPause 7 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/buffer/AbstractByteBufAllocator:.directBuffer_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/AbstractReferenceCountedByteBuf:.release_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];io/netty/buffer/PooledByteBuf:.internalNioBuffer_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/NativeThread:.current_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j]; 3 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];Java_sun_nio_ch_FileDispatcherImpl_write0 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;sys_write_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];fget_light_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];__srcu_read_lock_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];__tcp_push_pending_frames_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];ktime_get_real_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];skb_clone_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_set_skb_tso_segs_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_hard_start_xmit_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_pick_tx_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];dev_hard_start_xmit_[k];dev_queue_xmit_nit_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];dev_hard_start_xmit_[k];loopback_xmit_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];dev_hard_start_xmit_[k];loopback_xmit_[k];netif_rx_[k];netif_rx.part.82_[k];xen_restore_fl_direct_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];dev_hard_start_xmit_[k];loopback_xmit_[k];netif_rx_[k];netif_rx.part.82_[k];xen_restore_fl_direct_end_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];dma_issue_pending_all_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];__inet_lookup_established_[k] 3 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];tcp_v4_do_rcv_[k];tcp_event_data_recv_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];tcp_v4_do_rcv_[k];tcp_rcv_established_[k];sock_def_readable_[k];__wake_up_sync_key_[k];check_events_[k];hypercall_page_[k] 19 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];tcp_v4_do_rcv_[k];tcp_rcv_established_[k];tcp_ack_[k] 3 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];tcp_v4_do_rcv_[k];tcp_rcv_established_[k];tcp_ack_[k];tcp_clean_rtx_queue_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];tcp_v4_do_rcv_[k];tcp_rcv_established_[k];tcp_ack_[k];tcp_clean_rtx_queue_[k];bictcp_acked_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];tcp_v4_do_rcv_[k];tcp_rcv_established_[k];tcp_ack_[k];tcp_clean_rtx_queue_[k];ktime_get_real_[k];getnstimeofday_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];tcp_v4_do_rcv_[k];tcp_rcv_established_[k];tcp_ack_[k];tcp_clean_rtx_queue_[k];ktime_get_real_[k];getnstimeofday_[k];xen_clocksource_get_cycles_[k];xen_clocksource_read_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];tcp_v4_do_rcv_[k];tcp_rcv_established_[k];tcp_ack_[k];tcp_clean_rtx_queue_[k];tcp_rtt_estimator_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_[k];ip_local_deliver_finish_[k];tcp_v4_rcv_[k];tcp_v4_do_rcv_[k];tcp_rcv_established_[k];tcp_ack_[k];tcp_clean_rtx_queue_[k];tcp_valid_rtt_meas_[k];tcp_rtt_estimator_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];__do_softirq_[k];net_rx_action_[k];process_backlog_[k];__netif_receive_skb_[k];ip_rcv_[k];ip_rcv_finish_[k];ip_local_deliver_finish_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];local_bh_enable_[k];do_softirq_[k];call_softirq_[k];rcu_bh_qs_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_local_out_[k];ip_output_[k];ip_finish_output_[k];dev_queue_xmit_[k];netif_skb_features_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ip_queue_xmit_[k];ip_output_[k] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ktime_get_real_[k];getnstimeofday_[k];xen_clocksource_get_cycles_[k];pvclock_clocksource_read_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ktime_get_real_[k];getnstimeofday_[k];xen_clocksource_get_cycles_[k];xen_clocksource_read_[k];pvclock_clocksource_read_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];ktime_get_real_[k];xen_clocksource_get_cycles_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];__tcp_push_pending_frames_[k];tcp_write_xmit_[k];tcp_transmit_skb_[k];skb_dst_set_noref_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];lock_sock_nested_[k];_raw_spin_lock_bh_[k];local_bh_disable_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];sk_stream_alloc_skb_[k];__alloc_skb_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];sk_stream_alloc_skb_[k];__alloc_skb_[k];__kmalloc_node_track_caller_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];sk_stream_alloc_skb_[k];__alloc_skb_[k];__kmalloc_node_track_caller_[k];arch_local_irq_save_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];sk_stream_alloc_skb_[k];__alloc_skb_[k];__phys_addr_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];sk_stream_alloc_skb_[k];__alloc_skb_[k];get_slab_[k] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];sk_stream_alloc_skb_[k];__alloc_skb_[k];kmem_cache_alloc_node_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];sk_stream_alloc_skb_[k];ksize_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];tcp_send_mss_[k];tcp_current_mss_[k];ipv4_mtu_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];tcp_send_mss_[k];tcp_current_mss_[k];tcp_established_options_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];tcp_send_mss_[k];tcp_xmit_size_goal_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];do_sync_write_[k];sock_aio_write_[k];do_sock_write.isra.10_[k];inet_sendmsg_[k];tcp_sendmsg_[k];tcp_xmit_size_goal_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];fsnotify_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];fsnotify_[k];__srcu_read_lock_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];rw_verify_area_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];rw_verify_area_[k];apparmor_file_permission_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];rw_verify_area_[k];security_file_permission_[k];apparmor_file_permission_[k];common_file_perm_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/FileDispatcherImpl:.write0_[j];write;system_call_fastpath_[k];sys_write_[k];vfs_write_[k];sock_aio_write_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.write_[j];sun/nio/ch/SocketChannelImpl:.writerCleanup_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/buffer/PooledUnsafeDirectByteBuf:.readBytes_[j];sun/nio/ch/SocketChannelImpl:.writerCleanup_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/ChannelOutboundHandlerAdapter:.flush_[j];io/netty/channel/AbstractChannelHandlerContext:.flush_[j];io/netty/channel/DefaultChannelPipeline$HeadContext:.flush_[j];io/netty/channel/AbstractChannel$AbstractUnsafe:.flush0_[j];io/netty/channel/nio/AbstractNioByteChannel:.doWrite_[j];io/netty/util/Recycler:.recycle_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j];io/netty/channel/ChannelDuplexHandler:.flush_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelReadComplete_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j];org/vertx/java/core/net/impl/VertxHandler:.channelReadComplete_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/buffer/AbstractReferenceCountedByteBuf:.release_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];java/util/concurrent/ConcurrentHashMap:.get_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/mozilla/javascript/Context:.getWrapFactory_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j] 3 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/ScriptableObject:.getParentScope_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/WrapFactory:.wrapAsJavaObject_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/WrapFactory:.wrapAsJavaObject_[j];java/util/HashMap:.get_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/WrapFactory:.wrap_[j];java/util/HashMap:.get_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.getObjectProp_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.getObjectProp_[j];org/mozilla/javascript/ScriptableObject$RelinkedSlot:.getValue_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.getObjectProp_[j];vtable chunks_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.nameOrFunction_[j];org/mozilla/javascript/ScriptableObject$Slot:.getValue_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.name_[j];org/mozilla/javascript/IdScriptableObject:.get_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.getPropFunctionAndThis_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/IdScriptableObject:.findInstanceIdInfo_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/IdScriptableObject:.has_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/IdScriptableObject:.has_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/IdScriptableObject:.put_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/IdScriptableObject:.setAttributes_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/MemberBox:.invoke_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/WrapFactory:.wrap_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.findFunction_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaObject:.get_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j];org/mozilla/javascript/IdScriptableObject:.get_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j];org/mozilla/javascript/IdScriptableObject:.put_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j];org/mozilla/javascript/ScriptableObject:.createSlot_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j];org/mozilla/javascript/IdScriptableObject:.setAttributes_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.getObjectProp_[j];org/mozilla/javascript/ScriptableObject$Slot:.getValue_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.getPropFunctionAndThis_[j];org/mozilla/javascript/NativeJavaObject:.get_[j];java/util/HashMap:.get_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];jint_disjoint_arraycopy_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/IdScriptableObject:.get_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/IdScriptableObject:.has_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j];org/mozilla/javascript/IdScriptableObject:.put_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j];org/mozilla/javascript/ScriptableObject:.createSlot_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j];org/mozilla/javascript/IdScriptableObject:.setAttributes_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.getObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.get_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.nameOrFunction_[j];org/mozilla/javascript/IdScriptableObject:.get_[j];org/mozilla/javascript/ScriptableObject$RelinkedSlot:.getValue_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.findInstanceIdInfo_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.put_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.put_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j];org/mozilla/javascript/ScriptableObject:.createSlot_[j] 3 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];vtable chunks_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/NativeFunction:.initScriptFunction_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j];org/mozilla/javascript/IdScriptableObject:.get_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.has_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.put_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.put_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j];org/mozilla/javascript/ScriptableObject:.createSlot_[j] 6 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.newObject_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptableObject:.getParentScope_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.has_[j] 4 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.has_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j] 5 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.put_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.put_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.put_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j];org/mozilla/javascript/ScriptableObject:.createSlot_[j] 6 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptableObject:.getPrototype_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptableObject:.getParentScope_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/TopLevel:.getBuiltinPrototype_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/ScriptRuntime:.name_[j];org/mozilla/javascript/ScriptRuntime:.nameOrFunction_[j];vtable chunks_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.has_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j];org/mozilla/javascript/IdScriptableObject:.setAttributes_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.createFunctionActivation_[j];org/mozilla/javascript/TopLevel:.getBuiltinPrototype_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/optimizer/OptRuntime:.call2_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.setObjectProp_[j];org/mozilla/javascript/IdScriptableObject:.put_[j];org/mozilla/javascript/ScriptableObject:.getSlot_[j];org/mozilla/javascript/ScriptableObject:.createSlot_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/ScriptRuntime:.indexFromString_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/ScriptRuntime:.setObjectElem_[j];org/mozilla/javascript/ScriptRuntime:.indexFromString_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];io/netty/handler/codec/http/DefaultHttpHeaders:.set_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j] 3 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/handler/codec/MessageToMessageEncoder:.write_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/handler/codec/MessageToMessageEncoder:.write_[j];io/netty/buffer/AbstractByteBuf:.writeBytes_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/handler/codec/MessageToMessageEncoder:.write_[j];io/netty/handler/codec/http/HttpObjectEncoder:.encode_[j];io/netty/buffer/AbstractByteBuf:.writeBytes_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/handler/codec/MessageToMessageEncoder:.write_[j];io/netty/handler/codec/http/HttpObjectEncoder:.encode_[j];io/netty/buffer/AbstractByteBufAllocator:.directBuffer_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/handler/codec/MessageToMessageEncoder:.write_[j];io/netty/handler/codec/http/HttpObjectEncoder:.encode_[j];io/netty/buffer/AbstractByteBufAllocator:.directBuffer_[j];io/netty/util/concurrent/FastThreadLocal:.get_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/handler/codec/MessageToMessageEncoder:.write_[j];io/netty/handler/codec/http/HttpObjectEncoder:.encode_[j];java/util/ArrayList:.add_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/handler/codec/MessageToMessageEncoder:.write_[j];io/netty/util/internal/RecyclableArrayList:.newInstance_[j];io/netty/util/concurrent/FastThreadLocal:.get_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/handler/codec/MessageToMessageEncoder:.write_[j];java/util/ArrayList:.ensureExplicitCapacity_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];io/netty/handler/codec/MessageToMessageEncoder:.write_[j];vtable chunks_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/channel/AbstractChannelHandlerContext:.write_[j];org/vertx/java/core/http/impl/VertxHttpHandler:.write_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/handler/codec/http/DefaultHttpHeaders:.add0_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];io/netty/handler/codec/http/DefaultHttpHeaders:.set_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/NativeJavaMethod:.call_[j];org/mozilla/javascript/MemberBox:.invoke_[j];sun/reflect/DelegatingMethodAccessorImpl:.invoke_[j];sun/nio/cs/UTF_8$Encoder:._[j];jbyte_disjoint_arraycopy_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];org/vertx/java/core/net/impl/VertxHandler:.channelRead_[j];org/vertx/java/core/http/impl/DefaultHttpServer$ServerHandler:.doMessageReceived_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vhello_js_1:.call_[j];org/mozilla/javascript/gen/file__home_bgregg_testtest_vert_x_2_1_4_sys_mods_io_vertx_lang_js_1_1_0_[j];org/mozilla/javascript/ScriptRuntime:.name_[j];org/mozilla/javascript/ScriptRuntime:.nameOrFunction_[j];org/mozilla/javascript/IdScriptableObject:.get_[j];org/mozilla/javascript/ScriptableObject$RelinkedSlot:.getValue_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/handler/codec/http/HttpObjectDecoder:.decode_[j];io/netty/buffer/AbstractByteBuf:.forEachByteAsc0_[j];io/netty/util/internal/AppendableCharSequence:.append_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/handler/codec/http/HttpObjectDecoder:.decode_[j];io/netty/handler/codec/http/HttpHeaders:.isTransferEncodingChunked_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/handler/codec/http/HttpObjectDecoder:.decode_[j];io/netty/handler/codec/http/HttpObjectDecoder:.findWhitespace_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/handler/codec/http/HttpObjectDecoder:.decode_[j];io/netty/handler/codec/http/HttpObjectDecoder:.readHeaders_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/handler/codec/http/HttpObjectDecoder:.decode_[j];io/netty/handler/codec/http/HttpObjectDecoder:.readHeaders_[j];io/netty/buffer/AbstractByteBuf:.forEachByteAsc0_[j] 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/handler/codec/http/HttpObjectDecoder:.decode_[j];io/netty/handler/codec/http/HttpObjectDecoder:.readHeaders_[j];io/netty/handler/codec/http/HttpHeaders:.hash_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/handler/codec/http/HttpObjectDecoder:.decode_[j];io/netty/handler/codec/http/HttpObjectDecoder:.readHeaders_[j];io/netty/handler/codec/http/HttpObjectDecoder:.splitHeader_[j] 5 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/AbstractChannelHandlerContext:.fireChannelRead_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelRead_[j];io/netty/handler/codec/http/HttpObjectDecoder:.decode_[j];io/netty/handler/codec/http/HttpObjectDecoder:.readHeaders_[j];java/util/Arrays:.fill_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];java/nio/channels/spi/AbstractInterruptibleChannel:.end_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read 2 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;sys_read_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];do_sync_read_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];do_sync_read_[k];sock_aio_read_[k];sock_aio_read.part.13_[k];do_sock_read.isra.12_[k];inet_recvmsg_[k];__kfree_skb_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];do_sync_read_[k];sock_aio_read_[k];sock_aio_read.part.13_[k];do_sock_read.isra.12_[k];inet_recvmsg_[k];tcp_rcv_space_adjust_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];do_sync_read_[k];sock_aio_read_[k];sock_aio_read.part.13_[k];do_sock_read.isra.12_[k];inet_recvmsg_[k];tcp_recvmsg_[k];__kfree_skb_[k];skb_release_data_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];do_sync_read_[k];sock_aio_read_[k];sock_aio_read.part.13_[k];do_sock_read.isra.12_[k];inet_recvmsg_[k];tcp_recvmsg_[k];__kfree_skb_[k];skb_release_head_state_[k];dst_release_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];do_sync_read_[k];sock_aio_read_[k];sock_aio_read.part.13_[k];do_sock_read.isra.12_[k];inet_recvmsg_[k];tcp_recvmsg_[k];_raw_spin_lock_bh_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];do_sync_read_[k];sock_aio_read_[k];sock_aio_read.part.13_[k];do_sock_read.isra.12_[k];inet_recvmsg_[k];tcp_recvmsg_[k];skb_copy_datagram_iovec_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];do_sync_read_[k];sock_aio_read_[k];sock_aio_read.part.13_[k];do_sock_read.isra.12_[k];inet_recvmsg_[k];tcp_recvmsg_[k];skb_copy_datagram_iovec_[k];copy_user_enhanced_fast_string_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];do_sync_read_[k];sock_aio_read_[k];sock_aio_read.part.13_[k];do_sock_read.isra.12_[k];inet_recvmsg_[k];tcp_recvmsg_[k];tcp_cleanup_rbuf_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];do_sync_read_[k];sock_aio_read_[k];sock_aio_read.part.13_[k];do_sock_read.isra.12_[k];inet_recvmsg_[k];tcp_recvmsg_[k];tcp_cleanup_rbuf_[k];__tcp_select_window_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j];sun/nio/ch/SocketChannelImpl:.read_[j];sun/nio/ch/FileDispatcherImpl:.read0_[j];read;system_call_fastpath_[k];sys_read_[k];vfs_read_[k];rw_verify_area_[k] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/nio/AbstractNioByteChannel$NioByteUnsafe:.read_[j];io/netty/handler/codec/ByteToMessageDecoder:.channelReadComplete_[j] 1 +java;start_thread;java_start;JavaThread::run;JavaThread::thread_main_inner;thread_entry;JavaCalls::call_virtual;JavaCalls::call_virtual;JavaCalls::call_helper;call_stub_[j];Interpreter_[j];Interpreter_[j];io/netty/channel/nio/NioEventLoop:.run_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeys_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKeysOptimized_[j];io/netty/channel/nio/NioEventLoop:.processSelectedKey_[j];io/netty/channel/socket/nio/NioSocketChannel:.doReadBytes_[j] 1 +java;start_thread;java_start;VMThread::run;VMThread::loop;VMThread::evaluate_operation;VM_Operation::evaluate;VM_ParallelGCFailedAllocation::doit;ParallelScavengeHeap::failed_mem_allocate;PSScavenge::invoke;PSScavenge::invoke_no_policy;PSIsAliveClosure::do_object_b 1 +java;start_thread;java_start;VMThread::run;VMThread::loop;VMThread::evaluate_operation;VM_Operation::evaluate;VM_ParallelGCFailedAllocation::doit;ParallelScavengeHeap::failed_mem_allocate;PSScavenge::invoke;PSScavenge::invoke_no_policy;StringTable::unlink_or_oops_do 2 +java;start_thread;java_start;VMThread::run;VMThread::loop;VMThread::evaluate_operation;VM_Operation::evaluate;VM_ParallelGCFailedAllocation::doit;ParallelScavengeHeap::failed_mem_allocate;PSScavenge::invoke;PSScavenge::invoke_no_policy;pthread_cond_signal@@GLIBC_2.3.2;system_call_fastpath_[k];sys_futex_[k];do_futex_[k];futex_wake_op_[k] 1 +java;write;check_events_[k];hypercall_page_[k] 3 diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/release.txt b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/release.txt new file mode 100644 index 0000000000000000000000000000000000000000..b465301e73430b413e07fc382dc5f73be86c7769 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/release.txt @@ -0,0 +1,3 @@ +speedscope@1.5.3 +Thu Jan 16 00:10:56 PST 2020 +707462e9cffec2bda49587c39d621ba89d1b51cb diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/reset.7ae984ff.css b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/reset.7ae984ff.css new file mode 100644 index 0000000000000000000000000000000000000000..f73b094c15be95c0c8c38e6ef4b579e02d8ac40d --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/reset.7ae984ff.css @@ -0,0 +1 @@ +a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{overflow:hidden}body,html{height:100%}body{overflow:auto} \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/speedscope.75eb7d8e.js b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/speedscope.75eb7d8e.js new file mode 100644 index 0000000000000000000000000000000000000000..97c9f10f32ffdbb65e990026b55e12d18392f8a0 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/speedscope-1.5.3/speedscope.75eb7d8e.js @@ -0,0 +1,173 @@ +parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f2;)n.push(arguments[s]);for(i&&null!=i.children&&(n.length||n.push(i.children),delete i.children);n.length;)if((a=n.pop())&&void 0!==a.pop)for(s=a.length;s--;)n.push(a[s]);else"boolean"==typeof a&&(a=null),(p="function"!=typeof r)&&(null==a?a="":"number"==typeof a?a=String(a):"string"!=typeof a&&(p=!1)),p&&l?c[c.length-1]+=a:c===o?c=[a]:c.push(a),l=p;var u=new e;return u.nodeName=r,u.children=c,u.attributes=null==i?void 0:i,u.key=null==i?void 0:i.key,void 0!==t.vnode&&t.vnode(u),u}function i(e,t){for(var n in t)e[n]=t[n];return e}var l="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function a(e,t){return r(e.nodeName,i(i({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}var p=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,s=[];function c(e){!e._dirty&&(e._dirty=!0)&&1==s.push(e)&&(t.debounceRendering||l)(u)}function u(){var e,t=s;for(s=[];e=t.pop();)e._dirty&&A(e)}function f(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&d(e,t.nodeName):n||e._componentConstructor===t.nodeName}function d(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function _(e){var t=i({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function v(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n,o,r){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||r)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var i in n)i in o||(e.style[i]="");for(var i in o)e.style[i]="number"==typeof o[i]&&!1===p.test(i)?o[i]+"px":o[i]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var l=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,y,l):e.removeEventListener(t,y,l),(e._listeners||(e._listeners={}))[t]=o}else if("list"!==t&&"type"!==t&&!r&&t in e)b(e,t,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(t);else{var a=r&&t!==(t=t.replace(/^xlink\:?/,""));null==o||!1===o?a?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(a?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function b(e,t,n){try{e[t]=n}catch(e){}}function y(e){return this._listeners[e.type](t.event&&t.event(e)||e)}var x=[],C=0,g=!1,N=!1;function k(){for(var e;e=x.pop();)t.afterMount&&t.afterMount(e),e.componentDidMount&&e.componentDidMount()}function w(e,t,n,o,r,i){C++||(g=null!=r&&void 0!==r.ownerSVGElement,N=null!=e&&!("__preactattr_"in e));var l=S(e,t,n,o,i);return r&&l.parentNode!==r&&r.appendChild(l),--C||(N=!1,i||k()),l}function S(e,t,n,o,r){var i=e,l=g;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),L(e,!0))),i.__preactattr_=!0,i;var a=t.nodeName;if("function"==typeof a)return D(e,t,n,o);if(g="svg"===a||"foreignObject"!==a&&g,a=String(a),(!e||!d(e,a))&&(i=v(a,g),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),L(e,!0)}var p=i.firstChild,s=i.__preactattr_,c=t.children;if(null==s){s=i.__preactattr_={};for(var u=i.attributes,f=u.length;f--;)s[u[f].name]=u[f].value}return!N&&c&&1===c.length&&"string"==typeof c[0]&&null!=p&&void 0!==p.splitText&&null==p.nextSibling?p.nodeValue!=c[0]&&(p.nodeValue=c[0]):(c&&c.length||null!=p)&&U(i,c,n,o,N||null!=s.dangerouslySetInnerHTML),P(i,t.attributes,s),g=l,i}function U(e,t,n,o,r){var i,l,a,p,s,c=e.childNodes,u=[],d={},_=0,v=0,h=c.length,b=0,y=t?t.length:0;if(0!==h)for(var x=0;x0?"Unexpected "+(c.length>1?"keys":"key")+' "'+c.join('", "')+'" found in '+a+'. Expected to find one of the known reducer keys instead: "'+i.join('", "')+'". Unexpected keys will be ignored.':void 0}function f(e){Object.keys(e).forEach(function(t){var r=e[t];if(void 0===r(void 0,{type:n.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+n.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}function l(e){for(var t=Object.keys(e),r={},n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(u)throw u;for(var n=!1,o={},a=0;a=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},h=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},b=!1;function y(){b||(b=!0,p(" does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions."))}function v(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",o=arguments[1]||n+"Subscription",i=function(t){function e(r,o){a(this,e);var i=h(this,t.call(this,r,o));return i[n]=r.store,i}return f(e,t),e.prototype.getChildContext=function(){var t;return(t={})[n]=this[n],t[o]=null,t},e.prototype.render=function(){return r.only(this.props.children)},e}(e.Component);return i.prototype.componentWillReceiveProps=function(t){this[n]!==t.store&&y()},i.childContextTypes=((t={})[n]=u.isRequired,t[o]=s,t),i}var m=v(),P={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},O={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},S=Object.defineProperty,g=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,C=Object.getOwnPropertyDescriptor,j=Object.getPrototypeOf,T=j&&j(Object);function x(t,e,n){if("string"!=typeof e){if(T){var r=j(e);r&&r!==T&&x(t,r,n)}var o=g(e);w&&(o=o.concat(w(e)));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{},i=o.getDisplayName,p=void 0===i?function(t){return"ConnectAdvanced("+t+")"}:i,c=o.methodName,b=void 0===c?"connectAdvanced":c,y=o.renderCountProp,v=void 0===y?void 0:y,m=o.shouldHandleStateChanges,P=void 0===m||m,O=o.storeKey,S=void 0===O?"store":O,g=o.withRef,w=void 0!==g&&g,C=l(o,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),j=S+"Subscription",T=R++,x=((n={})[S]=u,n[j]=s,n),E=((r={})[j]=s,r);return function(n){q("function"==typeof n,"You must pass a component to the function returned by "+b+". Instead received "+JSON.stringify(n));var r=n.displayName||n.name||"Component",o=p(r),i=d({},C,{getDisplayName:p,methodName:b,renderCountProp:v,shouldHandleStateChanges:P,storeKey:S,withRef:w,displayName:o,wrappedComponentName:r,WrappedComponent:n}),s=function(r){function s(t,e){a(this,s);var n=h(this,r.call(this,t,e));return n.version=T,n.state={},n.renderCount=0,n.store=t[S]||e[S],n.propsMode=Boolean(t[S]),n.setWrappedInstance=n.setWrappedInstance.bind(n),q(n.store,'Could not find "'+S+'" in either the context or props of "'+o+'". Either wrap the root component in a , or explicitly pass "'+S+'" as a prop to "'+o+'".'),n.initSelector(),n.initSubscription(),n}return f(s,r),s.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return(t={})[j]=e||this.context[j],t},s.prototype.componentDidMount=function(){P&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},s.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},s.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},s.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=W,this.store=null,this.selector.run=W,this.selector.shouldComponentUpdate=!1},s.prototype.getWrappedInstance=function(){return q(w,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+b+"() call."),this.wrappedInstance},s.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},s.prototype.initSelector=function(){var e=t(this.store.dispatch,i);this.selector=F(e,this.store),this.selector.run(this.props)},s.prototype.initSubscription=function(){if(P){var t=(this.propsMode?this.props:this.context)[j];this.subscription=new M(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},s.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(I)):this.notifyNestedSubs()},s.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},s.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},s.prototype.addExtraProps=function(t){if(!(w||v||this.propsMode&&this.subscription))return t;var e=d({},t);return w&&(e.ref=this.setWrappedInstance),v&&(e[v]=this.renderCount++),this.propsMode&&this.subscription&&(e[j]=this.subscription),e},s.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return(0,e.h)(n,this.addExtraProps(t.props))},s}(e.Component);return s.WrappedComponent=n,s.displayName=o,s.childContextTypes=E,s.contextTypes=x,s.prototype.componentWillUpdate=function(){var t=this;if(this.version!==T){this.version=T,this.initSelector();var e=[];this.subscription&&(e=this.subscription.listeners.get(),this.subscription.tryUnsubscribe()),this.initSubscription(),P&&(this.subscription.trySubscribe(),e.forEach(function(e){return t.subscription.listeners.subscribe(e)}))}},N(s,n)}}var _=Object.prototype.hasOwnProperty;function B(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function H(t,e){if(B(t,e))return!0;if("object"!==(void 0===t?"undefined":c(t))||null===t||"object"!==(void 0===e?"undefined":c(e))||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o=0;r--){var o=e[r](t);if(o)return o}return function(e,r){throw new Error("Invalid value of type "+(void 0===t?"undefined":c(t))+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Wt(t,e){return t===e}function Ft(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?A:e,r=t.mapStateToPropsFactories,o=void 0===r?Ct:r,i=t.mapDispatchToPropsFactories,s=void 0===i?St:i,u=t.mergePropsFactories,p=void 0===u?qt:u,c=t.selectorFactory,a=void 0===c?Rt:c;return function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=i.pure,c=void 0===u||u,f=i.areStatesEqual,h=void 0===f?Wt:f,b=i.areOwnPropsEqual,y=void 0===b?H:b,v=i.areStatePropsEqual,m=void 0===v?H:v,P=i.areMergedPropsEqual,O=void 0===P?H:P,S=l(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),g=It(t,o,"mapStateToProps"),w=It(e,s,"mapDispatchToProps"),C=It(r,p,"mergeProps");return n(a,d({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:g,initMapDispatchToProps:w,initMergeProps:C,pure:c,areStatesEqual:h,areOwnPropsEqual:y,areStatePropsEqual:m,areMergedPropsEqual:O},S))}}var At=Ft(),_t={Provider:m,connect:At,connectAdvanced:A};exports.Provider=m,exports.connect=At,exports.connectAdvanced=A,exports.default=_t; +},{"preact":24,"redux":31}],36:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StatelessComponent=void 0,exports.actionCreator=n,exports.setter=o,exports.createContainer=s,exports.bindActionCreator=c;var e=require("preact-redux"),t=require("preact");const r=new Set;function n(e){if(r.has(e))throw new Error(`Cannot re-use action type name: ${e}`);const t=(t={})=>({type:e,payload:t});return t.matches=(t=>t.type===e),t}function o(e,t){return(r=t,n)=>e.matches(n)?n.payload:r}function s(t,r){return(0,e.connect)(e=>e,e=>({dispatch:e}),(e,t,n)=>r(e,t.dispatch,n))(t)}class a extends t.Component{}function c(e,t){return r=>{e(t(r))}}exports.StatelessComponent=a; +},{"preact-redux":26,"preact":24}],102:[function(require,module,exports) { +"use strict";function t(t,i,s){return ts?s:t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.clamp=t;class i{constructor(t,i){this.x=t,this.y=i}withX(t){return new i(t,this.y)}withY(t){return new i(this.x,t)}plus(t){return new i(this.x+t.x,this.y+t.y)}minus(t){return new i(this.x-t.x,this.y-t.y)}times(t){return new i(this.x*t,this.y*t)}timesPointwise(t){return new i(this.x*t.x,this.y*t.y)}dividedByPointwise(t){return new i(this.x/t.x,this.y/t.y)}dot(t){return this.x*t.x+this.y*t.y}equals(t){return this.x===t.x&&this.y===t.y}approxEquals(t,i=1e-9){return Math.abs(this.x-t.x){if(t.actions.flamechart.setHoveredNode.matches(a)&&r(a)){const{hover:t}=a.payload.args;return Object.assign({},e,{hover:t})}if(t.actions.flamechart.setSelectedNode.matches(a)&&r(a)){const{selectedNode:t}=a.payload.args;return Object.assign({},e,{selectedNode:t})}if(t.actions.flamechart.setConfigSpaceViewportRect.matches(a)&&r(a)){const{configSpaceViewportRect:t}=a.payload.args;return Object.assign({},e,{configSpaceViewportRect:t})}if(t.actions.flamechart.setLogicalSpaceViewportSize.matches(a)&&r(a)){const{logicalSpaceViewportSize:t}=a.payload.args;return Object.assign({},e,{logicalSpaceViewportSize:t})}return t.actions.setViewMode.matches(a)?Object.assign({},e,{hover:null}):e}}!function(e){e.LEFT_HEAVY="LEFT_HEAVY",e.CHRONO="CHRONO",e.SANDWICH_INVERTED_CALLERS="SANDWICH_INVERTED_CALLERS",e.SANDWICH_CALLEES="SANDWICH_CALLEES"}(a||(exports.FlamechartID=a={})); +},{"../lib/math":102,"./actions":40}],100:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createSandwichView=l;var e=require("./flamechart-view-state"),a=require("./actions");function l(l){const r=(0,e.createFlamechartViewStateReducer)(e.FlamechartID.SANDWICH_CALLEES,l),t=(0,e.createFlamechartViewStateReducer)(e.FlamechartID.SANDWICH_INVERTED_CALLERS,l);return(e={callerCallee:null},c)=>{if(a.actions.sandwichView.setSelectedFrame.matches(c)&&function(e){const{payload:a}=e;return a.profileIndex===l}(c))return null==c.payload.args?Object.assign({},e,{callerCallee:null}):Object.assign({},e,{callerCallee:{selectedFrame:c.payload.args,calleeFlamegraph:r(void 0,c),invertedCallerFlamegraph:t(void 0,c)}});const{callerCallee:n}=e;if(n){const{calleeFlamegraph:a,invertedCallerFlamegraph:l}=n,i=r(a,c),s=t(l,c);return i===a&&s===l?e:Object.assign({},e,{callerCallee:Object.assign({},n,{calleeFlamegraph:i,invertedCallerFlamegraph:s})})}return e}} +},{"./flamechart-view-state":98,"./actions":40}],70:[function(require,module,exports) { +"use strict";function t(t){return t[t.length-1]||null}function e(t,e){t.sort(function(t,r){return e(t)99?e=">99%":t<.01?e="<0.01%":t<1?e=`${t.toFixed(2)}%`:t<10&&(e=`${t.toFixed(1)}%`),e}function f(t){return t-Math.floor(t)}function h(t){return 2*Math.abs(f(t)-.5)-1}function g(t,e,r,n,o=1){for(console.assert(!isNaN(o)&&!isNaN(n));;){if(e-t<=o)return[t,e];const s=(e+t)/2;r(s){let n;return null==e?(n=t(r),e={args:r,result:n},n):x(e.args,r)?e.result:(e.args=r,e.result=t(r),e.result)}}function y(t){let e=null;return r=>{let n;return null==e?(n=t(r),e={args:r,result:n},n):e.args===r?e.result:(e.args=r,e.result=t(r),e.result)}}function w(t){let e=null;return()=>(null==e&&(e={result:t()}),e.result)}exports.KeyedSet=s;const E=w(()=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Map;for(let r=0;r>4,"="!==u&&(o[s++]=(15&c)<<4|f>>2),"="!==a&&(o[s++]=(7&f)<<6|h)}if(s!==n)throw new Error(`Expected to decode ${n} bytes, but only decoded ${s})`);return o} +},{}],52:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.profileGroup=void 0,exports.actionCreatorWithIndex=n;var e=require("./flamechart-view-state"),t=require("./sandwich-view-state"),i=require("../lib/typed-redux"),r=require("./actions"),a=require("../lib/math"),o=require("../lib/utils");function n(e){return(0,i.actionCreator)(e)}function l(i,r){const a=(0,e.createFlamechartViewStateReducer)(e.FlamechartID.CHRONO,r),n=(0,e.createFlamechartViewStateReducer)(e.FlamechartID.LEFT_HEAVY,r),l=(0,t.createSandwichView)(r);return(e,t)=>{if(void 0===e)return{profile:i,chronoViewState:a(void 0,t),leftHeavyViewState:n(void 0,t),sandwichViewState:l(void 0,t)};const r={profile:i,chronoViewState:a(e.chronoViewState,t),leftHeavyViewState:n(e.leftHeavyViewState,t),sandwichViewState:l(e.sandwichViewState,t)};return(0,o.objectsHaveShallowEquality)(e,r)?e:r}}const c=exports.profileGroup=((e=null,t)=>{if(r.actions.setProfileGroup.matches(t)){const{indexToView:e,profiles:i,name:r}=t.payload;return{indexToView:e,name:r,profiles:i.map((e,i)=>l(e,i)(void 0,t))}}if(null!=e){const{indexToView:n,profiles:c}=e,s=(0,a.clamp)((0,i.setter)(r.actions.setProfileIndexToView,0)(n,t),0,c.length-1),u=c.map((e,i)=>l(e.profile,i)(e,t));return n===s&&(0,o.objectsHaveShallowEquality)(c,u)?e:Object.assign({},e,{indexToView:s,profiles:u})}return e}); +},{"./flamechart-view-state":98,"./sandwich-view-state":100,"../lib/typed-redux":36,"./actions":40,"../lib/math":102,"../lib/utils":70}],40:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.actions=void 0;var e=require("../lib/typed-redux"),t=require("./profiles-state"),a=exports.actions=void 0;!function(a){let o,r;a.setProfileGroup=(0,e.actionCreator)("setProfileGroup"),a.setProfileIndexToView=(0,e.actionCreator)("setProfileIndexToView"),a.setGLCanvas=(0,e.actionCreator)("setGLCanvas"),a.setViewMode=(0,e.actionCreator)("setViewMode"),a.setFlattenRecursion=(0,e.actionCreator)("setFlattenRecursion"),a.setDragActive=(0,e.actionCreator)("setDragActive"),a.setLoading=(0,e.actionCreator)("setLoading"),a.setError=(0,e.actionCreator)("setError"),a.setHashParams=(0,e.actionCreator)("setHashParams"),function(a){a.setTableSortMethod=(0,e.actionCreator)("sandwichView.setTableSortMethod"),a.setSelectedFrame=(0,t.actionCreatorWithIndex)("sandwichView.setSelectedFarmr")}(o=a.sandwichView||(a.sandwichView={})),function(e){e.setHoveredNode=(0,t.actionCreatorWithIndex)("flamechart.setHoveredNode"),e.setSelectedNode=(0,t.actionCreatorWithIndex)("flamechart.setSelectedNode"),e.setConfigSpaceViewportRect=(0,t.actionCreatorWithIndex)("flamechart.setConfigSpaceViewportRect"),e.setLogicalSpaceViewportSize=(0,t.actionCreatorWithIndex)("flamechart.setLogicalSpaceViewportSpace")}(r=a.flamechart||(a.flamechart={}))}(a||(exports.actions=a={})); +},{"../lib/typed-redux":36,"./profiles-state":52}],50:[function(require,module,exports) { +"use strict";function t(t=window.location.hash){try{if(!t.startsWith("#"))return{};const e=t.substr(1).split("&"),r={};for(const t of e){let[e,o]=t.split("=");o=decodeURIComponent(o),"profileURL"===e?r.profileURL=o:"title"===e?r.title=o:"localProfilePath"===e&&(r.localProfilePath=o)}return r}catch(t){return console.error("Error when loading hash fragment."),console.error(t),{}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getHashParams=t; +},{}],158:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;var e=/-webkit-|-moz-|-ms-/;function t(t){return"string"==typeof t&&e.test(t)}module.exports=exports.default; +},{}],123:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var u=["-webkit-","-moz-",""];function i(e,r){if("string"==typeof r&&!(0,t.default)(r)&&r.indexOf("calc(")>-1)return u.map(function(e){return r.replace(/calc\(/g,e+"calc(")})}module.exports=exports.default; +},{"css-in-js-utils/lib/isPrefixedValue":158}],124:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("css-in-js-utils/lib/isPrefixedValue"),r=t(e);function t(e){return e&&e.__esModule?e:{default:e}}var s=["-webkit-",""];function u(e,t){if("string"==typeof t&&!(0,r.default)(t)&&t.indexOf("cross-fade(")>-1)return s.map(function(e){return t.replace(/cross-fade\(/g,e+"cross-fade(")})}module.exports=exports.default; +},{"css-in-js-utils/lib/isPrefixedValue":158}],125:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o;var e=["-webkit-","-moz-",""],r={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function o(o,t){if("cursor"===o&&r.hasOwnProperty(t))return e.map(function(e){return e+t})}module.exports=exports.default; +},{}],126:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var i=["-webkit-",""];function u(e,r){if("string"==typeof r&&!(0,t.default)(r)&&r.indexOf("filter(")>-1)return i.map(function(e){return r.replace(/filter\(/g,e+"filter(")})}module.exports=exports.default; +},{"css-in-js-utils/lib/isPrefixedValue":158}],127:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function i(i,l){if("display"===i&&e.hasOwnProperty(l))return e[l]}module.exports=exports.default; +},{}],128:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s;var e={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},t={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function s(s,l,r){t.hasOwnProperty(s)&&(r[t[s]]=e[l]||l)}module.exports=exports.default; +},{}],129:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},t={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};function i(i,r,o){"flexDirection"===i&&"string"==typeof r&&(r.indexOf("column")>-1?o.WebkitBoxOrient="vertical":o.WebkitBoxOrient="horizontal",r.indexOf("reverse")>-1?o.WebkitBoxDirection="reverse":o.WebkitBoxDirection="normal"),t.hasOwnProperty(i)&&(o[t[i]]=e[r]||r)}module.exports=exports.default; +},{}],130:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var i=["-webkit-","-moz-",""],a=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;function n(e,r){if("string"==typeof r&&!(0,t.default)(r)&&a.test(r))return i.map(function(e){return e+r})}module.exports=exports.default; +},{"css-in-js-utils/lib/isPrefixedValue":158}],131:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var i=["-webkit-",""];function u(e,r){if("string"==typeof r&&!(0,t.default)(r)&&r.indexOf("image-set(")>-1)return i.map(function(e){return r.replace(/image-set\(/g,e+"image-set(")})}module.exports=exports.default; +},{"css-in-js-utils/lib/isPrefixedValue":158}],132:[function(require,module,exports) { +"use strict";function e(e,t){if("position"===e&&"sticky"===t)return["-webkit-sticky","sticky"]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default; +},{}],133:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var t=["-webkit-","-moz-",""],e={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},n={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function i(i,o){if(e.hasOwnProperty(i)&&n.hasOwnProperty(o))return t.map(function(t){return t+o})}module.exports=exports.default; +},{}],181:[function(require,module,exports) { +"use strict";var e=/[A-Z]/g,r=/^ms-/,s={};function t(t){return t in s?s[t]:s[t]=t.replace(e,"-$&").toLowerCase().replace(r,"-ms-")}module.exports=t; +},{}],165:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("hyphenate-style-name"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}function u(e){return(0,t.default)(e)}module.exports=exports.default; +},{"hyphenate-style-name":181}],164:[function(require,module,exports) { +"use strict";function e(e){return e.charAt(0).toUpperCase()+e.slice(1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default; +},{}],134:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=l;var t=require("css-in-js-utils/lib/hyphenateProperty"),e=s(t),r=require("css-in-js-utils/lib/isPrefixedValue"),i=s(r),n=require("../../utils/capitalizeString"),o=s(n);function s(t){return t&&t.__esModule?t:{default:t}}var u={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},a={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function f(t,r){if((0,i.default)(t))return t;for(var n=t.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,s=n.length;o-1&&"order"!==p)for(var d=r[l],c=0,b=d.length;c-1)return s;var a=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(t){return!/-webkit-|-ms-/.test(t)}).join(",");return t.indexOf("Moz")>-1?a:(r["Webkit"+(0,o.default)(t)]=s,r["Moz"+(0,o.default)(t)]=a,n)}}module.exports=exports.default; +},{"css-in-js-utils/lib/hyphenateProperty":165,"css-in-js-utils/lib/isPrefixedValue":158,"../../utils/capitalizeString":164}],144:[function(require,module,exports) { +"use strict";function r(r){for(var t=5381,e=r.length;e;)t=33*t^r.charCodeAt(--e);return t>>>0}module.exports=r; +},{}],168:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("./capitalizeString"),r=t(e);function t(e){return e&&e.__esModule?e:{default:e}}function u(e,t,u){if(e.hasOwnProperty(t)){for(var o={},a=e[t],n=(0,r.default)(t),f=Object.keys(u),l=0;l0&&(i[s]=d)}else{var x=(0,u.default)(l,s,n,i,t);x&&(i[s]=x),i=(0,r.default)(t,s,i)}}return i}}module.exports=exports.default; +},{"../utils/prefixProperty":168,"../utils/prefixValue":169,"../utils/addNewValuesOnly":170,"../utils/isObject":171}],166:[function(require,module,exports) { +var global = arguments[3]; +var e=arguments[3];function t(e){r.length||(n(),a=!0),r[r.length]=e}module.exports=t;var n,r=[],a=!1,o=0,u=1024;function l(){for(;ou){for(var t=0,n=r.length-o;t4&&void 0!==arguments[4]?arguments[4]:[];if(!pe[e]){var o=ne(t,r,i,ye,n);he(e,o)}},Se=function(){de=[],pe={},me=!1,fe=null},ve=function(){return de},xe=function(){if(me)throw new Error("Cannot buffer while already buffering");me=!0},be=function(){me=!1;var e=de;return de=[],e},ke=function(){return be().join("")},Oe=function(){var e=be();e.length>0&&ce(e)},we=function(){return Object.keys(pe)},Ae=function(e){e.forEach(function(e){pe[e]=!0})},Ce=function e(t,r,n,i){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:[];Ae(e)}}()},Me="undefined"!=typeof window?null:{renderStatic:function(){return function(e){return Se(),xe(),{html:e(),css:{content:ke(),renderedClassNames:we()}}}}()},qe=null;function Fe(e,t){return{StyleSheet:Object.assign({},Re,{extend:function(){return function(r){var n=r.map(function(e){return e.selectorHandler}).filter(function(e){return e});return Fe(e,t.concat(n))}}()}),StyleSheetServer:Me,StyleSheetTestUtils:qe,minify:function(){return function(e){Ie=e?V:Te}}(),css:function(){return function(){for(var r=arguments.length,n=Array(r),i=0;i{this.viewport=e||null}),this.pendingScroll=0,this.onWindowResize=(()=>{this.recomputeVisibleIndices(this.props)}),this.onViewportScroll=(e=>{this.recomputeVisibleIndices(this.props)}),this.state={firstVisibleIndex:null,lastVisibleIndex:null,invisiblePrefixSize:null,viewportSize:null,cachedTotalSize:e.items.reduce((e,i)=>e+i.size,0)}}recomputeVisibleIndices(e){if(!this.viewport)return;const{items:i}=e,t=this.viewport.getBoundingClientRect().height,s=this.viewport.scrollTop-t/4,o=this.viewport.scrollTop+t+t/4;let l=0,r=0,n=0;for(;n=s)break}const p=n;for(;n=o)break}const c=Math.min(n,i.length-1);this.setState({invisiblePrefixSize:r,firstVisibleIndex:p,lastVisibleIndex:c})}scrollIndexIntoView(e){this.pendingScroll=this.props.items.reduce((i,t,s)=>s>=e?i:i+t.size,0)}applyPendingScroll(){if(!this.viewport)return;const e="y"===this.props.axis?"top":"left";this.viewport.scrollTo({[e]:this.pendingScroll})}componentWillReceiveProps(e){this.props.items!==e.items&&this.recomputeVisibleIndices(e)}componentDidMount(){this.applyPendingScroll(),this.recomputeVisibleIndices(this.props),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){window.removeEventListener("resize",this.onWindowResize)}render(){const{cachedTotalSize:i,firstVisibleIndex:t,lastVisibleIndex:s,invisiblePrefixSize:o}=this.state;return(0,e.h)("div",{className:this.props.className,ref:this.viewportRef,onScroll:this.onViewportScroll},(0,e.h)("div",{style:{height:i}},(0,e.h)("div",{style:{transform:`translateY(${o}px)`}},null!=t&&null!=s&&this.props.renderItems(t,s))))}}exports.ScrollableListView=i; +},{"preact":24}],117:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class t{constructor(t){this.data=t,this.prev=null,this.next=null}}class e{constructor(){this.head=null,this.tail=null,this.size=0}getHead(){return this.head}getTail(){return this.tail}getSize(){return this.size}append(t){this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this.size++}prepend(t){return this.head?(this.head.prev=t,t.next=this.head,this.head=t):this.head=this.tail=t,this.size++,t}pop(){if(this.tail){const t=this.tail;return t.prev?(this.tail=t.prev,this.tail.next=null):this.head=this.tail=null,this.size--,t.prev=null,t}return null}dequeue(){if(this.head){const t=this.head;return t.next?(this.head=t.next,this.head.prev=null):this.head=this.tail=null,this.size--,t.next=null,t}return null}remove(t){null==t.prev?this.dequeue():null==t.next?this.pop():(t.next.prev=t.prev,t.prev.next=t.next,t.next=null,t.prev=null,this.size--)}}exports.List=e;class i{constructor(t){this.capacity=t,this.list=new e,this.map=new Map}has(t){return this.map.has(t)}get(t){const e=this.map.get(t);return e?(this.list.remove(e.listNode),this.list.prepend(e.listNode),e?e.value:null):null}getSize(){return this.list.getSize()}getCapacity(){return this.capacity}insert(e,i){const s=this.map.get(e);for(s&&this.list.remove(s.listNode);this.list.getSize()>=this.capacity;)this.map.delete(this.list.pop().data);const h=this.list.prepend(new t(e));this.map.set(e,{value:i,listNode:h})}getOrInsert(t,e){let i=this.get(t);return null==i&&(i=e(t),this.insert(t,i)),i}removeLRU(){const t=this.list.pop();if(!t)return null;const e=t.data,i=this.map.get(e).value;return this.map.delete(e),[e,i]}clear(){this.list=new e,this.map=new Map}}exports.LRUCache=i; +},{}],96:[function(require,module,exports) { + +var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(t){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a1)for(var n=1;n=0&&e<=31),t.TEXTURE0+e}var h=exports.Graphics=void 0;!function(t){t.Rect=class{constructor(t=0,e=0,i=0,r=0){this.x=t,this.y=e,this.width=i,this.height=r}set(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}equals(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}};class e{constructor(t,e,i,r){this.redF=t,this.greenF=e,this.blueF=i,this.alphaF=r}}let i,r,s,n,h;e.TRANSPARENT=new e(0,0,0,0),t.Color=e,function(t){t[t.ZERO=0]="ZERO",t[t.ONE=1]="ONE",t[t.SOURCE_COLOR=2]="SOURCE_COLOR",t[t.TARGET_COLOR=3]="TARGET_COLOR",t[t.INVERSE_SOURCE_COLOR=4]="INVERSE_SOURCE_COLOR",t[t.INVERSE_TARGET_COLOR=5]="INVERSE_TARGET_COLOR",t[t.SOURCE_ALPHA=6]="SOURCE_ALPHA",t[t.TARGET_ALPHA=7]="TARGET_ALPHA",t[t.INVERSE_SOURCE_ALPHA=8]="INVERSE_SOURCE_ALPHA",t[t.INVERSE_TARGET_ALPHA=9]="INVERSE_TARGET_ALPHA",t[t.CONSTANT=10]="CONSTANT",t[t.INVERSE_CONSTANT=11]="INVERSE_CONSTANT"}(i=t.BlendOperation||(t.BlendOperation={})),function(t){t[t.TRIANGLES=0]="TRIANGLES",t[t.TRIANGLE_STRIP=1]="TRIANGLE_STRIP"}(r=t.Primitive||(t.Primitive={}));function a(t){return t==s.FLOAT?4:1}t.Context=class{setCopyBlendState(){this.setBlendState(i.ONE,i.ZERO)}setAddBlendState(){this.setBlendState(i.ONE,i.ONE)}setPremultipliedBlendState(){this.setBlendState(i.ONE,i.INVERSE_SOURCE_ALPHA)}setUnpremultipliedBlendState(){this.setBlendState(i.SOURCE_ALPHA,i.INVERSE_SOURCE_ALPHA)}},function(t){t[t.FLOAT=0]="FLOAT",t[t.BYTE=1]="BYTE"}(s=t.AttributeType||(t.AttributeType={})),t.attributeByteLength=a;class _{constructor(t,e,i,r){this.name=t,this.type=e,this.count=i,this.byteOffset=r}}t.Attribute=_;t.VertexFormat=class{constructor(){this._attributes=[],this._stride=0}get attributes(){return this._attributes}get stride(){return this._stride}add(t,e,i){return this.attributes.push(new _(t,e,i,this.stride)),this._stride+=i*a(e),this}};t.VertexBuffer=class{uploadFloat32Array(t){this.upload(new Uint8Array(t.buffer),0)}uploadFloats(t){this.uploadFloat32Array(new Float32Array(t))}},function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(n=t.PixelFilter||(t.PixelFilter={})),function(t){t[t.REPEAT=0]="REPEAT",t[t.CLAMP=1]="CLAMP"}(h=t.PixelWrap||(t.PixelWrap={}));class o{constructor(t,e,i){this.minFilter=t,this.magFilter=e,this.wrap=i}}o.LINEAR_CLAMP=new o(n.LINEAR,n.LINEAR,h.CLAMP),o.LINEAR_MIN_NEAREST_MAG_CLAMP=new o(n.LINEAR,n.NEAREST,h.CLAMP),o.NEAREST_CLAMP=new o(n.NEAREST,n.NEAREST,h.CLAMP),t.TextureFormat=o}(h||(exports.Graphics=h={}));var a=exports.WebGL=void 0;!function(t){class a extends h.Context{constructor(t=document.createElement("canvas")){super(),this._attributeCount=0,this._blendOperations=0,this._contextResetHandlers=[],this._currentClearColor=h.Color.TRANSPARENT,this._currentRenderTarget=null,this._defaultViewport=new h.Rect,this._forceStateUpdate=!0,this._generation=1,this._height=0,this._oldBlendOperations=0,this._oldRenderTarget=null,this._oldViewport=new h.Rect,this._width=0,this.handleWebglContextRestored=(()=>{this._attributeCount=0,this._currentClearColor=h.Color.TRANSPARENT,this._forceStateUpdate=!0,this._generation++;for(let t of this._contextResetHandlers)t()}),this.ANGLE_instanced_arrays=null,this.ANGLE_instanced_arrays_generation=-1;let e=t.getContext("webgl",{alpha:!1,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1});if(null==e)throw new Error("Setup failure");this._gl=e;let i=t.style;t.width=0,t.height=0,i.width=i.height="0",t.addEventListener("webglcontextlost",t=>{t.preventDefault()}),t.addEventListener("webglcontextrestored",this.handleWebglContextRestored),this._blendOperationMap={[h.BlendOperation.ZERO]:this._gl.ZERO,[h.BlendOperation.ONE]:this._gl.ONE,[h.BlendOperation.SOURCE_COLOR]:this._gl.SRC_COLOR,[h.BlendOperation.TARGET_COLOR]:this._gl.DST_COLOR,[h.BlendOperation.INVERSE_SOURCE_COLOR]:this._gl.ONE_MINUS_SRC_COLOR,[h.BlendOperation.INVERSE_TARGET_COLOR]:this._gl.ONE_MINUS_DST_COLOR,[h.BlendOperation.SOURCE_ALPHA]:this._gl.SRC_ALPHA,[h.BlendOperation.TARGET_ALPHA]:this._gl.DST_ALPHA,[h.BlendOperation.INVERSE_SOURCE_ALPHA]:this._gl.ONE_MINUS_SRC_ALPHA,[h.BlendOperation.INVERSE_TARGET_ALPHA]:this._gl.ONE_MINUS_DST_ALPHA,[h.BlendOperation.CONSTANT]:this._gl.CONSTANT_COLOR,[h.BlendOperation.INVERSE_CONSTANT]:this._gl.ONE_MINUS_CONSTANT_COLOR}}get widthInPixels(){return this._width}get heightInPixels(){return this._height}testContextLoss(){this.handleWebglContextRestored()}get gl(){return this._gl}get generation(){return this._generation}addContextResetHandler(t){r(this._contextResetHandlers,t)}removeContextResetHandler(t){s(this._contextResetHandlers,t)}get currentRenderTarget(){return this._currentRenderTarget}beginFrame(){this.setRenderTarget(null)}endFrame(){}setBlendState(t,e){this._blendOperations=a._packBlendModes(t,e)}setViewport(t,e,i,r){(null!=this._currentRenderTarget?this._currentRenderTarget.viewport:this._defaultViewport).set(t,e,i,r)}get viewport(){return null!=this._currentRenderTarget?this._currentRenderTarget.viewport:this._defaultViewport}get renderTargetWidthInPixels(){return null!=this._currentRenderTarget?this._currentRenderTarget.viewport.width:this._width}get renderTargetHeightInPixels(){return null!=this._currentRenderTarget?this._currentRenderTarget.viewport.height:this._height}draw(t,e,i){this._updateRenderTargetAndViewport(),f.from(e).prepare(),R.from(i).prepare(),this._updateFormat(e.format),this._updateBlendState(),this._gl.drawArrays(t==h.Primitive.TRIANGLES?this._gl.TRIANGLES:this._gl.TRIANGLE_STRIP,0,Math.floor(i.byteCount/e.format.stride)),this._forceStateUpdate=!1}resize(t,e,i,r){let s=this._gl.canvas;const n=s.getBoundingClientRect();if(this._width===i&&this._height===e&&n.width===i&&n.height===r)return;let h=s.style;s.width=t,s.height=e,h.width=`${i}px`,h.height=`${r}px`,this.setViewport(0,0,t,e),this._width=t,this._height=e}clear(t){this._updateRenderTargetAndViewport(),this._updateBlendState(),t!=this._currentClearColor&&(this._gl.clearColor(t.redF,t.greenF,t.blueF,t.alphaF),this._currentClearColor=t),this._gl.clear(this._gl.COLOR_BUFFER_BIT)}setRenderTarget(t){this._currentRenderTarget=A.from(t)}createMaterial(t,e,i){let r=new f(this,t,e,i);return r.program,r}createVertexBuffer(t){return i(t>0&&t%4==0),new R(this,t)}createTexture(t,e,i,r){return new p(this,t,e,i,r)}createRenderTarget(t){return new A(this,p.from(t))}getANGLE_instanced_arrays(){if(this.ANGLE_instanced_arrays_generation!==this._generation&&(this.ANGLE_instanced_arrays=null),!this.ANGLE_instanced_arrays&&(this.ANGLE_instanced_arrays=this.gl.getExtension("ANGLE_instanced_arrays"),!this.ANGLE_instanced_arrays))throw new Error("Failed to get extension ANGLE_instanced_arrays");return this.ANGLE_instanced_arrays}_updateRenderTargetAndViewport(){let t=this._currentRenderTarget,e=null!=t?t.viewport:this._defaultViewport,i=this._gl;(this._forceStateUpdate||this._oldRenderTarget!=t)&&(i.bindFramebuffer(i.FRAMEBUFFER,t?t.framebuffer:null),this._oldRenderTarget=t),!this._forceStateUpdate&&this._oldViewport.equals(e)||(i.viewport(e.x,this.renderTargetHeightInPixels-e.y-e.height,e.width,e.height),this._oldViewport.set(e.x,e.y,e.width,e.height))}_updateBlendState(){if(this._forceStateUpdate||this._oldBlendOperations!=this._blendOperations){let t=this._gl,e=this._blendOperations,r=this._oldBlendOperations,s=15&e,n=e>>4;i(s in this._blendOperationMap),i(n in this._blendOperationMap),e==a.COPY_BLEND_OPERATIONS?t.disable(t.BLEND):((this._forceStateUpdate||r==a.COPY_BLEND_OPERATIONS)&&t.enable(t.BLEND),t.blendFunc(this._blendOperationMap[s],this._blendOperationMap[n])),this._oldBlendOperations=e}}_updateFormat(t){let e=this._gl,i=t.attributes,r=i.length;for(let s=0;sr;)this._attributeCount--,e.disableVertexAttribArray(this._attributeCount);this._attributeCount=r}getWebGLInfo(){const t=this.gl.getExtension("WEBGL_debug_renderer_info");return{renderer:t?this.gl.getParameter(t.UNMASKED_RENDERER_WEBGL):null,vendor:t?this.gl.getParameter(t.UNMASKED_VENDOR_WEBGL):null,version:this.gl.getParameter(this.gl.VERSION)}}static from(t){return i(null==t||t instanceof a),t}static _packBlendModes(t,e){return t|e<<4}}a.COPY_BLEND_OPERATIONS=a._packBlendModes(h.BlendOperation.ONE,h.BlendOperation.ZERO),t.Context=a;class _{constructor(t,e,i=0,r=null,s=!0){this._material=t,this._name=e,this._generation=i,this._location=r,this._isDirty=s}get location(){let t=a.from(this._material.context);if(this._generation!=t.generation&&(this._location=t.gl.getUniformLocation(this._material.program,this._name),this._generation=t.generation,!e)){let e=this._material.program,r=t.gl;for(let t=0,s=r.getProgramParameter(e,r.ACTIVE_UNIFORMS);t0&&this._texture.height>0?this._texture.texture:null)}}class f{constructor(t,e,i,r,s={},n=[],h=0,a=null){this._context=t,this._format=e,this._vertexSource=i,this._fragmentSource=r,this._uniformsMap=s,this._uniformsList=n,this._generation=h,this._program=a}get context(){return this._context}get format(){return this._format}get vertexSource(){return this._vertexSource}get fragmentSource(){return this._fragmentSource}setUniformFloat(t,e){let r=this._uniformsMap[t]||null;null==r&&(r=new o(this,t),this._uniformsMap[t]=r,this._uniformsList.push(r)),i(r instanceof o),r.set(e)}setUniformInt(t,e){let r=this._uniformsMap[t]||null;null==r&&(r=new l(this,t),this._uniformsMap[t]=r,this._uniformsList.push(r)),i(r instanceof l),r.set(e)}setUniformVec2(t,e,r){let s=this._uniformsMap[t]||null;null==s&&(s=new u(this,t),this._uniformsMap[t]=s,this._uniformsList.push(s)),i(s instanceof u),s.set(e,r)}setUniformVec3(t,e,r,s){let n=this._uniformsMap[t]||null;null==n&&(n=new c(this,t),this._uniformsMap[t]=n,this._uniformsList.push(n)),i(n instanceof c),n.set(e,r,s)}setUniformVec4(t,e,r,s,n){let h=this._uniformsMap[t]||null;null==h&&(h=new d(this,t),this._uniformsMap[t]=h,this._uniformsList.push(h)),i(h instanceof d),h.set(e,r,s,n)}setUniformMat3(t,e,r,s,n,h,a,_,o,l){let u=this._uniformsMap[t]||null;null==u&&(u=new g(this,t),this._uniformsMap[t]=u,this._uniformsList.push(u)),i(u instanceof g),u.set(e,r,s,n,h,a,_,o,l)}setUniformSampler(t,e,r){let s=this._uniformsMap[t]||null;null==s&&(s=new E(this,t),this._uniformsMap[t]=s,this._uniformsList.push(s)),i(s instanceof E),s.set(e,r)}get program(){let t=this._context.gl;if(this._generation!=this._context.generation){this._program=t.createProgram(),this._compileShader(t,t.VERTEX_SHADER,this.vertexSource),this._compileShader(t,t.FRAGMENT_SHADER,this.fragmentSource);let r=this.format.attributes;for(let e=0;e=0),i(0<=t&&t+r<=this._byteCount),i(0<=e&&e+r<=this._byteCount),this._bytes&&t!=e&&0!=r&&(this._bytes.set(this._bytes.subarray(t,this._byteCount),e),this._growDirtyRegion(Math.min(t,e),Math.max(t,e)+r))}upload(t,e=0){i(0<=e&&e+t.length<=this._byteCount),i(null!=this._bytes),this._bytes.set(t,e),this._growDirtyRegion(e,e+t.length)}free(){this._buffer&&this._context.gl.deleteBuffer(this._buffer),this._generation=0}prepare(){let t=this._context.gl;this._generation!==this._context.generation&&(this._buffer=t.createBuffer(),this._generation=this._context.generation,this._isDirty=!0),t.bindBuffer(t.ARRAY_BUFFER,this._buffer),this._isDirty&&(t.bufferData(t.ARRAY_BUFFER,this._byteCount,t.DYNAMIC_DRAW),this._dirtyMin=this._totalMin,this._dirtyMax=this._totalMax,this._isDirty=!1),this._dirtyMin{const t=e.AffineTransform.betweenRects(i.configSpaceSrcRect,i.physicalSpaceDstRect),r=new e.Vec2(this.gl.viewport.width,this.gl.viewport.height);return e.AffineTransform.withTranslation(new e.Vec2(-1,1)).times(e.AffineTransform.withScale(new e.Vec2(2,-2).dividedByPointwise(r))).times(t)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(t.Graphics.Primitive.TRIANGLES,this.material,i.batch.getBuffer())}}exports.RectangleBatchRenderer=c; +},{"../lib/math":102,"./graphics":42,"./utils":119}],76:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Color=void 0;var t=require("./math");class r{constructor(t=0,r=0,e=0,o=1){this.r=t,this.g=r,this.b=e,this.a=o}static fromLumaChromaHue(e,o,s){const i=s/60,a=o*(1-Math.abs(i%2-1)),[h,c,u]=i<1?[o,a,0]:i<2?[a,o,0]:i<3?[0,o,a]:i<4?[0,a,o]:i<5?[a,0,o]:[o,0,a],l=e-(.3*h+.59*c+.11*u);return new r((0,t.clamp)(h+l,0,1),(0,t.clamp)(c+l,0,1),(0,t.clamp)(u+l,0,1),1)}toCSS(){return`rgba(${(255*this.r).toFixed()}, ${(255*this.g).toFixed()}, ${(255*this.b).toFixed()}, ${this.a.toFixed(2)})`}}exports.Color=r; +},{"./math":102}],72:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RowAtlas=void 0;var e=require("../lib/lru-cache"),t=require("./rectangle-batch-renderer"),r=require("../lib/math"),i=require("../lib/color"),c=require("./graphics"),h=require("./utils");class a{constructor(h,a,s){this.gl=h,this.rectangleBatchRenderer=a,this.textureRenderer=s,this.texture=h.createTexture(c.Graphics.TextureFormat.NEAREST_CLAMP,4096,4096),this.renderTarget=h.createRenderTarget(this.texture),this.rowCache=new e.LRUCache(this.texture.height),this.clearLineBatch=new t.RectangleBatch(h),this.clearLineBatch.addRect(r.Rect.unit,new i.Color(0,0,0,0)),h.addContextResetHandler(()=>{this.rowCache.clear()})}has(e){return this.rowCache.has(e)}getResolution(){return this.texture.width}getCapacity(){return this.texture.height}allocateLine(e){if(this.rowCache.getSize(){for(let i of e){let e=this.rowCache.get(i);if(null!=e)continue;e=this.allocateLine(i);const c=new r.Rect(new r.Vec2(0,e),new r.Vec2(this.texture.width,1));this.rectangleBatchRenderer.render({batch:this.clearLineBatch,configSpaceSrcRect:r.Rect.unit,physicalSpaceDstRect:c}),t(c,i)}})}renderViaAtlas(e,t){let i=this.rowCache.get(e);if(null==i)return!1;const c=new r.Rect(new r.Vec2(0,i),new r.Vec2(this.texture.width,1));return this.textureRenderer.render({texture:this.texture,srcRect:c,dstRect:t}),!0}}exports.RowAtlas=a; +},{"../lib/lru-cache":117,"./rectangle-batch-renderer":118,"../lib/math":102,"../lib/color":76,"./graphics":42,"./utils":119}],120:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextureRenderer=void 0;var e=require("../lib/math"),t=require("./graphics"),r=require("./utils");const n="\n uniform mat3 uvTransform;\n uniform mat3 positionTransform;\n\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n\n void main() {\n vUv = (uvTransform * vec3(uv, 1)).xy;\n gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1);\n }\n",i="\n precision mediump float;\n\n varying vec2 vUv;\n uniform sampler2D texture;\n\n void main() {\n gl_FragColor = texture2D(texture, vUv);\n }\n";class s{constructor(e){this.gl=e;const r=new t.Graphics.VertexFormat;r.add("position",t.Graphics.AttributeType.FLOAT,2),r.add("uv",t.Graphics.AttributeType.FLOAT,2);const s=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],o=[];for(let e of s)o.push(e.pos[0]),o.push(e.pos[1]),o.push(e.uv[0]),o.push(e.uv[1]);this.buffer=e.createVertexBuffer(r.stride*s.length),this.buffer.upload(new Uint8Array(new Float32Array(o).buffer)),this.material=e.createMaterial(r,n,i)}render(n){this.material.setUniformSampler("texture",n.texture,0),(0,r.setUniformAffineTransform)(this.material,"uvTransform",(()=>{const{srcRect:t,texture:r}=n,i=e.AffineTransform.withTranslation(new e.Vec2(0,1)).times(e.AffineTransform.withScale(new e.Vec2(1,-1))).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,new e.Vec2(r.width,r.height)),e.Rect.unit)).transformRect(t);return e.AffineTransform.betweenRects(e.Rect.unit,i)})()),(0,r.setUniformAffineTransform)(this.material,"positionTransform",(()=>{const{dstRect:t}=n,{viewport:r}=this.gl,i=new e.Vec2(r.width,r.height),s=e.AffineTransform.withScale(new e.Vec2(1,-1)).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,i),e.Rect.NDC)).transformRect(t);return e.AffineTransform.betweenRects(e.Rect.NDC,s)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(t.Graphics.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}}exports.TextureRenderer=s; +},{"../lib/math":102,"./graphics":42,"./utils":119}],121:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ViewportRectangleRenderer=void 0;var e=require("./graphics"),i=require("./utils");const r=new e.Graphics.VertexFormat;r.add("position",e.Graphics.AttributeType.FLOAT,2);const o="\n attribute vec2 position;\n\n void main() {\n gl_Position = vec4(position, 0, 1);\n }\n",n="\n precision mediump float;\n\n uniform mat3 configSpaceToPhysicalViewSpace;\n uniform vec2 physicalSize;\n uniform vec2 physicalOrigin;\n uniform vec2 configSpaceViewportOrigin;\n uniform vec2 configSpaceViewportSize;\n uniform float framebufferHeight;\n\n void main() {\n vec2 origin = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportOrigin, 1.0)).xy;\n vec2 size = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportSize, 0.0)).xy;\n\n vec2 halfSize = physicalSize / 2.0;\n\n float borderWidth = 2.0;\n\n origin = floor(origin * halfSize) / halfSize + borderWidth * vec2(1.0, 1.0);\n size = floor(size * halfSize) / halfSize - 2.0 * borderWidth * vec2(1.0, 1.0);\n\n vec2 coord = gl_FragCoord.xy;\n coord.x = coord.x - physicalOrigin.x;\n coord.y = framebufferHeight - coord.y - physicalOrigin.y;\n vec2 clamped = clamp(coord, origin, origin + size);\n vec2 gap = clamped - coord;\n float maxdist = max(abs(gap.x), abs(gap.y));\n\n // TOOD(jlfwong): Could probably optimize this to use mix somehow.\n if (maxdist == 0.0) {\n // Inside viewport rectangle\n gl_FragColor = vec4(0, 0, 0, 0);\n } else if (maxdist < borderWidth) {\n // Inside viewport rectangle at border\n gl_FragColor = vec4(0.7, 0.7, 0.7, 0.8);\n } else {\n // Outside viewport rectangle\n gl_FragColor = vec4(0.7, 0.7, 0.7, 0.5);\n }\n }\n";class t{constructor(e){this.gl=e;const i=[[-1,1],[1,1],[-1,-1],[1,-1]],t=[];for(let e of i)t.push(e[0]),t.push(e[1]);this.buffer=e.createVertexBuffer(r.stride*i.length),this.buffer.upload(new Uint8Array(new Float32Array(t).buffer)),this.material=e.createMaterial(r,o,n)}render(r){(0,i.setUniformAffineTransform)(this.material,"configSpaceToPhysicalViewSpace",r.configSpaceToPhysicalViewSpace),(0,i.setUniformVec2)(this.material,"configSpaceViewportOrigin",r.configSpaceViewportRect.origin),(0,i.setUniformVec2)(this.material,"configSpaceViewportSize",r.configSpaceViewportRect.size);const o=this.gl.viewport;this.material.setUniformVec2("physicalOrigin",o.x,o.y),this.material.setUniformVec2("physicalSize",o.width,o.height),this.material.setUniformFloat("framebufferHeight",this.gl.renderTargetHeightInPixels),this.gl.setBlendState(e.Graphics.BlendOperation.SOURCE_ALPHA,e.Graphics.BlendOperation.INVERSE_SOURCE_ALPHA),this.gl.draw(e.Graphics.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}}exports.ViewportRectangleRenderer=t; +},{"./graphics":42,"./utils":119}],122:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartColorPassRenderer=void 0;var e=require("../lib/math"),t=require("./graphics"),n=require("./utils");const r=new t.Graphics.VertexFormat;r.add("position",t.Graphics.AttributeType.FLOAT,2),r.add("uv",t.Graphics.AttributeType.FLOAT,2);const i="\n uniform mat3 uvTransform;\n uniform mat3 positionTransform;\n\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n\n void main() {\n vUv = (uvTransform * vec3(uv, 1)).xy;\n gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1);\n }\n",o="\n precision mediump float;\n\n uniform vec2 uvSpacePixelSize;\n uniform float renderOutlines;\n\n varying vec2 vUv;\n uniform sampler2D colorTexture;\n\n // https://en.wikipedia.org/wiki/HSL_and_HSV#From_luma/chroma/hue\n vec3 hcl2rgb(float H, float C, float L) {\n float hPrime = H / 60.0;\n float X = C * (1.0 - abs(mod(hPrime, 2.0) - 1.0));\n vec3 RGB =\n hPrime < 1.0 ? vec3(C, X, 0) :\n hPrime < 2.0 ? vec3(X, C, 0) :\n hPrime < 3.0 ? vec3(0, C, X) :\n hPrime < 4.0 ? vec3(0, X, C) :\n hPrime < 5.0 ? vec3(X, 0, C) :\n vec3(C, 0, X);\n\n float m = L - dot(RGB, vec3(0.30, 0.59, 0.11));\n return RGB + vec3(m, m, m);\n }\n\n float triangle(float x) {\n return 2.0 * abs(fract(x) - 0.5) - 1.0;\n }\n\n vec3 colorForBucket(float t) {\n float x = triangle(30.0 * t);\n float H = 360.0 * (0.9 * t);\n float C = 0.25 + 0.2 * x;\n float L = 0.80 - 0.15 * x;\n return hcl2rgb(H, C, L);\n }\n\n void main() {\n vec4 here = texture2D(colorTexture, vUv);\n\n if (here.z == 0.0) {\n // Background color\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n\n // Sample the 4 surrounding pixels in the depth texture to determine\n // if we should draw a boundary here or not.\n vec4 N = texture2D(colorTexture, vUv + vec2(0, uvSpacePixelSize.y));\n vec4 E = texture2D(colorTexture, vUv + vec2(uvSpacePixelSize.x, 0));\n vec4 S = texture2D(colorTexture, vUv + vec2(0, -uvSpacePixelSize.y));\n vec4 W = texture2D(colorTexture, vUv + vec2(-uvSpacePixelSize.x, 0));\n\n // NOTE: For outline checks, we intentionally check both the right\n // and the left to determine if we're an edge. If a rectangle is a single\n // pixel wide, we don't want to render it as an outline, so this method\n // of checking ensures that we don't outline single physical-space\n // pixel width rectangles.\n if (\n renderOutlines > 0.0 &&\n (\n here.y == N.y && here.y != S.y || // Top edge\n here.y == S.y && here.y != N.y || // Bottom edge\n here.x == E.x && here.x != W.x || // Left edge\n here.x == W.x && here.x != E.x\n )\n ) {\n // We're on an edge! Draw transparent.\n gl_FragColor = vec4(0, 0, 0, 0);\n } else {\n // Not on an edge. Draw the appropriate color.\n gl_FragColor = vec4(colorForBucket(here.z), here.a);\n }\n }\n";class a{constructor(e){this.gl=e;const t=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],n=[];for(let e of t)n.push(e.pos[0]),n.push(e.pos[1]),n.push(e.uv[0]),n.push(e.uv[1]);this.buffer=e.createVertexBuffer(r.stride*t.length),this.buffer.uploadFloats(n),this.material=e.createMaterial(r,i,o)}render(r){const{srcRect:i,rectInfoTexture:o}=r,a=e.AffineTransform.withTranslation(new e.Vec2(0,1)).times(e.AffineTransform.withScale(new e.Vec2(1,-1))).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,new e.Vec2(o.width,o.height)),e.Rect.unit)).transformRect(i),s=e.AffineTransform.betweenRects(e.Rect.unit,a),{dstRect:c}=r,l=new e.Vec2(this.gl.viewport.width,this.gl.viewport.height),u=e.AffineTransform.withScale(new e.Vec2(1,-1)).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,l),e.Rect.NDC)).transformRect(c),f=e.AffineTransform.betweenRects(e.Rect.NDC,u),h=e.Vec2.unit.dividedByPointwise(new e.Vec2(r.rectInfoTexture.width,r.rectInfoTexture.height));this.material.setUniformSampler("colorTexture",r.rectInfoTexture,0),(0,n.setUniformAffineTransform)(this.material,"uvTransform",s),this.material.setUniformFloat("renderOutlines",r.renderOutlines?1:0),this.material.setUniformVec2("uvSpacePixelSize",h.x,h.y),(0,n.setUniformAffineTransform)(this.material,"positionTransform",f),this.gl.setUnpremultipliedBlendState(),this.gl.draw(t.Graphics.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}}exports.FlamechartColorPassRenderer=a; +},{"../lib/math":102,"./graphics":42,"./utils":119}],74:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CanvasContext=void 0;var e=require("./graphics"),r=require("./rectangle-batch-renderer"),t=require("./texture-renderer"),i=require("../lib/math"),n=require("./overlay-rectangle-renderer"),s=require("./flamechart-color-pass-renderer");class o{constructor(i){this.animationFrameRequest=null,this.beforeFrameHandlers=new Set,this.onBeforeFrame=(()=>{this.animationFrameRequest=null,this.gl.setViewport(0,0,this.gl.renderTargetWidthInPixels,this.gl.renderTargetHeightInPixels),this.gl.clear(new e.Graphics.Color(1,1,1,1));for(const e of this.beforeFrameHandlers)e()}),this.gl=new e.WebGL.Context(i),this.rectangleBatchRenderer=new r.RectangleBatchRenderer(this.gl),this.textureRenderer=new t.TextureRenderer(this.gl),this.viewportRectangleRenderer=new n.ViewportRectangleRenderer(this.gl),this.flamechartColorPassRenderer=new s.FlamechartColorPassRenderer(this.gl);const o=this.gl.getWebGLInfo();o&&console.log(`WebGL initialized. renderer: ${o.renderer}, vendor: ${o.vendor}, version: ${o.version}`),window.testContextLoss=(()=>{this.gl.testContextLoss()})}addBeforeFrameHandler(e){this.beforeFrameHandlers.add(e)}removeBeforeFrameHandler(e){this.beforeFrameHandlers.delete(e)}requestFrame(){this.animationFrameRequest||(this.animationFrameRequest=requestAnimationFrame(this.onBeforeFrame))}setViewport(e,r){const{origin:t,size:i}=e;let n=this.gl.viewport;this.gl.setViewport(t.x,t.y,i.x,i.y),r();let{x:s,y:o,width:a,height:l}=n;this.gl.setViewport(s,o,a,l)}renderBehind(e,r){const t=e.getBoundingClientRect(),n=new i.Rect(new i.Vec2(t.left*window.devicePixelRatio,t.top*window.devicePixelRatio),new i.Vec2(t.width*window.devicePixelRatio,t.height*window.devicePixelRatio));this.setViewport(n,r)}}exports.CanvasContext=o; +},{"./graphics":42,"./rectangle-batch-renderer":118,"./texture-renderer":120,"../lib/math":102,"./overlay-rectangle-renderer":121,"./flamechart-color-pass-renderer":122}],38:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFrameToColorBucket=exports.getProfileToView=exports.getProfileWithRecursionFlattened=exports.getRowAtlas=exports.getCanvasContext=exports.createGetCSSColorForFrame=exports.createGetColorBucketForFrame=void 0;var e=require("../lib/utils"),t=require("../gl/row-atlas"),r=require("../gl/canvas-context"),o=require("../lib/color");const n=exports.createGetColorBucketForFrame=(0,e.memoizeByReference)(e=>t=>e.get(t.key)||0),a=exports.createGetCSSColorForFrame=(0,e.memoizeByReference)(t=>{const r=n(t);return t=>{const n=r(t)/255,a=(0,e.triangle)(30*n),l=.9*n*360,i=.25+.2*a,s=.8-.15*a;return o.Color.fromLumaChromaHue(s,i,l).toCSS()}}),l=exports.getCanvasContext=(0,e.memoizeByReference)(e=>new r.CanvasContext(e)),i=exports.getRowAtlas=(0,e.memoizeByReference)(e=>new t.RowAtlas(e.gl,e.rectangleBatchRenderer,e.textureRenderer)),s=exports.getProfileWithRecursionFlattened=(0,e.memoizeByReference)(e=>e.getProfileWithRecursionFlattened()),c=exports.getProfileToView=(0,e.memoizeByShallowEquality)(({profile:e,flattenRecursion:t})=>t?e.getProfileWithRecursionFlattened():e),u=exports.getFrameToColorBucket=(0,e.memoizeByReference)(e=>{const t=[];function r(e){return(e.file||"")+e.name}e.forEachFrame(e=>t.push(e)),t.sort(function(e,t){return r(e)>r(t)?1:-1});const o=new Map;for(let e=0;e{t.preventDefault();const{sortMethod:o}=this.props;if(o.field==e)this.props.setSortMethod({field:e,direction:o.direction===h.ASCENDING?h.DESCENDING:h.ASCENDING});else switch(e){case n.SYMBOL_NAME:this.props.setSortMethod({field:e,direction:h.ASCENDING});break;case n.SELF:case n.TOTAL:this.props.setSortMethod({field:e,direction:h.DESCENDING})}}),this.getFrameList=(()=>{const{profile:e,sortMethod:t}=this.props,r=[];switch(e.forEachFrame(e=>r.push(e)),t.field){case n.SYMBOL_NAME:(0,o.sortBy)(r,e=>e.name.toLowerCase());break;case n.SELF:(0,o.sortBy)(r,e=>e.getSelfWeight());break;case n.TOTAL:(0,o.sortBy)(r,e=>e.getTotalWeight())}return t.direction===h.DESCENDING&&r.reverse(),r}),this.listView=null,this.listViewRef=(e=>{if(e===this.listView)return;this.listView=e;const{selectedFrame:t}=this.props;if(!t||!e)return;const o=this.getFrameList().indexOf(t);-1!==o&&e.scrollIndexIntoView(o)})}renderRow(r,s){const{profile:l,selectedFrame:a}=this.props,c=r.getTotalWeight(),n=r.getSelfWeight(),h=100*c/l.getTotalNonIdleWeight(),p=100*n/l.getTotalNonIdleWeight(),S=r===a;return(0,e.h)("tr",{key:`${s}`,onClick:this.props.setSelectedFrame.bind(null,r),className:(0,t.css)(E.tableRow,s%2==0&&E.tableRowEven,S&&E.tableRowSelected)},(0,e.h)("td",{className:(0,t.css)(E.numericCell)},l.formatValue(c)," (",(0,o.formatPercent)(h),")",(0,e.h)(d,{perc:h})),(0,e.h)("td",{className:(0,t.css)(E.numericCell)},l.formatValue(n)," (",(0,o.formatPercent)(p),")",(0,e.h)(d,{perc:p})),(0,e.h)("td",{title:r.file,className:(0,t.css)(E.textCell)},(0,e.h)(i.ColorChit,{color:this.props.getCSSColorForFrame(r)}),r.name))}render(){const{sortMethod:o}=this.props,i=this.getFrameList(),l=i.map(e=>({size:r.Sizes.FRAME_HEIGHT}));return(0,e.h)("div",{className:(0,t.css)(r.commonStyle.vbox,E.profileTableView)},(0,e.h)("table",{className:(0,t.css)(E.tableView)},(0,e.h)("thead",{className:(0,t.css)(E.tableHeader)},(0,e.h)("tr",null,(0,e.h)("th",{className:(0,t.css)(E.numericCell),onClick:e=>this.onSortClick(n.TOTAL,e)},(0,e.h)(p,{activeDirection:o.field===n.TOTAL?o.direction:null}),"Total"),(0,e.h)("th",{className:(0,t.css)(E.numericCell),onClick:e=>this.onSortClick(n.SELF,e)},(0,e.h)(p,{activeDirection:o.field===n.SELF?o.direction:null}),"Self"),(0,e.h)("th",{className:(0,t.css)(E.textCell),onClick:e=>this.onSortClick(n.SYMBOL_NAME,e)},(0,e.h)(p,{activeDirection:o.field===n.SYMBOL_NAME?o.direction:null}),"Symbol Name")))),(0,e.h)(s.ScrollableListView,{ref:this.listViewRef,axis:"y",items:l,className:(0,t.css)(E.scrollView),renderItems:(o,r)=>{const s=[];for(let e=o;e<=r;e++)s.push(this.renderRow(i[e],e));return(0,e.h)("table",{className:(0,t.css)(E.tableView)},s)}}))}}exports.ProfileTableView=S;const E=t.StyleSheet.create({profileTableView:{background:r.Colors.WHITE,height:"100%"},scrollView:{overflowY:"auto",overflowX:"hidden"},tableView:{width:"100%",fontSize:r.FontSize.LABEL,background:r.Colors.WHITE},tableHeader:{borderBottom:`2px solid ${r.Colors.LIGHT_GRAY}`,textAlign:"left",color:r.Colors.GRAY,userSelect:"none"},sortIcon:{position:"relative",top:1,marginRight:r.Sizes.FRAME_HEIGHT/4},tableRow:{height:r.Sizes.FRAME_HEIGHT},tableRowEven:{background:r.Colors.OFF_WHITE},tableRowSelected:{background:r.Colors.DARK_BLUE,color:r.Colors.WHITE},numericCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",position:"relative",textAlign:"right",paddingRight:r.Sizes.FRAME_HEIGHT,width:6*r.Sizes.FRAME_HEIGHT,minWidth:6*r.Sizes.FRAME_HEIGHT},textCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:"100%",maxWidth:0},hBarDisplay:{position:"absolute",background:r.Colors.TRANSPARENT_GREEN,bottom:2,height:2,width:`calc(100% - ${2*r.Sizes.FRAME_HEIGHT}px)`,right:r.Sizes.FRAME_HEIGHT},hBarDisplayFilled:{height:"100%",position:"absolute",background:r.Colors.GREEN,right:0}}),m=exports.ProfileTableViewContainer=(0,a.createContainer)(S,(e,t,o)=>{const{activeProfileState:r}=o,{profile:i,sandwichViewState:s,index:a}=r;if(!i)throw new Error("profile missing");const{tableSortMethod:n}=e,{callerCallee:h}=s,d=h?h.selectedFrame:null,p=(0,c.getFrameToColorBucket)(i),S=(0,c.createGetCSSColorForFrame)(p);return{profile:i,profileIndex:r.index,selectedFrame:d,getCSSColorForFrame:S,sortMethod:n,setSelectedFrame:e=>{t(l.actions.sandwichView.setSelectedFrame({profileIndex:a,args:e}))},setSortMethod:e=>{t(l.actions.sandwichView.setTableSortMethod(e))}}}); +},{"preact":24,"aphrodite":68,"../lib/utils":70,"./style":79,"./color-chit":106,"./scrollable-list-view":108,"../store/actions":40,"../lib/typed-redux":36,"../store/getters":38}],29:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.canUseXHR=exports.ViewMode=void 0,exports.createApplicationStore=d;var e=require("./actions"),t=require("redux"),r=n(t),o=require("../lib/typed-redux"),s=require("../lib/hash-params"),i=require("./profiles-state"),a=require("../views/profile-table-view");function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var c=exports.ViewMode=void 0;!function(e){e[e.CHRONO_FLAME_CHART=0]="CHRONO_FLAME_CHART",e[e.LEFT_HEAVY_FLAME_GRAPH=1]="LEFT_HEAVY_FLAME_GRAPH",e[e.SANDWICH_VIEW=2]="SANDWICH_VIEW"}(c||(exports.ViewMode=c={}));const l=window.location.protocol,u=exports.canUseXHR="http:"===l||"https:"===l;function d(t){const n=(0,s.getHashParams)(),l=u&&null!=n.profileURL,d=r.combineReducers({profileGroup:i.profileGroup,hashParams:(0,o.setter)(e.actions.setHashParams,n),flattenRecursion:(0,o.setter)(e.actions.setFlattenRecursion,!1),viewMode:(0,o.setter)(e.actions.setViewMode,c.CHRONO_FLAME_CHART),glCanvas:(0,o.setter)(e.actions.setGLCanvas,null),dragActive:(0,o.setter)(e.actions.setDragActive,!1),loading:(0,o.setter)(e.actions.setLoading,l),error:(0,o.setter)(e.actions.setError,!1),tableSortMethod:(0,o.setter)(e.actions.sandwichView.setTableSortMethod,{field:a.SortField.SELF,direction:a.SortDirection.DESCENDING})});return r.createStore(d,t)} +},{"./actions":40,"redux":31,"../lib/typed-redux":36,"../lib/hash-params":50,"./profiles-state":52,"../views/profile-table-view":55}],81:[function(require,module,exports) { +"use strict";function e(e){return e.replace(/\\([a-fA-F0-9]{2})/g,(e,n)=>{const t=parseInt(n,16);return String.fromCharCode(t)})}function n(n){const t=n.split("\n");if(!t.length)return null;if(""===t[t.length-1]&&t.pop(),!t.length)return null;const r=new Map,o=/^(\d+):(.+)$/,s=/^([\$\w]+):([\$\w-]+)$/;for(const n of t){const t=o.exec(n);if(t){r.set(`wasm-function[${t[1]}]`,e(t[2]));continue}const c=s.exec(n);if(!c)return null;r.set(c[1],e(c[2]))}return r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.importEmscriptenSymbolMap=n; +},{}],142:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Flamechart=void 0;var t=require("./utils"),e=require("./math");class r{constructor(e){this.source=e,this.layers=[],this.totalWeight=0,this.minFrameWidth=1;const r=[];this.minFrameWidth=1/0;this.totalWeight=e.getTotalWeight(),e.forEachCall((e,i)=>{const s=(0,t.lastOf)(r),h={node:e,parent:s,children:[],start:i,end:i};s&&s.children.push(h),r.push(h)},(t,e)=>{console.assert(r.length>0);const i=r.pop();if(i.end=e,i.end-i.start==0)return;const s=r.length;for(;this.layers.length<=s;)this.layers.push([]);this.layers[s].push(i),this.minFrameWidth=Math.min(this.minFrameWidth,i.end-i.start)}),isFinite(this.minFrameWidth)||(this.minFrameWidth=1)}getTotalWeight(){return this.totalWeight}getLayers(){return this.layers}getColorBucketForFrame(t){return this.source.getColorBucketForFrame(t)}getMinFrameWidth(){return this.minFrameWidth}formatValue(t){return this.source.formatValue(t)}getClampedViewportWidth(t){const r=this.getTotalWeight(),i=Math.pow(2,40),s=(0,e.clamp)(3*this.getMinFrameWidth(),r/i,r);return(0,e.clamp)(t,s,r)}}exports.Flamechart=r; +},{"./utils":70,"./math":102}],143:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartRenderer=exports.FlamechartRowAtlasKey=void 0;var e=require("./rectangle-batch-renderer"),t=require("../lib/math"),r=require("../lib/color"),n=require("../lib/utils"),s=require("./graphics"),o=require("./utils");const c=1e4;class i{constructor(e,t,r){this.batch=e,this.bounds=t,this.numPrecedingRectanglesInRow=r,this.children=[]}getBatch(){return this.batch}getBounds(){return this.bounds}getRectCount(){return this.batch.getRectCount()}getChildren(){return this.children}getParity(){return this.numPrecedingRectanglesInRow%2}forEachLeafNodeWithinBounds(e,t){this.bounds.hasIntersectionWith(e)&&t(this)}}class h{constructor(e){if(this.children=e,this.rectCount=0,0===e.length)throw new Error("Empty interior node");let r=1/0,n=-1/0,s=1/0,o=-1/0;for(let t of e){this.rectCount+=t.getRectCount();const e=t.getBounds();r=Math.min(r,e.left()),n=Math.max(n,e.right()),s=Math.min(s,e.top()),o=Math.max(o,e.bottom())}this.bounds=new t.Rect(new t.Vec2(r,s),new t.Vec2(n-r,o-s))}getBounds(){return this.bounds}getRectCount(){return this.rectCount}getChildren(){return this.children}forEachLeafNodeWithinBounds(e,t){if(this.bounds.hasIntersectionWith(e))for(let r of this.children)r.forEachLeafNodeWithinBounds(e,t)}}class a{get key(){return`${this.stackDepth}_${this.index}_${this.zoomLevel}`}constructor(e){this.stackDepth=e.stackDepth,this.zoomLevel=e.zoomLevel,this.index=e.index}static getOrInsert(e,t){return e.getOrInsert(new a(t))}}exports.FlamechartRowAtlasKey=a;class l{constructor(s,o,a,l,g,d={inverted:!1}){this.gl=s,this.rowAtlas=o,this.flamechart=a,this.rectangleBatchRenderer=l,this.colorPassRenderer=g,this.options=d,this.layers=[],this.rectInfoTexture=null,this.rectInfoRenderTarget=null,this.atlasKeys=new n.KeyedSet;const f=a.getLayers().length;for(let n=0;n=c&&(s.push(new i(u,new t.Rect(new t.Vec2(l,o),new t.Vec2(g-l,1)),R)),l=1/0,g=-1/0,u=new e.RectangleBatch(this.gl));const d=new t.Rect(new t.Vec2(a.start,o),new t.Vec2(a.end-a.start,1));l=Math.min(l,d.left()),g=Math.max(g,d.right());const f=new r.Color((1+h%255)/256,(1+n%255)/256,(1+this.flamechart.getColorBucketForFrame(a.node.frame))/256);u.addRect(d,f),R++}u.getRectCount()>0&&s.push(new i(u,new t.Rect(new t.Vec2(l,o),new t.Vec2(g-l,1)),R)),this.layers.push(new h(s))}}getRectInfoTexture(e,t){if(this.rectInfoTexture){const r=this.rectInfoTexture;r.width==e&&r.height==t||r.resize(e,t)}else this.rectInfoTexture=this.gl.createTexture(s.Graphics.TextureFormat.NEAREST_CLAMP,e,t);return this.rectInfoTexture}getRectInfoRenderTarget(e,t){const r=this.getRectInfoTexture(e,t);return this.rectInfoRenderTarget&&this.rectInfoRenderTarget.texture!=r&&(this.rectInfoRenderTarget.texture.free(),this.rectInfoRenderTarget.setColor(r)),this.rectInfoRenderTarget||(this.rectInfoRenderTarget=this.gl.createRenderTarget(r)),this.rectInfoRenderTarget}free(){this.rectInfoRenderTarget&&this.rectInfoRenderTarget.free(),this.rectInfoTexture&&this.rectInfoTexture.free()}configSpaceBoundsForKey(e){const{stackDepth:r,zoomLevel:n,index:s}=e,o=this.flamechart.getTotalWeight()/Math.pow(2,n),c=this.flamechart.getLayers().length,i=this.options.inverted?c-1-r:r;return new t.Rect(new t.Vec2(o*s,i),new t.Vec2(o,1))}render(e){const{configSpaceSrcRect:r,physicalSpaceDstRect:n}=e,c=[],i=t.AffineTransform.betweenRects(r,n);if(r.isEmpty())return;let h=0;for(;;){const e=a.getOrInsert(this.atlasKeys,{stackDepth:0,zoomLevel:h,index:0}),t=this.configSpaceBoundsForKey(e);if(i.transformRect(t).width(){const r=this.configSpaceBoundsForKey(t);this.layers[t.stackDepth].forEachLeafNodeWithinBounds(r,t=>{this.rectangleBatchRenderer.render({batch:t.getBatch(),configSpaceSrcRect:r,physicalSpaceDstRect:e})})});const T=this.getRectInfoRenderTarget(n.width(),n.height());(0,o.renderInto)(this.gl,T,()=>{this.gl.clear(new s.Graphics.Color(0,0,0,0));const e=new t.Rect(t.Vec2.zero,new t.Vec2(this.gl.viewport.width,this.gl.viewport.height)),n=t.AffineTransform.betweenRects(r,e);for(let e of m){const t=this.configSpaceBoundsForKey(e);this.rowAtlas.renderViaAtlas(e,n.transformRect(t))}for(let e of I){const t=this.configSpaceBoundsForKey(e),r=n.transformRect(t);this.layers[e.stackDepth].forEachLeafNodeWithinBounds(t,e=>{this.rectangleBatchRenderer.render({batch:e.getBatch(),configSpaceSrcRect:t,physicalSpaceDstRect:r})})}});const x=this.getRectInfoTexture(n.width(),n.height());this.colorPassRenderer.render({rectInfoTexture:x,srcRect:new t.Rect(t.Vec2.zero,new t.Vec2(x.width,x.height)),dstRect:n,renderOutlines:e.renderOutlines})}}exports.FlamechartRenderer=l; +},{"./rectangle-batch-renderer":118,"../lib/math":102,"../lib/color":76,"../lib/utils":70,"./graphics":42,"./utils":119}],163:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.style=void 0;var e=require("aphrodite"),o=require("./style");const t=exports.style=e.StyleSheet.create({hoverCount:{color:o.Colors.GREEN},fill:{width:"100%",height:"100%",position:"absolute",left:0,top:0},minimap:{height:o.Sizes.MINIMAP_HEIGHT,borderBottom:`${o.Sizes.SEPARATOR_HEIGHT}px solid ${o.Colors.LIGHT_GRAY}`},panZoomView:{flex:1},detailView:{display:"grid",height:o.Sizes.DETAIL_VIEW_HEIGHT,overflow:"hidden",gridTemplateColumns:"120px 120px 1fr",gridTemplateRows:"repeat(4, 1fr)",borderTop:`${o.Sizes.SEPARATOR_HEIGHT}px solid ${o.Colors.LIGHT_GRAY}`,fontSize:o.FontSize.LABEL,position:"absolute",background:o.Colors.WHITE,width:"100vw",bottom:0},stackTraceViewPadding:{padding:5},stackTraceView:{height:o.Sizes.DETAIL_VIEW_HEIGHT,lineHeight:`${o.FontSize.LABEL+2}px`,overflow:"auto"},stackLine:{whiteSpace:"nowrap"},stackFileLine:{color:o.Colors.LIGHT_GRAY},statsTable:{display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:`repeat(3, ${o.FontSize.LABEL+10}px)`,gridGap:"1px 1px",textAlign:"center",paddingRight:1},statsTableHeader:{gridColumn:"1 / 3"},statsTableCell:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},thisInstanceCell:{background:o.Colors.DARK_BLUE,color:o.Colors.WHITE},allInstancesCell:{background:o.Colors.PALE_DARK_BLUE,color:o.Colors.WHITE},barDisplay:{position:"absolute",top:0,left:0,background:"rgba(0, 0, 0, 0.2)",width:"100%"}}); +},{"aphrodite":68,"./style":79}],173:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ELLIPSIS=void 0,exports.cachedMeasureTextWidth=n,exports.trimTextMid=s;var e=require("./utils");const t=exports.ELLIPSIS="…",r=new Map;let i=-1;function n(e,t){return window.devicePixelRatio!==i&&(r.clear(),i=window.devicePixelRatio),r.has(t)||r.set(t,e.measureText(t).width),r.get(t)}function o(e,r){const i=Math.floor(r/2),n=e.substr(0,i),o=e.substr(e.length-i,i);return n+t+o}function s(t,r,i){if(n(t,r)<=i)return r;const[s]=(0,e.binarySearch)(0,r.length,e=>n(t,o(r,e)),i);return o(r,s)} +},{"./utils":70}],159:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartMinimapView=void 0;var e,i=require("preact"),t=require("aphrodite"),o=require("../lib/math"),s=require("./flamechart-style"),n=require("./style"),a=require("../lib/text-utils");!function(e){e[e.DRAW_NEW_VIEWPORT=0]="DRAW_NEW_VIEWPORT",e[e.TRANSLATE_VIEWPORT=1]="TRANSLATE_VIEWPORT"}(e||(e={}));class r extends i.Component{constructor(){super(...arguments),this.container=null,this.containerRef=(e=>{this.container=e||null}),this.overlayCanvas=null,this.overlayCtx=null,this.onWindowResize=(()=>{this.onBeforeFrame()}),this.onBeforeFrame=(()=>{this.maybeClearInteractionLock(),this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays()}),this.renderCanvas=(()=>{this.props.canvasContext.requestFrame()}),this.frameHadWheelEvent=!1,this.framesWithoutWheelEvents=0,this.interactionLock=null,this.maybeClearInteractionLock=(()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1}),this.onWheel=(e=>{if(e.preventDefault(),this.frameHadWheelEvent=!0,(e.metaKey||e.ctrlKey)&&"pan"!==this.interactionLock){let i=1+e.deltaY/100;e.ctrlKey&&(i=1+e.deltaY/40),i=(0,o.clamp)(i,.1,10),this.zoom(i)}else"zoom"!==this.interactionLock&&this.pan(new o.Vec2(e.deltaX,e.deltaY));this.renderCanvas()}),this.dragStartConfigSpaceMouse=null,this.dragConfigSpaceViewportOffset=null,this.draggingMode=null,this.onMouseDown=(i=>{const t=this.configSpaceMouse(i);t&&(this.props.configSpaceViewportRect.contains(t)?(this.draggingMode=e.TRANSLATE_VIEWPORT,this.dragConfigSpaceViewportOffset=t.minus(this.props.configSpaceViewportRect.origin)):this.draggingMode=e.DRAW_NEW_VIEWPORT,this.dragStartConfigSpaceMouse=t,window.addEventListener("mousemove",this.onWindowMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.updateCursor(t))}),this.onWindowMouseMove=(i=>{if(!this.dragStartConfigSpaceMouse)return;let t=this.configSpaceMouse(i);if(t)if(this.updateCursor(t),t=new o.Rect(new o.Vec2(0,0),this.configSpaceSize()).closestPointTo(t),this.draggingMode===e.DRAW_NEW_VIEWPORT){const e=this.dragStartConfigSpaceMouse;let i=t;if(!e||!i)return;const s=Math.min(e.x,i.x),n=Math.max(e.x,i.x)-s,a=this.props.configSpaceViewportRect.height();this.props.setConfigSpaceViewportRect(new o.Rect(new o.Vec2(s,i.y-a/2),new o.Vec2(n,a)))}else if(this.draggingMode===e.TRANSLATE_VIEWPORT){if(!this.dragConfigSpaceViewportOffset)return;const e=t.minus(this.dragConfigSpaceViewportOffset);this.props.setConfigSpaceViewportRect(this.props.configSpaceViewportRect.withOrigin(e))}}),this.updateCursor=(i=>{this.draggingMode===e.TRANSLATE_VIEWPORT?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):this.draggingMode===e.DRAW_NEW_VIEWPORT?document.body.style.cursor="col-resize":this.props.configSpaceViewportRect.contains(i)?(document.body.style.cursor="grab",document.body.style.cursor="-webkit-grab"):document.body.style.cursor="col-resize"}),this.onMouseLeave=(()=>{null==this.draggingMode&&(document.body.style.cursor="default")}),this.onMouseMove=(e=>{const i=this.configSpaceMouse(e);i&&this.updateCursor(i)}),this.onWindowMouseUp=(e=>{this.draggingMode=null,window.removeEventListener("mousemove",this.onWindowMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp);const i=this.configSpaceMouse(e);i&&this.updateCursor(i)}),this.overlayCanvasRef=(e=>{e?(this.overlayCanvas=e,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)})}physicalViewSize(){return new o.Vec2(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}minimapOrigin(){return new o.Vec2(0,n.Sizes.FRAME_HEIGHT*window.devicePixelRatio)}configSpaceSize(){return new o.Vec2(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}configSpaceToPhysicalViewSpace(){const e=this.minimapOrigin();return o.AffineTransform.betweenRects(new o.Rect(new o.Vec2(0,0),this.configSpaceSize()),new o.Rect(e,this.physicalViewSize().minus(e)))}logicalToPhysicalViewSpace(){return o.AffineTransform.withScale(new o.Vec2(window.devicePixelRatio,window.devicePixelRatio))}windowToLogicalViewSpace(){if(!this.container)return new o.AffineTransform;const e=this.container.getBoundingClientRect();return o.AffineTransform.withTranslation(new o.Vec2(-e.left,-e.top))}renderRects(){this.container&&(this.physicalViewSize().x<2||this.props.canvasContext.renderBehind(this.container,()=>{this.props.flamechartRenderer.render({configSpaceSrcRect:new o.Rect(new o.Vec2(0,0),this.configSpaceSize()),physicalSpaceDstRect:new o.Rect(this.minimapOrigin(),this.physicalViewSize().minus(this.minimapOrigin())),renderOutlines:!1}),this.props.canvasContext.viewportRectangleRenderer.render({configSpaceViewportRect:this.props.configSpaceViewportRect,configSpaceToPhysicalViewSpace:this.configSpaceToPhysicalViewSpace()})}))}renderOverlays(){const e=this.overlayCtx;if(!e)return;const i=this.physicalViewSize();e.clearRect(0,0,i.x,i.y);const t=this.configSpaceToPhysicalViewSpace(),s=this.configSpaceSize().x,r=(this.configSpaceToPhysicalViewSpace().inverted()||new o.AffineTransform).times(this.logicalToPhysicalViewSpace()).transformVector(new o.Vec2(200,1)).x,c=n.Sizes.FRAME_HEIGHT*window.devicePixelRatio,h=n.FontSize.LABEL*window.devicePixelRatio,l=(c-h)/2;e.font=`${h}px/${c}px ${n.FontFamily.MONOSPACE}`,e.textBaseline="top";let p=Math.pow(10,Math.floor(Math.log10(r)));r/p>5?p*=5:r/p>2&&(p*=2),e.fillStyle="rgba(255, 255, 255, 0.8)",e.fillRect(0,0,i.x,c),e.textBaseline="top",e.fillStyle=n.Colors.DARK_GRAY;for(let n=Math.ceil(0/p)*p;n ")),i.push(c.name),c.file){let l=c.file;c.line&&(l+=`:${c.line}`,c.col&&(l+=`:${c.col}`)),i.push((0,s.h)("span",{className:(0,e.css)(t.style.stackFileLine)}," (",l,")"))}l.push((0,s.h)("div",{className:(0,e.css)(t.style.stackLine)},i))}return(0,s.h)("div",{className:(0,e.css)(t.style.stackTraceView)},(0,s.h)("div",{className:(0,e.css)(t.style.stackTraceViewPadding)},l))}}class c extends s.Component{render(){const{flamechart:l,selectedNode:a}=this.props,{frame:c}=a;return(0,s.h)("div",{className:(0,e.css)(t.style.detailView)},(0,s.h)(r,{title:"This Instance",cellStyle:t.style.thisInstanceCell,grandTotal:l.getTotalWeight(),selectedTotal:a.getTotalWeight(),selectedSelf:a.getSelfWeight(),formatter:l.formatValue.bind(l)}),(0,s.h)(r,{title:"All Instances",cellStyle:t.style.allInstancesCell,grandTotal:l.getTotalWeight(),selectedTotal:c.getTotalWeight(),selectedSelf:c.getSelfWeight(),formatter:l.formatValue.bind(l)}),(0,s.h)(i,{node:a,getFrameColor:this.props.getCSSColorForFrame}))}}exports.FlamechartDetailView=c; +},{"aphrodite":68,"preact":24,"./flamechart-style":163,"../lib/utils":70,"./color-chit":106}],161:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartPanZoomView=void 0;var e=require("../lib/math"),t=require("./style"),i=require("../lib/text-utils"),o=require("./flamechart-style"),s=require("preact"),n=require("aphrodite");class r extends s.Component{constructor(){super(...arguments),this.container=null,this.containerRef=(e=>{this.container=e||null}),this.overlayCanvas=null,this.overlayCtx=null,this.hoveredLabel=null,this.overlayCanvasRef=(e=>{e?(this.overlayCanvas=e,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)}),this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT=t.Sizes.FRAME_HEIGHT,this.onWindowResize=(()=>{this.updateConfigSpaceViewport(),this.onBeforeFrame()}),this.frameHadWheelEvent=!1,this.framesWithoutWheelEvents=0,this.interactionLock=null,this.maybeClearInteractionLock=(()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1}),this.onBeforeFrame=(()=>{this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays(),this.maybeClearInteractionLock()}),this.renderCanvas=(()=>{this.props.canvasContext.requestFrame()}),this.lastDragPos=null,this.mouseDownPos=null,this.onMouseDown=(t=>{this.mouseDownPos=this.lastDragPos=new e.Vec2(t.offsetX,t.offsetY),this.updateCursor(),window.addEventListener("mouseup",this.onWindowMouseUp)}),this.onMouseDrag=(t=>{if(!this.lastDragPos)return;const i=new e.Vec2(t.offsetX,t.offsetY);this.pan(this.lastDragPos.minus(i)),this.lastDragPos=i,this.hoveredLabel&&this.props.onNodeHover(null)}),this.onDblClick=(t=>{if(this.hoveredLabel){const t=this.hoveredLabel.configSpaceBounds,i=new e.Rect(t.origin.minus(new e.Vec2(0,1)),t.size.withY(this.props.configSpaceViewportRect.height()));this.props.setConfigSpaceViewportRect(i)}}),this.onClick=(t=>{const i=new e.Vec2(t.offsetX,t.offsetY),o=this.mouseDownPos;this.mouseDownPos=null,o&&i.minus(o).length()>5||(this.hoveredLabel?(this.props.onNodeSelect(this.hoveredLabel.node),this.renderCanvas()):this.props.onNodeSelect(null))}),this.onWindowMouseUp=(e=>{this.lastDragPos=null,this.updateCursor(),window.removeEventListener("mouseup",this.onWindowMouseUp)}),this.onMouseMove=(t=>{if(this.updateCursor(),this.lastDragPos)return t.preventDefault(),void this.onMouseDrag(t);this.hoveredLabel=null;const i=new e.Vec2(t.offsetX,t.offsetY),o=this.logicalToPhysicalViewSpace().transformPosition(i),s=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(o);if(!s)return;const n=(t,i=0)=>{const o=t.end-t.start,r=this.props.renderInverted?this.configSpaceSize().y-1-i:i,a=new e.Rect(new e.Vec2(t.start,r),new e.Vec2(o,1));if(s.xa.right())return null;a.contains(s)&&(this.hoveredLabel={configSpaceBounds:a,node:t.node});for(let e of t.children)n(e,i+1)};for(let e of this.props.flamechart.getLayers()[0]||[])n(e);this.hoveredLabel?this.props.onNodeHover({node:this.hoveredLabel.node,event:t}):this.props.onNodeHover(null),this.renderCanvas()}),this.onMouseLeave=(e=>{this.hoveredLabel=null,this.props.onNodeHover(null),this.renderCanvas()}),this.onWheel=(t=>{t.preventDefault(),this.frameHadWheelEvent=!0;const i=t.metaKey||t.ctrlKey;let o=t.deltaY,s=t.deltaX;if(t.deltaMode===t.DOM_DELTA_LINE&&(o*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT,s*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT),i&&"pan"!==this.interactionLock){let i=1+o/100;t.ctrlKey&&(i=1+o/40),i=(0,e.clamp)(i,.1,10),this.zoom(new e.Vec2(t.offsetX,t.offsetY),i)}else"zoom"!==this.interactionLock&&this.pan(new e.Vec2(s,o));this.renderCanvas()}),this.onWindowKeyPress=(t=>{if(!this.container)return;const{width:i,height:o}=this.container.getBoundingClientRect();"="===t.key||"+"===t.key?(this.zoom(new e.Vec2(i/2,o/2),.5),t.preventDefault()):"-"!==t.key&&"_"!==t.key||(this.zoom(new e.Vec2(i/2,o/2),2),t.preventDefault()),t.ctrlKey||t.shiftKey||t.metaKey||("0"===t.key?this.zoom(new e.Vec2(i/2,o/2),1e9):"ArrowRight"===t.key||"KeyD"===t.code?this.pan(new e.Vec2(100,0)):"ArrowLeft"===t.key||"KeyA"===t.code?this.pan(new e.Vec2(-100,0)):"ArrowUp"===t.key||"KeyW"===t.code?this.pan(new e.Vec2(0,-100)):"ArrowDown"===t.key||"KeyS"===t.code?this.pan(new e.Vec2(0,100)):"Escape"===t.key&&(this.props.onNodeSelect(null),this.renderCanvas()))})}setConfigSpaceViewportRect(e){this.props.setConfigSpaceViewportRect(e)}configSpaceSize(){return new e.Vec2(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}physicalViewSize(){return new e.Vec2(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}physicalBounds(){if(this.props.renderInverted){const t=this.physicalViewSize().y,i=(this.configSpaceSize().y+1)*this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio;if(i{const f=t.end-t.start,w=this.props.renderInverted?this.configSpaceSize().y-1-d:d,u=new e.Rect(new e.Vec2(t.start,w),new e.Vec2(f,1));if(!(fthis.props.configSpaceViewportRect.right()||u.right()this.props.configSpaceViewportRect.bottom())return;if(u.hasIntersectionWith(this.props.configSpaceViewportRect)){let e=s.transformRect(u);if(e.left()<0&&(e=e.withOrigin(e.origin.withX(0)).withSize(e.size.withX(e.size.x+e.left()))),e.right()>a.x&&(e=e.withSize(e.size.withX(a.x-e.left()))),e.width()>h){const s=(0,i.trimTextMid)(o,t.node.frame.name,e.width()-2*l);o.fillText(s,e.left()+l,Math.round(e.bottom()-(r-n)/2))}}for(let e of t.children)p(e,d+1)}};for(let e of this.props.flamechart.getLayers()[0]||[])p(e);const d=2*window.devicePixelRatio;o.strokeStyle=t.Colors.PALE_DARK_BLUE,o.lineWidth=d;const f=(s.inverseTransformVector(new e.Vec2(1,0))||new e.Vec2(0,0)).x,w=(i,n=0)=>{if(!this.props.selectedNode)return;const r=i.end-i.start,a=this.props.renderInverted?this.configSpaceSize().y-1-n:n,h=new e.Rect(new e.Vec2(i.start,a),new e.Vec2(r,1));if(!(rthis.props.configSpaceViewportRect.right()||h.right()this.props.configSpaceViewportRect.bottom())){if(h.hasIntersectionWith(this.props.configSpaceViewportRect)){const e=s.transformRect(h);i.node.frame===this.props.selectedNode.frame&&(i.node===this.props.selectedNode?o.strokeStyle!==t.Colors.DARK_BLUE&&(o.stroke(),o.beginPath(),o.strokeStyle=t.Colors.DARK_BLUE):o.strokeStyle!==t.Colors.PALE_DARK_BLUE&&(o.stroke(),o.beginPath(),o.strokeStyle=t.Colors.PALE_DARK_BLUE),o.rect(Math.round(e.left()+1+d/2),Math.round(e.top()+1+d/2),Math.round(Math.max(0,e.width()-2-d)),Math.round(Math.max(0,e.height()-2-d))))}for(let e of i.children)w(e,n+1)}};o.beginPath();for(let e of this.props.flamechart.getLayers()[0]||[])w(e);o.stroke(),this.renderTimeIndicators()}renderTimeIndicators(){const o=this.overlayCtx;if(!o)return;const s=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio,n=this.physicalViewSize(),r=this.configSpaceToPhysicalViewSpace(),a=(s-t.FontSize.LABEL*window.devicePixelRatio)/2,h=this.props.configSpaceViewportRect.left(),c=this.props.configSpaceViewportRect.right(),l=(this.configSpaceToPhysicalViewSpace().inverted()||new e.AffineTransform).times(this.logicalToPhysicalViewSpace()).transformVector(new e.Vec2(200,1)).x;let p=Math.pow(10,Math.floor(Math.log10(l)));l/p>5?p*=5:l/p>2&&(p*=2);{const l=this.props.renderInverted?n.y-s:0;o.fillStyle="rgba(255, 255, 255, 0.8)",o.fillRect(0,l,n.x,s),o.fillStyle=t.Colors.DARK_GRAY,o.textBaseline="top";for(let t=Math.ceil(h/p)*p;t{this.props.flamechartRenderer.render({physicalSpaceDstRect:this.physicalBounds(),configSpaceSrcRect:this.props.configSpaceViewportRect,renderOutlines:!0})}))}pan(t){this.interactionLock="pan";const i=this.logicalToPhysicalViewSpace().transformVector(t),o=this.configSpaceToPhysicalViewSpace().inverseTransformVector(i);this.hoveredLabel&&this.props.onNodeHover(null),o&&this.props.transformViewport(e.AffineTransform.withTranslation(o))}zoom(t,i){this.interactionLock="zoom";const o=this.logicalToPhysicalViewSpace().transformPosition(t),s=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(o);if(!s)return;const n=e.AffineTransform.withTranslation(s.times(-1)).scaledBy(new e.Vec2(i,1)).translatedBy(s);this.props.transformViewport(n)}updateCursor(){this.lastDragPos?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):document.body.style.cursor="default"}shouldComponentUpdate(){return!1}componentWillReceiveProps(e){this.props.flamechart!==e.flamechart?(this.hoveredLabel=null,this.renderCanvas()):this.props.selectedNode!==e.selectedNode?this.renderCanvas():this.props.configSpaceViewportRect!==e.configSpaceViewportRect&&this.renderCanvas()}componentDidMount(){this.props.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keydown",this.onWindowKeyPress)}render(){return(0,s.h)("div",{className:(0,n.css)(o.style.panZoomView,t.commonStyle.vbox),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onDblClick:this.onDblClick,onWheel:this.onWheel,ref:this.containerRef},(0,s.h)("canvas",{width:1,height:1,ref:this.overlayCanvasRef,className:(0,n.css)(o.style.fill)}))}}exports.FlamechartPanZoomView=r; +},{"../lib/math":102,"./style":79,"../lib/text-utils":173,"./flamechart-style":163,"preact":24,"aphrodite":68}],162:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Hovertip=void 0;var e=require("./style"),o=require("aphrodite"),t=require("preact");class i extends t.Component{render(){const{containerSize:i,offset:r}=this.props,n=i.x,p=i.y,d={};return r.x+7+e.Sizes.TOOLTIP_WIDTH_MAX{const t=a.Sizes.DETAIL_VIEW_HEIGHT/a.Sizes.FRAME_HEIGHT,i=this.configSpaceSize(),o=this.props.flamechart.getClampedViewportWidth(e.size.x),s=e.size.withX(o),c=r.Vec2.clamp(e.origin,new r.Vec2(0,-1),r.Vec2.max(r.Vec2.zero,i.minus(s).plus(new r.Vec2(0,t+1))));this.props.setConfigSpaceViewportRect(new r.Rect(c,e.size.withX(o)))}),this.setLogicalSpaceViewportSize=(e=>{this.props.setLogicalSpaceViewportSize(e)}),this.transformViewport=(e=>{const t=e.transformRect(this.props.configSpaceViewportRect);this.setConfigSpaceViewportRect(t)}),this.onNodeHover=(e=>{this.props.setNodeHover(e)}),this.onNodeClick=(e=>{this.props.setSelectedNode(e)}),this.container=null,this.containerRef=(e=>{this.container=e||null})}configSpaceSize(){return new r.Vec2(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}formatValue(e){const t=100*e/this.props.flamechart.getTotalWeight(),r=(0,i.formatPercent)(t);return`${this.props.flamechart.formatValue(e)} (${r})`}renderTooltip(){if(!this.container)return null;const{hover:i}=this.props;if(!i)return null;const{width:o,height:a,left:c,top:p}=this.container.getBoundingClientRect(),h=new r.Vec2(i.event.clientX-c,i.event.clientY-p);return(0,e.h)(n.Hovertip,{containerSize:new r.Vec2(o,a),offset:h},(0,e.h)("span",{className:(0,t.css)(s.style.hoverCount)},this.formatValue(i.node.getTotalWeight()))," ",i.node.frame.name)}render(){return(0,e.h)("div",{className:(0,t.css)(s.style.fill,a.commonStyle.vbox),ref:this.containerRef},(0,e.h)(o.FlamechartMinimapView,{configSpaceViewportRect:this.props.configSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect}),(0,e.h)(p.FlamechartPanZoomView,{canvasContext:this.props.canvasContext,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,renderInverted:!1,onNodeHover:this.onNodeHover,onNodeSelect:this.onNodeClick,selectedNode:this.props.selectedNode,transformViewport:this.transformViewport,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportBounds:this.setLogicalSpaceViewportSize}),this.renderTooltip(),this.props.selectedNode&&(0,e.h)(c.FlamechartDetailView,{flamechart:this.props.flamechart,getCSSColorForFrame:this.props.getCSSColorForFrame,selectedNode:this.props.selectedNode}))}}exports.FlamechartView=l; +},{"preact":24,"aphrodite":68,"../lib/math":102,"../lib/utils":70,"./flamechart-minimap-view":159,"./flamechart-style":163,"./style":79,"./flamechart-detail-view":160,"./flamechart-pan-zoom-view":161,"./hovertip":162,"../lib/typed-redux":36}],62:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LeftHeavyFlamechartView=exports.getLeftHeavyFlamechart=exports.ChronoFlamechartView=exports.createMemoizedFlamechartRenderer=exports.getChronoViewFlamechart=void 0,exports.createFlamechartSetters=n;var e=require("../store/flamechart-view-state"),t=require("../lib/flamechart"),r=require("../gl/flamechart-renderer"),a=require("../lib/typed-redux"),o=require("../lib/utils"),l=require("./flamechart-view"),c=require("../store/getters"),i=require("../store/actions");function n(e,t,r){function a(a,o){return l=>{const c=Object.assign({},o(l),{id:t});e(a({profileIndex:r,args:c}))}}const{setHoveredNode:o,setLogicalSpaceViewportSize:l,setConfigSpaceViewportRect:c,setSelectedNode:n}=i.actions.flamechart;return{setNodeHover:a(o,e=>({hover:e})),setLogicalSpaceViewportSize:a(l,e=>({logicalSpaceViewportSize:e})),setConfigSpaceViewportRect:a(c,e=>({configSpaceViewportRect:e})),setSelectedNode:a(n,e=>({selectedNode:e}))}}const m=exports.getChronoViewFlamechart=(0,o.memoizeByShallowEquality)(({profile:e,getColorBucketForFrame:r})=>new t.Flamechart({getTotalWeight:e.getTotalWeight.bind(e),forEachCall:e.forEachCall.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:r})),s=exports.createMemoizedFlamechartRenderer=(e=>(0,o.memoizeByShallowEquality)(({canvasContext:t,flamechart:a})=>new r.FlamechartRenderer(t.gl,(0,c.getRowAtlas)(t),a,t.rectangleBatchRenderer,t.flamechartColorPassRenderer,e))),h=s(),F=exports.ChronoFlamechartView=(0,a.createContainer)(l.FlamechartView,(t,r,a)=>{const{activeProfileState:o,glCanvas:l}=a,{index:i,profile:s,chronoViewState:F}=o,C=(0,c.getCanvasContext)(l),f=(0,c.getFrameToColorBucket)(s),g=(0,c.createGetColorBucketForFrame)(f),d=(0,c.createGetCSSColorForFrame)(f),u=m({profile:s,getColorBucketForFrame:g}),p=h({canvasContext:C,flamechart:u});return Object.assign({renderInverted:!1,flamechart:u,flamechartRenderer:p,canvasContext:C,getCSSColorForFrame:d},n(r,e.FlamechartID.CHRONO,i),F)}),C=exports.getLeftHeavyFlamechart=(0,o.memoizeByShallowEquality)(({profile:e,getColorBucketForFrame:r})=>new t.Flamechart({getTotalWeight:e.getTotalNonIdleWeight.bind(e),forEachCall:e.forEachCallGrouped.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:r})),f=s(),g=exports.LeftHeavyFlamechartView=(0,a.createContainer)(l.FlamechartView,(t,r,a)=>{const{activeProfileState:o,glCanvas:l}=a,{index:i,profile:m,leftHeavyViewState:s}=o,h=(0,c.getCanvasContext)(l),F=(0,c.getFrameToColorBucket)(m),g=(0,c.createGetColorBucketForFrame)(F),d=(0,c.createGetCSSColorForFrame)(F),u=C({profile:m,getColorBucketForFrame:g}),p=f({canvasContext:h,flamechart:u});return Object.assign({renderInverted:!1,flamechart:u,flamechartRenderer:p,canvasContext:h,getCSSColorForFrame:d},n(r,e.FlamechartID.LEFT_HEAVY,i),s)}); +},{"../store/flamechart-view-state":98,"../lib/flamechart":142,"../gl/flamechart-renderer":143,"../lib/typed-redux":36,"../lib/utils":70,"./flamechart-view":115,"../store/getters":38,"../store/actions":40}],167:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.style=exports.FlamechartWrapper=void 0;var e=require("aphrodite"),t=require("preact"),r=require("./style"),o=require("../lib/math"),i=require("./flamechart-pan-zoom-view"),s=require("../lib/utils"),a=require("./hovertip"),n=require("../lib/typed-redux");class p extends n.StatelessComponent{constructor(){super(...arguments),this.setConfigSpaceViewportRect=(e=>{this.props.setConfigSpaceViewportRect(this.clampViewportToFlamegraph(e))}),this.setLogicalSpaceViewportSize=(e=>{this.props.setLogicalSpaceViewportSize(e)}),this.transformViewport=(e=>{this.setConfigSpaceViewportRect(e.transformRect(this.props.configSpaceViewportRect))}),this.container=null,this.containerRef=(e=>{this.container=e||null}),this.setNodeHover=(e=>{this.props.setNodeHover(e)})}clampViewportToFlamegraph(e){const{flamechart:t,renderInverted:r}=this.props,i=new o.Vec2(t.getTotalWeight(),t.getLayers().length),s=this.props.flamechart.getClampedViewportWidth(e.size.x),a=e.size.withX(s),n=o.Vec2.clamp(e.origin,new o.Vec2(0,r?0:-1),o.Vec2.max(o.Vec2.zero,i.minus(a).plus(new o.Vec2(0,1))));return new o.Rect(n,e.size.withX(s))}formatValue(e){const t=100*e/this.props.flamechart.getTotalWeight(),r=(0,s.formatPercent)(t);return`${this.props.flamechart.formatValue(e)} (${r})`}renderTooltip(){if(!this.container)return null;const{hover:r}=this.props;if(!r)return null;const{width:i,height:s,left:n,top:p}=this.container.getBoundingClientRect(),l=new o.Vec2(r.event.clientX-n,r.event.clientY-p);return(0,t.h)(a.Hovertip,{containerSize:new o.Vec2(i,s),offset:l},(0,t.h)("span",{className:(0,e.css)(c.hoverCount)},this.formatValue(r.node.getTotalWeight()))," ",r.node.frame.name)}render(){return(0,t.h)("div",{className:(0,e.css)(r.commonStyle.fillY,r.commonStyle.fillX,r.commonStyle.vbox),ref:this.containerRef},(0,t.h)(i.FlamechartPanZoomView,{selectedNode:null,onNodeHover:this.setNodeHover,onNodeSelect:s.noop,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,renderInverted:this.props.renderInverted,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportBounds:this.setLogicalSpaceViewportSize}),this.renderTooltip())}}exports.FlamechartWrapper=p;const c=exports.style=e.StyleSheet.create({hoverCount:{color:r.Colors.GREEN}}); +},{"aphrodite":68,"preact":24,"./style":79,"../lib/math":102,"./flamechart-pan-zoom-view":161,"../lib/utils":70,"./hovertip":162,"../lib/typed-redux":36}],137:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.InvertedCallerFlamegraphView=void 0;var e=require("../lib/utils"),r=require("../lib/flamechart"),t=require("./flamechart-view-container"),a=require("../lib/typed-redux"),l=require("../store/getters"),o=require("../store/flamechart-view-state"),i=require("./flamechart-wrapper");const n=(0,e.memoizeByShallowEquality)(({profile:e,frame:r,flattenRecursion:t})=>{let a=e.getInvertedProfileForCallersOf(r);return t?a.getProfileWithRecursionFlattened():a}),c=(0,e.memoizeByShallowEquality)(({invertedCallerProfile:e,getColorBucketForFrame:t})=>new r.Flamechart({getTotalWeight:e.getTotalNonIdleWeight.bind(e),forEachCall:e.forEachCallGrouped.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:t})),s=(0,t.createMemoizedFlamechartRenderer)({inverted:!0}),m=exports.InvertedCallerFlamegraphView=(0,a.createContainer)(i.FlamechartWrapper,(e,r,a)=>{const{activeProfileState:i}=a;let{profile:m,sandwichViewState:f,index:d}=i,{flattenRecursion:u,glCanvas:C}=e;if(!m)throw new Error("profile missing");if(!C)throw new Error("glCanvas missing");const{callerCallee:h}=f;if(!h)throw new Error("callerCallee missing");const{selectedFrame:F}=h;m=u?(0,l.getProfileWithRecursionFlattened)(m):m;const g=(0,l.getFrameToColorBucket)(m),v=(0,l.createGetColorBucketForFrame)(g),p=(0,l.createGetCSSColorForFrame)(g),w=(0,l.getCanvasContext)(C),S=c({invertedCallerProfile:n({profile:m,frame:F,flattenRecursion:u}),getColorBucketForFrame:v}),E=s({canvasContext:w,flamechart:S});return Object.assign({renderInverted:!0,flamechart:S,flamechartRenderer:E,canvasContext:w,getCSSColorForFrame:p},(0,t.createFlamechartSetters)(r,o.FlamechartID.SANDWICH_INVERTED_CALLERS,d),{setSelectedNode:()=>{}},h.invertedCallerFlamegraph)}); +},{"../lib/utils":70,"../lib/flamechart":142,"./flamechart-view-container":62,"../lib/typed-redux":36,"../store/getters":38,"../store/flamechart-view-state":98,"./flamechart-wrapper":167}],138:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CalleeFlamegraphView=void 0;var e=require("../lib/utils"),r=require("../lib/flamechart"),t=require("./flamechart-view-container"),a=require("../lib/typed-redux"),l=require("../store/getters"),o=require("../store/flamechart-view-state"),i=require("./flamechart-wrapper");const c=(0,e.memoizeByShallowEquality)(({profile:e,frame:r,flattenRecursion:t})=>{let a=e.getProfileForCalleesOf(r);return t?a.getProfileWithRecursionFlattened():a}),n=(0,e.memoizeByShallowEquality)(({calleeProfile:e,getColorBucketForFrame:t})=>new r.Flamechart({getTotalWeight:e.getTotalNonIdleWeight.bind(e),forEachCall:e.forEachCallGrouped.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:t})),s=(0,t.createMemoizedFlamechartRenderer)(),m=exports.CalleeFlamegraphView=(0,a.createContainer)(i.FlamechartWrapper,(e,r,a)=>{const{activeProfileState:i}=a,{index:m,profile:f,sandwichViewState:u}=i,{flattenRecursion:h,glCanvas:C}=e;if(!f)throw new Error("profile missing");if(!C)throw new Error("glCanvas missing");const{callerCallee:F}=u;if(!F)throw new Error("callerCallee missing");const{selectedFrame:g}=F,d=(0,l.getFrameToColorBucket)(f),p=(0,l.createGetColorBucketForFrame)(d),w=(0,l.createGetCSSColorForFrame)(d),v=(0,l.getCanvasContext)(C),S=n({calleeProfile:c({profile:f,frame:g,flattenRecursion:h}),getColorBucketForFrame:p}),q=s({canvasContext:v,flamechart:S});return Object.assign({renderInverted:!1,flamechart:S,flamechartRenderer:q,canvasContext:v,getCSSColorForFrame:w},(0,t.createFlamechartSetters)(r,o.FlamechartID.SANDWICH_CALLEES,m),{setSelectedNode:()=>{}},F.calleeFlamegraph)}); +},{"../lib/utils":70,"../lib/flamechart":142,"./flamechart-view-container":62,"../lib/typed-redux":36,"../store/getters":38,"../store/flamechart-view-state":98,"./flamechart-wrapper":167}],60:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SandwichViewContainer=void 0;var e=require("aphrodite"),t=require("./profile-table-view"),a=require("preact"),l=require("./style"),r=require("../store/actions"),s=require("../lib/typed-redux"),i=require("./inverted-caller-flamegraph-view"),o=require("./callee-flamegraph-view");class n extends s.StatelessComponent{constructor(){super(...arguments),this.setSelectedFrame=(e=>{this.props.setSelectedFrame(e)}),this.onWindowKeyPress=(e=>{"Escape"===e.key&&this.setSelectedFrame(null)})}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyPress)}render(){const{selectedFrame:r}=this.props;let s=null;return r&&(s=(0,a.h)("div",{className:(0,e.css)(l.commonStyle.fillY,c.callersAndCallees,l.commonStyle.vbox)},(0,a.h)("div",{className:(0,e.css)(l.commonStyle.hbox,c.panZoomViewWraper)},(0,a.h)("div",{className:(0,e.css)(c.flamechartLabelParent)},(0,a.h)("div",{className:(0,e.css)(c.flamechartLabel)},"Callers")),(0,a.h)(i.InvertedCallerFlamegraphView,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})),(0,a.h)("div",{className:(0,e.css)(c.divider)}),(0,a.h)("div",{className:(0,e.css)(l.commonStyle.hbox,c.panZoomViewWraper)},(0,a.h)("div",{className:(0,e.css)(c.flamechartLabelParent,c.flamechartLabelParentBottom)},(0,a.h)("div",{className:(0,e.css)(c.flamechartLabel,c.flamechartLabelBottom)},"Callees")),(0,a.h)(o.CalleeFlamegraphView,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})))),(0,a.h)("div",{className:(0,e.css)(l.commonStyle.hbox,l.commonStyle.fillY)},(0,a.h)("div",{className:(0,e.css)(c.tableView)},(0,a.h)(t.ProfileTableViewContainer,{activeProfileState:this.props.activeProfileState})),s)}}const c=e.StyleSheet.create({tableView:{flex:1},panZoomViewWraper:{flex:1},flamechartLabelParent:{display:"flex",flexDirection:"column",justifyContent:"flex-end",alignItems:"flex-start",fontSize:l.FontSize.TITLE,width:1.2*l.FontSize.TITLE,borderRight:`1px solid ${l.Colors.LIGHT_GRAY}`},flamechartLabelParentBottom:{justifyContent:"flex-start"},flamechartLabel:{transform:"rotate(-90deg)",transformOrigin:"50% 50% 0",width:1.2*l.FontSize.TITLE,flexShrink:1},flamechartLabelBottom:{transform:"rotate(-90deg)",display:"flex",justifyContent:"flex-end"},callersAndCallees:{flex:1,borderLeft:`${l.Sizes.SEPARATOR_HEIGHT}px solid ${l.Colors.LIGHT_GRAY}`},divider:{height:2,background:l.Colors.LIGHT_GRAY}}),d=exports.SandwichViewContainer=(0,s.createContainer)(n,(e,t,a)=>{const{activeProfileState:l,glCanvas:s}=a,{sandwichViewState:i,index:o}=l,{callerCallee:n}=i;return{activeProfileState:l,glCanvas:s,setSelectedFrame:e=>{t(r.actions.sandwichView.setSelectedFrame({profileIndex:o,args:e}))},selectedFrame:n?n.selectedFrame:null,profileIndex:o}}); +},{"aphrodite":68,"./profile-table-view":55,"preact":24,"./style":79,"../store/actions":40,"../lib/typed-redux":36,"./inverted-caller-flamegraph-view":137,"./callee-flamegraph-view":138}],140:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ByteFormatter=exports.TimeFormatter=exports.RawValueFormatter=void 0;var t=require("./utils");class e{constructor(){this.unit="none"}format(t){return t.toLocaleString()}}exports.RawValueFormatter=e;class r{constructor(t){this.unit=t,this.multiplier="nanoseconds"===t?1e-9:"microseconds"===t?1e-6:"milliseconds"===t?.001:1}formatUnsigned(e){const r=e*this.multiplier;if(r/60>=1){const e=Math.floor(r/60),o=Math.floor(r-60*e).toString();return`${e}:${(0,t.zeroPad)(o,2)}`}return r/1>=1?`${r.toFixed(2)}s`:r/.001>=1?`${(r/.001).toFixed(2)}ms`:r/1e-6>=1?`${(r/1e-6).toFixed(2)}µs`:`${(r/1e-9).toFixed(2)}ns`}format(t){return`${t<0?"-":""}${this.formatUnsigned(Math.abs(t))}`}}exports.TimeFormatter=r;class o{constructor(){this.unit="bytes"}format(t){return t<1024?`${t.toFixed(0)} B`:(t/=1024)<1024?`${t.toFixed(2)} KB`:(t/=1024)<1024?`${t.toFixed(2)} MB`:`${(t/=1024).toFixed(2)} GB`}}exports.ByteFormatter=o; +},{"./utils":70}],145:[function(require,module,exports) { +var t=null;function r(){return t||(t=e()),t}function e(){try{throw new Error}catch(r){var t=(""+r.stack).match(/(https?|file|ftp):\/\/[^)\n]+/g);if(t)return n(t[0])}return"/"}function n(t){return(""+t).replace(/^((?:https?|file|ftp):\/\/.+)\/[^\/]+$/,"$1")+"/"}exports.getBundleURL=r,exports.getBaseURL=n; +},{}],66:[function(require,module,exports) { +var r=require("./bundle-url").getBundleURL;function e(r){Array.isArray(r)||(r=[r]);var e=r[r.length-1];try{return Promise.resolve(require(e))}catch(n){if("MODULE_NOT_FOUND"===n.code)return new u(function(n,i){t(r.slice(0,-1)).then(function(){return require(e)}).then(n,i)});throw n}}function t(r){return Promise.all(r.map(s))}var n={};function i(r,e){n[r]=e}module.exports=exports=e,exports.load=t,exports.register=i;var o={};function s(e){var t;if(Array.isArray(e)&&(t=e[1],e=e[0]),o[e])return o[e];var i=(e.substring(e.lastIndexOf(".")+1,e.length)||e).toLowerCase(),s=n[i];return s?o[e]=s(r()+e).then(function(r){return r&&module.bundle.register(t,r),r}):void 0}function u(r){this.executor=r,this.promise=null}u.prototype.then=function(r,e){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.then(r,e)},u.prototype.catch=function(r){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.catch(r)}; +},{"./bundle-url":145}],139:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CallTreeProfileBuilder=exports.StackListProfileBuilder=exports.Profile=exports.CallTreeNode=exports.Frame=exports.HasWeights=void 0;var e=require("./utils"),t=require("./value-formatters"),s=function(e,t,s,r){return new(s||(s=Promise))(function(a,i){function l(e){try{h(r.next(e))}catch(e){i(e)}}function o(e){try{h(r.throw(e))}catch(e){i(e)}}function h(e){e.done?a(e.value):new s(function(t){t(e.value)}).then(l,o)}h((r=r.apply(e,t||[])).next())})};const r=require("_bundle_loader")(require.resolve("./demangle-cpp"));r.then(()=>{});class a{constructor(){this.selfWeight=0,this.totalWeight=0}getSelfWeight(){return this.selfWeight}getTotalWeight(){return this.totalWeight}addToTotalWeight(e){this.totalWeight+=e}addToSelfWeight(e){this.selfWeight+=e}overwriteWeightWith(e){this.selfWeight=e.selfWeight,this.totalWeight=e.totalWeight}}exports.HasWeights=a;class i extends a{constructor(e){super(),this.key=e.key,this.name=e.name,this.file=e.file,this.line=e.line,this.col=e.col}static getOrInsert(e,t){return e.getOrInsert(new i(t))}}exports.Frame=i,i.root=new i({key:"(speedscope root)",name:"(speedscope root)"});class l extends a{constructor(e,t){super(),this.frame=e,this.parent=t,this.children=[],this.frozen=!1}isRoot(){return this.frame===i.root}isFrozen(){return this.frozen}freeze(){this.frozen=!0}}exports.CallTreeNode=l;class o{constructor(s=0){this.name="",this.frames=new e.KeyedSet,this.appendOrderCalltreeRoot=new l(i.root,null),this.groupedCalltreeRoot=new l(i.root,null),this.samples=[],this.weights=[],this.valueFormatter=new t.RawValueFormatter,this.totalNonIdleWeight=null,this.totalWeight=s}getAppendOrderCalltreeRoot(){return this.appendOrderCalltreeRoot}getGroupedCalltreeRoot(){return this.groupedCalltreeRoot}formatValue(e){return this.valueFormatter.format(e)}setValueFormatter(e){this.valueFormatter=e}getWeightUnit(){return this.valueFormatter.unit}getName(){return this.name}setName(e){this.name=e}getTotalWeight(){return this.totalWeight}getTotalNonIdleWeight(){return null===this.totalNonIdleWeight&&(this.totalNonIdleWeight=this.groupedCalltreeRoot.children.reduce((e,t)=>e+t.getTotalWeight(),0)),this.totalNonIdleWeight}forEachCallGrouped(e,t){!function s(r,a){r.frame!==i.root&&e(r,a);let l=0;const o=[...r.children];o.sort((e,t)=>e.getTotalWeight()>t.getTotalWeight()?-1:1),o.forEach(function(e){s(e,a+l),l+=e.getTotalWeight()}),r.frame!==i.root&&t(r,a+r.getTotalWeight())}(this.groupedCalltreeRoot,0)}forEachCall(t,s){let r=[],a=0,l=0;for(let o of this.samples){let h=null;for(h=o;h&&h.frame!=i.root&&-1===r.indexOf(h);h=h.parent);for(;r.length>0&&(0,e.lastOf)(r)!=h;){s(r.pop(),a)}const n=[];for(let e=o;e&&e.frame!=i.root&&e!=h;e=e.parent)n.push(e);n.reverse();for(let e of n)t(e,a);r=r.concat(n),a+=this.weights[l++]}for(let e=r.length-1;e>=0;e--)s(r[e],a)}forEachFrame(e){this.frames.forEach(e)}forEachSample(e){for(let t=0;t{r.frames.getOrInsert(e).overwriteWeightWith(e)}),r}getInvertedProfileForCallersOf(e){const t=i.getOrInsert(this.frames,e),s=new h,r=[];!function e(s){if(s.frame===t)r.push(s);else for(let t of s.children)e(t)}(this.appendOrderCalltreeRoot);for(let e of r){const t=[];for(let s=e;null!=s&&s.frame!==i.root;s=s.parent)t.push(s.frame);s.appendSampleWithWeight(t,e.getTotalWeight())}const a=s.build();return a.name=this.name,a.valueFormatter=this.valueFormatter,a}getProfileForCalleesOf(e){const t=i.getOrInsert(this.frames,e),s=new h;!function e(r){if(r.frame===t)!function(e){const t=[];!function e(r){t.push(r.frame),s.appendSampleWithWeight(t,r.getSelfWeight());for(let t of r.children)e(t);t.pop()}(e)}(r);else for(let t of r.children)e(t)}(this.appendOrderCalltreeRoot);const r=s.build();return r.name=this.name,r.valueFormatter=this.valueFormatter,r}demangle(){return s(this,void 0,void 0,function*(){let e=null;for(let t of this.frames)t.name.startsWith("__Z")&&(e||(e=(yield r).demangleCpp),t.name=e(t.name))})}remapNames(e){for(let t of this.frames)t.name=e(t.name)}}exports.Profile=o;class h extends o{constructor(){super(...arguments),this.pendingSample=null}_appendSample(t,s,r){if(isNaN(s))throw new Error("invalid weight");let a=r?this.appendOrderCalltreeRoot:this.groupedCalltreeRoot,o=new Set;for(let h of t){const t=i.getOrInsert(this.frames,h),n=r?(0,e.lastOf)(a.children):a.children.find(e=>e.frame===t);if(n&&!n.isFrozen()&&n.frame==t)a=n;else{const e=a;a=new l(t,a),e.children.push(a)}a.addToTotalWeight(s),o.add(a.frame)}if(a.addToSelfWeight(s),r)for(let e of a.children)e.freeze();if(r){a.frame.addToSelfWeight(s);for(let e of o)e.addToTotalWeight(s);a===(0,e.lastOf)(this.samples)?this.weights[this.weights.length-1]+=s:(this.samples.push(a),this.weights.push(s))}}appendSampleWithWeight(e,t){if(0!==t){if(t<0)throw new Error("Samples must have positive weights");this._appendSample(e,t,!0),this._appendSample(e,t,!1)}}appendSampleWithTimestamp(e,t){if(this.pendingSample){if(t0?this.appendSampleWithWeight(this.pendingSample.stack,this.pendingSample.centralTimestamp-this.pendingSample.startTimestamp):(this.appendSampleWithWeight(this.pendingSample.stack,1),this.setValueFormatter(new t.RawValueFormatter))),this.totalWeight=Math.max(this.totalWeight,this.weights.reduce((e,t)=>e+t,0)),this}}exports.StackListProfileBuilder=h;class n extends o{constructor(){super(...arguments),this.appendOrderStack=[this.appendOrderCalltreeRoot],this.groupedOrderStack=[this.groupedCalltreeRoot],this.framesInStack=new Map,this.stack=[],this.lastValue=0}addWeightsToFrames(t){const s=t-this.lastValue;for(let e of this.framesInStack.keys())e.addToTotalWeight(s);const r=(0,e.lastOf)(this.stack);r&&r.addToSelfWeight(s)}addWeightsToNodes(t,s){const r=t-this.lastValue;for(let e of s)e.addToTotalWeight(r);const a=(0,e.lastOf)(s);a&&a.addToSelfWeight(r)}_enterFrame(t,s,r){let a=r?this.appendOrderStack:this.groupedOrderStack;this.addWeightsToNodes(s,a);let i=(0,e.lastOf)(a);if(i){if(r){const e=s-this.lastValue;if(e>0)this.samples.push(i),this.weights.push(s-this.lastValue);else if(e<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${s}`)}const o=r?(0,e.lastOf)(i.children):i.children.find(e=>e.frame===t);let h;o&&!o.isFrozen()&&o.frame==t?h=o:(h=new l(t,i),i.children.push(h)),a.push(h)}}enterFrame(e,t){const s=i.getOrInsert(this.frames,e);this.addWeightsToFrames(t),this._enterFrame(s,t,!0),this._enterFrame(s,t,!1),this.stack.push(s);const r=this.framesInStack.get(s)||0;this.framesInStack.set(s,r+1),this.lastValue=t}_leaveFrame(e,t,s){let r=s?this.appendOrderStack:this.groupedOrderStack;if(this.addWeightsToNodes(t,r),s){const s=this.appendOrderStack.pop();if(null==s)throw new Error(`Trying to leave ${e.key} when stack is empty`);if(null==this.lastValue)throw new Error(`Trying to leave a ${e.key} before any have been entered`);s.freeze();const r=t-this.lastValue;if(r>0)this.samples.push(s),this.weights.push(t-this.lastValue);else if(r<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${t}`)}else this.groupedOrderStack.pop()}leaveFrame(e,t){const s=i.getOrInsert(this.frames,e);this.addWeightsToFrames(t),this._leaveFrame(s,t,!0),this._leaveFrame(s,t,!1),this.stack.pop();const r=this.framesInStack.get(s);null!=r&&(1===r?this.framesInStack.delete(s):this.framesInStack.set(s,r-1),this.lastValue=t,this.totalWeight=Math.max(this.totalWeight,this.lastValue))}build(){if(this.appendOrderStack.length>1||this.groupedOrderStack.length>1)throw new Error("Tried to complete profile construction with a non-empty stack");return this}}exports.CallTreeProfileBuilder=n; +},{"./utils":70,"./value-formatters":140,"_bundle_loader":66,"./demangle-cpp":[["demangle-cpp.8a387750.js",180],"demangle-cpp.8a387750.map",180]}],141:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=exports.FileFormat=void 0;!function(e){let t,o;!function(e){e.EVENTED="evented",e.SAMPLED="sampled"}(t=e.ProfileType||(e.ProfileType={})),function(e){e.OPEN_FRAME="O",e.CLOSE_FRAME="C"}(o=e.EventType||(e.EventType={}))}(e||(exports.FileFormat=e={})); +},{}],19:[function(require,module,exports) { +module.exports={name:"speedscope",version:"1.5.3",description:"",repository:"jlfwong/speedscope",main:"index.js",bin:{speedscope:"./bin/cli.js"},scripts:{deploy:"./scripts/deploy.sh",prepack:"./scripts/build-release.sh",prettier:"prettier --write 'src/**/*.ts' 'src/**/*.tsx'",lint:"eslint 'src/**/*.ts' 'src/**/*.tsx'",jest:"./scripts/test-setup.sh && jest --runInBand",coverage:"npm run jest -- --coverage && coveralls < coverage/lcov.info",test:"tsc --noEmit && npm run lint && npm run coverage",serve:"parcel assets/index.html --open --no-autoinstall"},files:["bin/cli.js","dist/release/**","!*.map"],browserslist:["last 2 Chrome versions","last 2 Firefox versions"],author:"",license:"MIT",devDependencies:{"@types/jest":"22.2.3","@types/jszip":"3.1.4","@types/node":"10.1.4","@types/pako":"1.0.0",aphrodite:"2.1.0",coveralls:"3.0.1",eslint:"4.19.1","eslint-plugin-prettier":"2.6.0",jest:"24.3.0",jsverify:"0.8.3",jszip:"3.1.5",pako:"1.0.6","parcel-bundler":"1.9.2",preact:"8.2.7","preact-redux":"jlfwong/preact-redux#a56dcc4",prettier:"1.12.0",protobufjs:"6.8.8",quicktype:"15.0.209",redux:"^4.0.0","ts-jest":"24.3.0",typescript:"3.2.4","typescript-eslint-parser":"17.0.1","uglify-es":"3.2.2"},jest:{transform:{"^.+\\.tsx?$":"ts-jest"},testRegex:"\\.test\\.tsx?$",collectCoverageFrom:["**/*.{ts,tsx}","!**/*.d.{ts,tsx}"],moduleFileExtensions:["ts","tsx","js","jsx","json"]},dependencies:{opn:"5.3.0"}}; +},{}],83:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.exportProfileGroup=r,exports.importSpeedscopeProfiles=s,exports.saveToFile=l;var e=require("./profile"),t=require("./value-formatters"),n=require("./file-format-spec");function r(e){const t=[],n=new Map;function r(e){let r=n.get(e);if(null==r){const o={name:e.name};null!=e.file&&(o.file=e.file),null!=e.line&&(o.line=e.line),null!=e.col&&(o.col=e.col),r=t.length,n.set(e,r),t.push(o)}return r}const a={exporter:`speedscope@${require("../../package.json").version}`,name:e.name,activeProfileIndex:e.indexToView,$schema:"https://www.speedscope.app/file-format-schema.json",shared:{frames:t},profiles:[]};for(let t of e.profiles)a.profiles.push(o(t,r));return a}function o(e,t){const r={type:n.FileFormat.ProfileType.EVENTED,name:e.getName(),unit:e.getWeightUnit(),startValue:0,endValue:e.getTotalWeight(),events:[]};return e.forEachCall((e,o)=>{r.events.push({type:n.FileFormat.EventType.OPEN_FRAME,frame:t(e.frame),at:o})},(e,o)=>{r.events.push({type:n.FileFormat.EventType.CLOSE_FRAME,frame:t(e.frame),at:o})}),r}function a(r,o){function a(e){const{name:n,unit:o}=r;switch(o){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":e.setValueFormatter(new t.TimeFormatter(o));break;case"bytes":e.setValueFormatter(new t.ByteFormatter);break;case"none":e.setValueFormatter(new t.RawValueFormatter)}e.setName(n)}switch(r.type){case n.FileFormat.ProfileType.EVENTED:return function(t){const{startValue:r,endValue:s,events:l}=t,i=new e.CallTreeProfileBuilder(s-r);a(i);const c=o.map((e,t)=>Object.assign({key:t},e));for(let e of l)switch(e.type){case n.FileFormat.EventType.OPEN_FRAME:i.enterFrame(c[e.frame],e.at-r);break;case n.FileFormat.EventType.CLOSE_FRAME:i.leaveFrame(c[e.frame],e.at-r)}return i.build()}(r);case n.FileFormat.ProfileType.SAMPLED:return function(t){const{startValue:n,endValue:r,samples:s,weights:l}=t,i=new e.StackListProfileBuilder(r-n);a(i);const c=o.map((e,t)=>Object.assign({key:t},e));if(s.length!==l.length)throw new Error(`Expected samples.length (${s.length}) to equal weights.length (${l.length})`);for(let e=0;ec[e]),n)}return i.build()}(r)}}function s(e){return{name:e.name||e.profiles[0].name||"profile",indexToView:e.activeProfileIndex||0,profiles:e.profiles.map(t=>a(t,e.shared.frames))}}function l(e){const t=r(e),n=new Blob([JSON.stringify(t)],{type:"text/json"}),o=`${(t.name?t.name.split(".")[0]:"profile").replace(/\W+/g,"_")}.speedscope.json`;console.log("Saving",o);const a=document.createElement("a");a.download=o,a.href=window.URL.createObjectURL(n),a.dataset.downloadurl=["text/json",a.download,a.href].join(":"),document.body.appendChild(a),a.click(),document.body.removeChild(a)} +},{"./profile":139,"./value-formatters":140,"./file-format-spec":141,"../../package.json":19}],64:[function(require,module,exports) { +module.exports="perf-vertx-stacks-01-collapsed-all.3e0a632c.txt"; +},{}],34:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Application=exports.GLCanvas=exports.Toolbar=void 0;var e=require("preact"),t=require("aphrodite"),o=require("./style"),i=require("../lib/emscripten"),s=require("./sandwich-view"),r=require("../lib/file-format"),n=require("../store"),a=require("../lib/typed-redux"),l=require("./flamechart-view-container"),c=require("../gl/graphics"),d=function(e,t,o,i){return new(o||(o=Promise))(function(s,r){function n(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?s(e.value):new o(function(t){t(e.value)}).then(n,a)}l((i=i.apply(e,t||[])).next())})};const p=require("_bundle_loader")(require.resolve("../import"));function h(e,t){return d(this,void 0,void 0,function*(){return(yield p).importProfileGroupFromText(e,t)})}function f(e,t){return d(this,void 0,void 0,function*(){return(yield p).importProfileGroupFromBase64(e,t)})}function m(e,t){return d(this,void 0,void 0,function*(){return(yield p).importProfilesFromArrayBuffer(e,t)})}function u(e){return d(this,void 0,void 0,function*(){return(yield p).importProfilesFromFile(e)})}function v(e){return d(this,void 0,void 0,function*(){return(yield p).importFromFileSystemDirectoryEntry(e)})}p.then(()=>{});const g=require("../../sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt");class w extends a.StatelessComponent{constructor(){super(...arguments),this.setTimeOrder=(()=>{this.props.setViewMode(n.ViewMode.CHRONO_FLAME_CHART)}),this.setLeftHeavyOrder=(()=>{this.props.setViewMode(n.ViewMode.LEFT_HEAVY_FLAME_GRAPH)}),this.setSandwichView=(()=>{this.props.setViewMode(n.ViewMode.SANDWICH_VIEW)})}renderLeftContent(){return this.props.activeProfileState?(0,e.h)("div",{className:(0,t.css)(y.toolbarLeft)},(0,e.h)("div",{className:(0,t.css)(y.toolbarTab,this.props.viewMode===n.ViewMode.CHRONO_FLAME_CHART&&y.toolbarTabActive),onClick:this.setTimeOrder},(0,e.h)("span",{className:(0,t.css)(y.emoji)},"🕰"),"Time Order"),(0,e.h)("div",{className:(0,t.css)(y.toolbarTab,this.props.viewMode===n.ViewMode.LEFT_HEAVY_FLAME_GRAPH&&y.toolbarTabActive),onClick:this.setLeftHeavyOrder},(0,e.h)("span",{className:(0,t.css)(y.emoji)},"⬅️"),"Left Heavy"),(0,e.h)("div",{className:(0,t.css)(y.toolbarTab,this.props.viewMode===n.ViewMode.SANDWICH_VIEW&&y.toolbarTabActive),onClick:this.setSandwichView},(0,e.h)("span",{className:(0,t.css)(y.emoji)},"🥪"),"Sandwich")):null}renderCenterContent(){const{activeProfileState:o,profileGroup:i}=this.props;if(o&&i){const{index:r}=o;if(1===i.profiles.length)return o.profile.getName();{function s(o,i,s){return(0,e.h)("button",{disabled:i,onClick:s,className:(0,t.css)(y.emoji,y.toolbarProfileNavButton,i&&y.toolbarProfileNavButtonDisabled)},o)}const n=s("⬅️",0===r,()=>this.props.setProfileIndexToView(r-1)),a=s("➡️",r>=i.profiles.length-1,()=>this.props.setProfileIndexToView(r+1));return(0,e.h)("div",{className:(0,t.css)(y.toolbarCenter)},n,o.profile.getName()," ",(0,e.h)("span",{className:(0,t.css)(y.toolbarProfileIndex)},"(",o.index+1,"/",i.profiles.length,")"),a)}}return"🔬speedscope"}renderRightContent(){const o=(0,e.h)("div",{className:(0,t.css)(y.toolbarTab),onClick:this.props.browseForFile},(0,e.h)("span",{className:(0,t.css)(y.emoji)},"⤵️"),"Import"),i=(0,e.h)("div",{className:(0,t.css)(y.toolbarTab)},(0,e.h)("a",{href:"https://github.com/jlfwong/speedscope#usage",className:(0,t.css)(y.noLinkStyle),target:"_blank"},(0,e.h)("span",{className:(0,t.css)(y.emoji)},"❓"),"Help"));return(0,e.h)("div",{className:(0,t.css)(y.toolbarRight)},this.props.activeProfileState&&(0,e.h)("div",{className:(0,t.css)(y.toolbarTab),onClick:this.props.saveFile},(0,e.h)("span",{className:(0,t.css)(y.emoji)},"⤴️"),"Export"),o,i)}render(){return(0,e.h)("div",{className:(0,t.css)(y.toolbar)},this.renderLeftContent(),this.renderCenterContent(),this.renderRightContent())}}exports.Toolbar=w;class b extends e.Component{constructor(){super(...arguments),this.canvas=null,this.ref=(e=>{e instanceof HTMLCanvasElement?this.canvas=e:this.canvas=null,this.props.setGLCanvas(this.canvas)}),this.container=null,this.containerRef=(e=>{e instanceof HTMLElement?this.container=e:this.container=null}),this.maybeResize=(()=>{if(!this.container)return;if(!this.props.canvasContext)return;let{width:e,height:t}=this.container.getBoundingClientRect();const o=e,i=t,s=e*window.devicePixelRatio,r=t*window.devicePixelRatio;this.props.canvasContext.gl.resize(s,r,o,i),this.props.canvasContext.gl.clear(new c.Graphics.Color(1,1,1,1))}),this.onWindowResize=(()=>{this.props.canvasContext&&this.props.canvasContext.requestFrame()})}componentWillReceiveProps(e){this.props.canvasContext!==e.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),e.canvasContext&&(e.canvasContext.addBeforeFrameHandler(this.maybeResize),e.canvasContext.requestFrame()))}componentDidMount(){window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),window.removeEventListener("resize",this.onWindowResize)}render(){return(0,e.h)("div",{ref:this.containerRef,className:(0,t.css)(y.glCanvasView)},(0,e.h)("canvas",{ref:this.ref,width:1,height:1}))}}exports.GLCanvas=b;class C extends a.StatelessComponent{constructor(){super(...arguments),this.loadExample=(()=>{this.loadProfile(()=>d(this,void 0,void 0,function*(){return yield h("perf-vertx-stacks-01-collapsed-all.txt",yield fetch(g).then(e=>e.text()))}))}),this.onDrop=(e=>{if(this.props.setDragActive(!1),e.preventDefault(),!e.dataTransfer)return;const t=e.dataTransfer.items[0];if("webkitGetAsEntry"in t){const e=t.webkitGetAsEntry();if(e.isDirectory&&e.name.endsWith(".trace"))return console.log("Importing as Instruments.app .trace file"),void this.loadProfile(()=>d(this,void 0,void 0,function*(){return yield v(e)}))}let o=e.dataTransfer.files.item(0);o&&this.loadFromFile(o)}),this.onDragOver=(e=>{this.props.setDragActive(!0),e.preventDefault()}),this.onDragLeave=(e=>{this.props.setDragActive(!1),e.preventDefault()}),this.onWindowKeyPress=(e=>d(this,void 0,void 0,function*(){if("1"===e.key)this.props.setViewMode(n.ViewMode.CHRONO_FLAME_CHART);else if("2"===e.key)this.props.setViewMode(n.ViewMode.LEFT_HEAVY_FLAME_GRAPH);else if("3"===e.key)this.props.setViewMode(n.ViewMode.SANDWICH_VIEW);else if("r"===e.key){const{flattenRecursion:e}=this.props;this.props.setFlattenRecursion(!e)}else if("n"===e.key){const{activeProfileState:e}=this.props;e&&this.props.setProfileIndexToView(e.index+1)}else if("p"===e.key){const{activeProfileState:e}=this.props;e&&this.props.setProfileIndexToView(e.index-1)}})),this.saveFile=(()=>{if(this.props.profileGroup){const{name:e,indexToView:t,profiles:o}=this.props.profileGroup,i={name:e,indexToView:t,profiles:o.map(e=>e.profile)};(0,r.saveToFile)(i)}}),this.browseForFile=(()=>{const e=document.createElement("input");e.type="file",e.addEventListener("change",this.onFileSelect),e.click()}),this.onWindowKeyDown=(e=>d(this,void 0,void 0,function*(){"s"===e.key&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),this.saveFile()):"o"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.browseForFile())})),this.onDocumentPaste=(e=>{e.preventDefault(),e.stopPropagation();const t=e.clipboardData;if(!t)return;const o=t.getData("text");this.loadProfile(()=>d(this,void 0,void 0,function*(){return yield h("From Clipboard",o)}))}),this.onFileSelect=(e=>{const t=e.target.files.item(0);t&&this.loadFromFile(t)})}loadProfile(e){return d(this,void 0,void 0,function*(){if(this.props.setLoading(!0),yield new Promise(e=>setTimeout(e,0)),!this.props.glCanvas)return;console.time("import");let t=null;try{t=yield e()}catch(e){return console.log("Failed to load format",e),void this.props.setError(!0)}if(null==t)return alert("Unrecognized format! See documentation about supported formats."),void this.props.setLoading(!1);if(0===t.profiles.length)return alert("Successfully imported profile, but it's empty!"),void this.props.setLoading(!1);this.props.hashParams.title&&(t=Object.assign({name:this.props.hashParams.title},t)),document.title=`${t.name} - speedscope`;for(let e of t.profiles)yield e.demangle();for(let e of t.profiles){const t=this.props.hashParams.title||e.getName();e.setName(t)}console.timeEnd("import"),this.props.setProfileGroup(t),this.props.setLoading(!1)})}loadFromFile(e){this.loadProfile(()=>d(this,void 0,void 0,function*(){const t=yield u(e);if(t){for(let o of t.profiles)o.getName()||o.setName(e.name);return t}if(this.props.profileGroup&&this.props.activeProfileState){const t=new FileReader,o=new Promise(e=>{t.addEventListener("loadend",()=>{if("string"!=typeof t.result)throw new Error("Expected reader.result to be a string");e(t.result)})});t.readAsText(e);const s=yield o,r=(0,i.importEmscriptenSymbolMap)(s);if(r){const{profile:e,index:t}=this.props.activeProfileState;return console.log("Importing as emscripten symbol map"),e.remapNames(e=>r.get(e)||e),{name:this.props.profileGroup.name||"profile",indexToView:t,profiles:[e]}}}return null}))}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyDown),window.addEventListener("keypress",this.onWindowKeyPress),document.addEventListener("paste",this.onDocumentPaste),this.maybeLoadHashParamProfile()}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyDown),window.removeEventListener("keypress",this.onWindowKeyPress),document.removeEventListener("paste",this.onDocumentPaste)}maybeLoadHashParamProfile(){return d(this,void 0,void 0,function*(){if(this.props.hashParams.profileURL){if(!n.canUseXHR)return void alert(`Cannot load a profile URL when loading from "${window.location.protocol}" URL protocol`);this.loadProfile(()=>d(this,void 0,void 0,function*(){const e=yield fetch(this.props.hashParams.profileURL);let t=new URL(this.props.hashParams.profileURL).pathname;return t.includes("/")&&(t=t.slice(t.lastIndexOf("/")+1)),yield m(t,yield e.arrayBuffer())}))}else if(this.props.hashParams.localProfilePath){window.speedscope={loadFileFromBase64:(e,t)=>{this.loadProfile(()=>f(e,t))}};const e=document.createElement("script");e.src=`file:///${this.props.hashParams.localProfilePath}`,document.head.appendChild(e)}})}renderLanding(){return(0,e.h)("div",{className:(0,t.css)(y.landingContainer)},(0,e.h)("div",{className:(0,t.css)(y.landingMessage)},(0,e.h)("p",{className:(0,t.css)(y.landingP)},"👋 Hi there! Welcome to 🔬speedscope, an interactive"," ",(0,e.h)("a",{className:(0,t.css)(y.link),href:"http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html"},"flamegraph")," ","visualizer. Use it to help you make your software faster."),n.canUseXHR?(0,e.h)("p",{className:(0,t.css)(y.landingP)},"Drag and drop a profile file onto this window to get started, click the big blue button below to browse for a profile to explore, or"," ",(0,e.h)("a",{tabIndex:0,className:(0,t.css)(y.link),onClick:this.loadExample},"click here")," ","to load an example profile."):(0,e.h)("p",{className:(0,t.css)(y.landingP)},"Drag and drop a profile file onto this window to get started, or click the big blue button below to browse for a profile to explore."),(0,e.h)("div",{className:(0,t.css)(y.browseButtonContainer)},(0,e.h)("input",{type:"file",name:"file",id:"file",onChange:this.onFileSelect,className:(0,t.css)(y.hide)}),(0,e.h)("label",{for:"file",className:(0,t.css)(y.browseButton),tabIndex:0},"Browse")),(0,e.h)("p",{className:(0,t.css)(y.landingP)},"See the"," ",(0,e.h)("a",{className:(0,t.css)(y.link),href:"https://github.com/jlfwong/speedscope#usage",target:"_blank"},"documentation")," ","for information about supported file formats, keyboard shortcuts, and how to navigate around the profile."),(0,e.h)("p",{className:(0,t.css)(y.landingP)},"speedscope is open source. Please"," ",(0,e.h)("a",{className:(0,t.css)(y.link),target:"_blank",href:"https://github.com/jlfwong/speedscope/issues"},"report any issues on GitHub"),".")))}renderError(){return(0,e.h)("div",{className:(0,t.css)(y.error)},(0,e.h)("div",null,"😿 Something went wrong."),(0,e.h)("div",null,"Check the JS console for more details."))}renderLoadingBar(){return(0,e.h)("div",{className:(0,t.css)(y.loading)})}renderContent(){const{viewMode:t,activeProfileState:o,error:i,loading:r,glCanvas:a}=this.props;if(i)return this.renderError();if(r)return this.renderLoadingBar();if(!o||!a)return this.renderLanding();switch(t){case n.ViewMode.CHRONO_FLAME_CHART:return(0,e.h)(l.ChronoFlamechartView,{activeProfileState:o,glCanvas:a});case n.ViewMode.LEFT_HEAVY_FLAME_GRAPH:return(0,e.h)(l.LeftHeavyFlamechartView,{activeProfileState:o,glCanvas:a});case n.ViewMode.SANDWICH_VIEW:return(0,e.h)(s.SandwichViewContainer,{activeProfileState:o,glCanvas:a})}}render(){return(0,e.h)("div",{onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,className:(0,t.css)(y.root,this.props.dragActive&&y.dragTargetRoot)},(0,e.h)(b,{setGLCanvas:this.props.setGLCanvas,canvasContext:this.props.canvasContext}),(0,e.h)(w,Object.assign({saveFile:this.saveFile,browseForFile:this.browseForFile},this.props)),(0,e.h)("div",{className:(0,t.css)(y.contentContainer)},this.renderContent()),this.props.dragActive&&(0,e.h)("div",{className:(0,t.css)(y.dragTarget)}))}}exports.Application=C;const y=t.StyleSheet.create({glCanvasView:{position:"absolute",width:"100vw",height:"100vh",zIndex:-1,pointerEvents:"none"},error:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},loading:{height:3,marginBottom:-3,background:o.Colors.DARK_BLUE,transformOrigin:"0% 50%",animationName:[{from:{transform:"scaleX(0)"},to:{transform:"scaleX(1)"}}],animationTimingFunction:"cubic-bezier(0, 1, 0, 1)",animationDuration:"30s"},root:{width:"100vw",height:"100vh",overflow:"hidden",display:"flex",flexDirection:"column",position:"relative",fontFamily:o.FontFamily.MONOSPACE,lineHeight:"20px"},dragTargetRoot:{cursor:"copy"},dragTarget:{boxSizing:"border-box",position:"absolute",top:0,left:0,width:"100%",height:"100%",border:`5px dashed ${o.Colors.DARK_BLUE}`,pointerEvents:"none"},contentContainer:{position:"relative",display:"flex",overflow:"hidden",flexDirection:"column",flex:1},landingContainer:{display:"flex",alignItems:"center",justifyContent:"center",flex:1},landingMessage:{maxWidth:600},landingP:{marginBottom:16},hide:{display:"none"},browseButtonContainer:{display:"flex",alignItems:"center",justifyContent:"center"},browseButton:{marginBottom:16,height:72,flex:1,maxWidth:256,textAlign:"center",fontSize:o.FontSize.BIG_BUTTON,lineHeight:"72px",background:o.Colors.DARK_BLUE,color:o.Colors.WHITE,transition:`all ${o.Duration.HOVER_CHANGE} ease-in`,":hover":{background:o.Colors.BRIGHT_BLUE}},link:{color:o.Colors.BRIGHT_BLUE,cursor:"pointer",textDecoration:"none"},toolbar:{height:o.Sizes.TOOLBAR_HEIGHT,flexShrink:0,background:o.Colors.BLACK,color:o.Colors.WHITE,textAlign:"center",fontFamily:o.FontFamily.MONOSPACE,fontSize:o.FontSize.TITLE,lineHeight:`${o.Sizes.TOOLBAR_TAB_HEIGHT}px`,userSelect:"none"},toolbarLeft:{position:"absolute",height:o.Sizes.TOOLBAR_HEIGHT,overflow:"hidden",top:0,left:0,marginRight:2,textAlign:"left"},toolbarCenter:{paddingTop:1,height:o.Sizes.TOOLBAR_HEIGHT},toolbarRight:{height:o.Sizes.TOOLBAR_HEIGHT,overflow:"hidden",position:"absolute",top:0,right:0,marginRight:2,textAlign:"right"},toolbarProfileIndex:{color:o.Colors.LIGHT_GRAY},toolbarProfileNavButton:{opacity:.8,fontSize:o.FontSize.TITLE,lineHeight:`${o.Sizes.TOOLBAR_TAB_HEIGHT}px`,":hover":{opacity:1},background:"none",border:"none",padding:0,marginLeft:"0.3em",marginRight:"0.3em",transition:`all ${o.Duration.HOVER_CHANGE} ease-in`},toolbarProfileNavButtonDisabled:{opacity:.5,":hover":{opacity:.5}},toolbarTab:{background:o.Colors.DARK_GRAY,marginTop:o.Sizes.SEPARATOR_HEIGHT,height:o.Sizes.TOOLBAR_TAB_HEIGHT,lineHeight:`${o.Sizes.TOOLBAR_TAB_HEIGHT}px`,paddingLeft:2,paddingRight:8,display:"inline-block",marginLeft:2,transition:`all ${o.Duration.HOVER_CHANGE} ease-in`,":hover":{background:o.Colors.GRAY}},toolbarTabActive:{background:o.Colors.BRIGHT_BLUE,":hover":{background:o.Colors.BRIGHT_BLUE}},noLinkStyle:{textDecoration:"none",color:"inherit"},emoji:{display:"inline-block",verticalAlign:"middle",paddingTop:"0px",marginRight:"0.3em"}}); +},{"preact":24,"aphrodite":68,"./style":79,"../lib/emscripten":81,"./sandwich-view":60,"../lib/file-format":83,"../store":29,"../lib/typed-redux":36,"./flamechart-view-container":62,"../gl/graphics":42,"_bundle_loader":66,"../import":[["import.a03c2bef.js",104],"import.a03c2bef.map",104],"../../sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt":64}],21:[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApplicationContainer=void 0;var e=require("../lib/typed-redux"),t=require("./application"),i=require("../store/getters"),o=require("../store/actions"),n=require("../gl/graphics");const r=exports.ApplicationContainer=(0,e.createContainer)(t.Application,(t,r)=>{const{flattenRecursion:s,profileGroup:a}=t;let l=null;if(a&&a.profiles.length>a.indexToView){const e=a.indexToView,t=a.profiles[e];l=Object.assign({},a.profiles[a.indexToView],{profile:(0,i.getProfileToView)({profile:t.profile,flattenRecursion:s}),index:a.indexToView})}function c(t){return(0,e.bindActionCreator)(r,t)}const p={setGLCanvas:c(o.actions.setGLCanvas),setLoading:c(o.actions.setLoading),setError:c(o.actions.setError),setProfileGroup:c(o.actions.setProfileGroup),setDragActive:c(o.actions.setDragActive),setViewMode:c(o.actions.setViewMode),setFlattenRecursion:c(o.actions.setFlattenRecursion),setProfileIndexToView:c(o.actions.setProfileIndexToView)};return Object.assign({activeProfileState:l,dispatch:r,canvasContext:t.glCanvas?(0,i.getCanvasContext)(t.glCanvas):null,resizeCanvas:(e,o,r,s)=>{if(t.glCanvas){const a=(0,i.getCanvasContext)(t.glCanvas).gl;a.resize(e,o,r,s),a.clear(new n.Graphics.Color(1,1,1,1))}}},p,t)}); +},{"../lib/typed-redux":36,"./application":34,"../store/getters":38,"../store/actions":40,"../gl/graphics":42}],13:[function(require,module,exports) { +"use strict";var e=require("preact"),o=require("./store"),t=require("preact-redux"),r=require("./views/application-container");console.log(`speedscope v${require("../package.json").version}`),module.hot&&(module.hot.dispose(()=>{(0,e.render)((0,e.h)("div",null),document.body,document.body.lastElementChild||void 0)}),module.hot.accept());const i=window.store,d=(0,o.createApplicationStore)(i?i.getState():{});window.store=d,(0,e.render)((0,e.h)(t.Provider,{store:d},(0,e.h)(r.ApplicationContainer,null)),document.body,document.body.lastElementChild||void 0); +},{"preact":24,"./store":29,"preact-redux":26,"./views/application-container":21,"../package.json":19}],215:[function(require,module,exports) { +module.exports=function(n){return new Promise(function(e,o){var r=document.createElement("script");r.async=!0,r.type="text/javascript",r.charset="utf-8",r.src=n,r.onerror=function(n){r.onerror=r.onload=null,o(n)},r.onload=function(){r.onerror=r.onload=null,e()},document.getElementsByTagName("head")[0].appendChild(r)})}; +},{}],0:[function(require,module,exports) { +var b=require(66);b.register("js",require(215)); +},{}]},{},[0,13], null) +//# sourceMappingURL=speedscope.9ee942dd.map \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/css/main.388a904b.css b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/css/main.388a904b.css new file mode 100644 index 0000000000000000000000000000000000000000..a74aee3b1d506413776008db558c799a95187a6f --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/css/main.388a904b.css @@ -0,0 +1,2 @@ +@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:100;src:local("Roboto Thin "),local("Roboto-Thin"),url(../../static/media/roboto-latin-100.c2aa4ab115bf9c6057cb.woff2) format("woff2"),url(../../static/media/roboto-latin-100.a45108d3b34af91f9113.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:100;src:local("Roboto Thin italic"),local("Roboto-Thinitalic"),url(../../static/media/roboto-latin-100italic.7f839a8652da29745ce4.woff2) format("woff2"),url(../../static/media/roboto-latin-100italic.451d4e559d6f57cdf6a1.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:300;src:local("Roboto Light "),local("Roboto-Light"),url(../../static/media/roboto-latin-300.37a7069dc30fc663c878.woff2) format("woff2"),url(../../static/media/roboto-latin-300.865f928cbabcc9f8f2b5.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:300;src:local("Roboto Light italic"),local("Roboto-Lightitalic"),url(../../static/media/roboto-latin-300italic.c64e7e354c88e613c77c.woff2) format("woff2"),url(../../static/media/roboto-latin-300italic.bd5b7a13f2c52b531a2a.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:400;src:local("Roboto Regular "),local("Roboto-Regular"),url(../../static/media/roboto-latin-400.176f8f5bd5f02b3abfcf.woff2) format("woff2"),url(../../static/media/roboto-latin-400.49ae34d4cc6b98c00c69.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:400;src:local("Roboto Regular italic"),local("Roboto-Regularitalic"),url(../../static/media/roboto-latin-400italic.d022bc70dc1bf7b3425d.woff2) format("woff2"),url(../../static/media/roboto-latin-400italic.b1d9d9904bfca8802a63.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:500;src:local("Roboto Medium "),local("Roboto-Medium"),url(../../static/media/roboto-latin-500.f5b74d7ffcdf85b9dd60.woff2) format("woff2"),url(../../static/media/roboto-latin-500.cea99d3e3e13a3a599a0.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:500;src:local("Roboto Medium italic"),local("Roboto-Mediumitalic"),url(../../static/media/roboto-latin-500italic.0d8bb5b3ee5f5dac9e44.woff2) format("woff2"),url(../../static/media/roboto-latin-500italic.18d00f739ff1e1c52db1.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:700;src:local("Roboto Bold "),local("Roboto-Bold"),url(../../static/media/roboto-latin-700.c18ee39fb002ad58b6dc.woff2) format("woff2"),url(../../static/media/roboto-latin-700.2267169ee7270a22a963.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:700;src:local("Roboto Bold italic"),local("Roboto-Bolditalic"),url(../../static/media/roboto-latin-700italic.7d8125ff7f707231fd89.woff2) format("woff2"),url(../../static/media/roboto-latin-700italic.9360531f9bb817f917f0.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:900;src:local("Roboto Black "),local("Roboto-Black"),url(../../static/media/roboto-latin-900.870c8c1486f76054301a.woff2) format("woff2"),url(../../static/media/roboto-latin-900.bac8362e7a6ea60b6983.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:900;src:local("Roboto Black italic"),local("Roboto-Blackitalic"),url(../../static/media/roboto-latin-900italic.cb5ad999740e9d8a8bd1.woff2) format("woff2"),url(../../static/media/roboto-latin-900italic.c20d916c1a1b094c1cec.woff) format("woff")}.hljs-dark{color:#f8f8f2;display:block;overflow-x:auto;padding:.5em}.hljs-dark .hljs-keyword,.hljs-dark .hljs-link,.hljs-dark .hljs-literal,.hljs-dark .hljs-number,.hljs-dark .hljs-section,.hljs-dark .hljs-selector-tag{color:#8be9fd}.hljs-dark .hljs-function .hljs-keyword{color:#ff79c6}.hljs-dark .hljs-addition,.hljs-dark .hljs-attribute,.hljs-dark .hljs-bullet,.hljs-dark .hljs-name,.hljs-dark .hljs-string,.hljs-dark .hljs-symbol,.hljs-dark .hljs-template-tag,.hljs-dark .hljs-template-variable,.hljs-dark .hljs-title,.hljs-dark .hljs-type,.hljs-dark .hljs-variable{color:#f1fa8c}.hljs-dark .hljs-comment,.hljs-dark .hljs-deletion,.hljs-dark .hljs-meta,.hljs-dark .hljs-quote{color:#6272a4}.hljs-dark .hljs-doctag,.hljs-dark .hljs-keyword,.hljs-dark .hljs-literal,.hljs-dark .hljs-name,.hljs-dark .hljs-section,.hljs-dark .hljs-selector-tag,.hljs-dark .hljs-strong,.hljs-dark .hljs-title,.hljs-dark .hljs-type{font-weight:700}.hljs-dark .hljs-emphasis{font-style:italic}.hljs-light{color:#333;display:block;overflow-x:auto;padding:.5em}.hljs-light .hljs-comment,.hljs-light .hljs-quote{color:#998;font-style:italic}.hljs-light .hljs-keyword,.hljs-light .hljs-selector-tag,.hljs-light .hljs-subst{color:#333;font-weight:700}.hljs-light .hljs-literal,.hljs-light .hljs-number,.hljs-light .hljs-tag .hljs-attr,.hljs-light .hljs-template-variable,.hljs-light .hljs-variable{color:teal}.hljs-light .hljs-doctag,.hljs-light .hljs-string{color:#d14}.hljs-light .hljs-section,.hljs-light .hljs-selector-id,.hljs-light .hljs-title{color:#900;font-weight:700}.hljs-light .hljs-subst{font-weight:400}.hljs-light .hljs-class .hljs-title,.hljs-light .hljs-type{color:#458;font-weight:700}.hljs-light .hljs-attribute,.hljs-light .hljs-name,.hljs-light .hljs-tag{color:navy;font-weight:400}.hljs-light .hljs-link,.hljs-light .hljs-regexp{color:#009926}.hljs-light .hljs-bullet,.hljs-light .hljs-symbol{color:#990073}.hljs-light .hljs-built_in,.hljs-light .hljs-builtin-name{color:#0086b3}.hljs-light .hljs-meta{color:#999;font-weight:700}.hljs-light .hljs-deletion{background:#fdd}.hljs-light .hljs-addition{background:#dfd}.hljs-light .hljs-emphasis{font-style:italic}.hljs-light .hljs-strong{font-weight:700}span.find-kws{background-color:#ffd800} +/*# sourceMappingURL=main.388a904b.css.map*/ \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/css/main.388a904b.css.map b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/css/main.388a904b.css.map new file mode 100644 index 0000000000000000000000000000000000000000..704ad10ed26462dfc09a495f395727d58e9358e5 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/css/main.388a904b.css.map @@ -0,0 +1 @@ +{"version":3,"file":"static/css/main.388a904b.css","mappings":"AACA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,oNAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,4OAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,sNAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,8OAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,0NAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,kPAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,wNAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,gPAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,oNAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,4OAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,sNAKF,CAGA,WAGE,iBAAkB,CAFlB,kBAAqB,CACrB,iBAAkB,CAElB,eAAgB,CAChB,8OAKF,CCjJA,WAIE,aAAc,CAHd,aAAc,CACd,eAAgB,CAChB,YAEF,CACA,uJAME,aACF,CACA,wCACE,aACF,CACA,2RAWE,aACF,CACA,gGAIE,aACF,CACA,4NASE,eACF,CACA,0BACE,iBACF,CCtDA,YAIE,UAAW,CAHX,aAAc,CACd,eAAgB,CAChB,YAEF,CAEA,kDAEE,UAAW,CACX,iBACF,CAEA,iFAGE,UAAW,CACX,eACF,CAEA,mJAKE,UACF,CAEA,kDAEE,UACF,CAEA,gFAGE,UAAW,CACX,eACF,CAEA,wBACE,eACF,CAEA,2DAEE,UAAW,CACX,eACF,CAEA,yEAGE,UAAc,CACd,eACF,CAEA,gDAEE,aACF,CAEA,kDAEE,aACF,CAEA,0DAEE,aACF,CAEA,uBACE,UAAW,CACX,eACF,CAEA,2BACE,eACF,CAEA,2BACE,eACF,CAEA,2BACE,iBACF,CAEA,yBACE,eACF,CC/FA,cACE,wBACF","sources":["../node_modules/typeface-roboto/index.css","components/LogView/darcula.css","components/LogView/github.css","components/LogView/index.css"],"sourcesContent":["/* roboto-100normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 100;\n src:\n local('Roboto Thin '),\n local('Roboto-Thin'),\n url('./files/roboto-latin-100.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-100.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-100italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 100;\n src:\n local('Roboto Thin italic'),\n local('Roboto-Thinitalic'),\n url('./files/roboto-latin-100italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-100italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-300normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src:\n local('Roboto Light '),\n local('Roboto-Light'),\n url('./files/roboto-latin-300.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-300.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-300italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 300;\n src:\n local('Roboto Light italic'),\n local('Roboto-Lightitalic'),\n url('./files/roboto-latin-300italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-300italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-400normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src:\n local('Roboto Regular '),\n local('Roboto-Regular'),\n url('./files/roboto-latin-400.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-400.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-400italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 400;\n src:\n local('Roboto Regular italic'),\n local('Roboto-Regularitalic'),\n url('./files/roboto-latin-400italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-400italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-500normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 500;\n src:\n local('Roboto Medium '),\n local('Roboto-Medium'),\n url('./files/roboto-latin-500.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-500.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-500italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 500;\n src:\n local('Roboto Medium italic'),\n local('Roboto-Mediumitalic'),\n url('./files/roboto-latin-500italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-500italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-700normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src:\n local('Roboto Bold '),\n local('Roboto-Bold'),\n url('./files/roboto-latin-700.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-700.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-700italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 700;\n src:\n local('Roboto Bold italic'),\n local('Roboto-Bolditalic'),\n url('./files/roboto-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-700italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-900normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 900;\n src:\n local('Roboto Black '),\n local('Roboto-Black'),\n url('./files/roboto-latin-900.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-900.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-900italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 900;\n src:\n local('Roboto Black italic'),\n local('Roboto-Blackitalic'),\n url('./files/roboto-latin-900italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-900italic.woff') format('woff'); /* Modern Browsers */\n}\n\n","/*\nDracula Theme v1.2.0\nhttps://github.com/zenorocha/dracula-theme\nCopyright 2015, All rights reserved\nCode licensed under the MIT license\nhttp://zenorocha.mit-license.org\n@author Éverton Ribeiro \n@author Zeno Rocha \n*/\n.hljs-dark {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n color: #f8f8f2;\n}\n.hljs-dark .hljs-number,\n.hljs-dark .hljs-keyword,\n.hljs-dark .hljs-selector-tag,\n.hljs-dark .hljs-literal,\n.hljs-dark .hljs-section,\n.hljs-dark .hljs-link {\n color: #8be9fd;\n}\n.hljs-dark .hljs-function .hljs-keyword {\n color: #ff79c6;\n}\n.hljs-dark .hljs-string,\n.hljs-dark .hljs-title,\n.hljs-dark .hljs-name,\n.hljs-dark .hljs-type,\n.hljs-dark .hljs-attribute,\n.hljs-dark .hljs-symbol,\n.hljs-dark .hljs-bullet,\n.hljs-dark .hljs-addition,\n.hljs-dark .hljs-variable,\n.hljs-dark .hljs-template-tag,\n.hljs-dark .hljs-template-variable {\n color: #f1fa8c;\n}\n.hljs-dark .hljs-comment,\n.hljs-dark .hljs-quote,\n.hljs-dark .hljs-deletion,\n.hljs-dark .hljs-meta {\n color: #6272a4;\n}\n.hljs-dark .hljs-keyword,\n.hljs-dark .hljs-selector-tag,\n.hljs-dark .hljs-literal,\n.hljs-dark .hljs-title,\n.hljs-dark .hljs-section,\n.hljs-dark .hljs-doctag,\n.hljs-dark .hljs-type,\n.hljs-dark .hljs-name,\n.hljs-dark .hljs-strong {\n font-weight: bold;\n}\n.hljs-dark .hljs-emphasis {\n font-style: italic;\n}\n","/*\ngithub.com style (c) Vasily Polovnyov \n*/\n\n.hljs-light {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n color: #333;\n}\n\n.hljs-light .hljs-comment,\n.hljs-light .hljs-quote {\n color: #998;\n font-style: italic;\n}\n\n.hljs-light .hljs-keyword,\n.hljs-light .hljs-selector-tag,\n.hljs-light .hljs-subst {\n color: #333;\n font-weight: bold;\n}\n\n.hljs-light .hljs-number,\n.hljs-light .hljs-literal,\n.hljs-light .hljs-variable,\n.hljs-light .hljs-template-variable,\n.hljs-light .hljs-tag .hljs-attr {\n color: #008080;\n}\n\n.hljs-light .hljs-string,\n.hljs-light .hljs-doctag {\n color: #d14;\n}\n\n.hljs-light .hljs-title,\n.hljs-light .hljs-section,\n.hljs-light .hljs-selector-id {\n color: #900;\n font-weight: bold;\n}\n\n.hljs-light .hljs-subst {\n font-weight: normal;\n}\n\n.hljs-light .hljs-type,\n.hljs-light .hljs-class .hljs-title {\n color: #458;\n font-weight: bold;\n}\n\n.hljs-light .hljs-tag,\n.hljs-light .hljs-name,\n.hljs-light .hljs-attribute {\n color: #000080;\n font-weight: normal;\n}\n\n.hljs-light .hljs-regexp,\n.hljs-light .hljs-link {\n color: #009926;\n}\n\n.hljs-light .hljs-symbol,\n.hljs-light .hljs-bullet {\n color: #990073;\n}\n\n.hljs-light .hljs-built_in,\n.hljs-light .hljs-builtin-name {\n color: #0086b3;\n}\n\n.hljs-light .hljs-meta {\n color: #999;\n font-weight: bold;\n}\n\n.hljs-light .hljs-deletion {\n background: #fdd;\n}\n\n.hljs-light .hljs-addition {\n background: #dfd;\n}\n\n.hljs-light .hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-light .hljs-strong {\n font-weight: bold;\n}\n","span.find-kws {\n background-color: #ffd800;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/495.01ff0983.chunk.js b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/495.01ff0983.chunk.js new file mode 100644 index 0000000000000000000000000000000000000000..dfd18248aea135f02d94fe817908e74635bf2a6b --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/495.01ff0983.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkray_dashboard_client=self.webpackChunkray_dashboard_client||[]).push([[495],{6495:(a,d,s)=>{s.r(d),s.d(d,{default:()=>h});var e=s(697),r=(s(2791),s(9903)),c=s(184);const h=()=>(0,c.jsx)(e.Z,{sx:{padding:2,width:"100%",backgroundColor:"white"},children:(0,c.jsx)(r.Z,{})})}}]); +//# sourceMappingURL=495.01ff0983.chunk.js.map \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/495.01ff0983.chunk.js.map b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/495.01ff0983.chunk.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c87650c8e4858e03b28b9e2fa8bed771251eec11 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/495.01ff0983.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/495.01ff0983.chunk.js","mappings":"mMAOA,MAcA,EAde,KAEX,SAAC,IAAG,CACFA,GAAI,CACFC,QAAS,EACTC,MAAO,OACPC,gBAAiB,SACjB,UAEF,SAAC,IAAS,K","sources":["pages/actor/index.tsx"],"sourcesContent":["import { Box } from \"@mui/material\";\nimport React from \"react\";\nimport ActorList from \"./ActorList\";\n\n/**\n * Represent the standalone actors page.\n */\nconst Actors = () => {\n return (\n \n \n \n );\n};\n\nexport default Actors;\n"],"names":["sx","padding","width","backgroundColor"],"sourceRoot":""} \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/591.222f4f03.chunk.js b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/591.222f4f03.chunk.js new file mode 100644 index 0000000000000000000000000000000000000000..9de2990460668cbd35f910e72243d2d790452319 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/591.222f4f03.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkray_dashboard_client=self.webpackChunkray_dashboard_client||[]).push([[591],{2591:(a,t,c)=>{c.r(t),c.d(t,{default:()=>j});var e=c(697),s=c(1889),i=c(8406),n=c(4387),d=c(4518),l=c(2791),r=c(7689),p=c(1035),u=c(359),o=c(4569),g=c.n(o);var h=c(184);const j=()=>{const{cmd:a,ip:t,pid:c}=(0,r.UO)(),[o,j]=(0,l.useState)(),[m,x]=(0,l.useState)("gcutil"),k=(0,l.useCallback)((()=>((a,t,c)=>g().get("utils/jstat",{params:{ip:a,pid:t,options:c}}))(t,c,m).then((a=>{a.data.result?j(a.data.data.output):j(a.data.msg)})).catch((a=>j(a.toString())))),[t,c,m]);return(0,l.useEffect)((()=>{switch(a){case"jstack":((a,t)=>g().get("utils/jstack",{params:{ip:a,pid:t}}))(t,c).then((a=>{a.data.result?j(a.data.data.output):j(a.data.msg)})).catch((a=>j(a.toString())));break;case"jmap":((a,t)=>g().get("utils/jmap",{params:{ip:a,pid:t}}))(t,c).then((a=>{a.data.result?j(a.data.data.output):j(a.data.msg)})).catch((a=>j(a.toString())));break;case"jstat":k();break;default:j("Command ".concat(a," is not supported."))}}),[a,k,t,c]),(0,h.jsxs)(e.Z,{sx:{padding:4,width:"100%"},children:[(0,h.jsx)(u.Z,{title:a,children:"jstat"===a&&(0,h.jsx)(e.Z,{sx:{padding:2,marginTop:2},children:(0,h.jsxs)(s.ZP,{container:!0,spacing:1,children:[(0,h.jsx)(s.ZP,{item:!0,children:(0,h.jsx)(i.Z,{value:m,onChange:a=>x(a.target.value),children:["class","compiler","gc","gccapacity","gcmetacapacity","gcnew","gcnewcapacity","gcold","gcoldcapacity","gcutil","gccause","printcompilation"].map((a=>(0,h.jsx)(n.Z,{value:a,children:a})))})}),(0,h.jsx)(s.ZP,{item:!0,children:(0,h.jsx)(d.Z,{onClick:k,children:"Execute"})})]})})}),(0,h.jsx)(u.Z,{title:"IP: ".concat(t," / Pid: ").concat(c),children:(0,h.jsx)(p.Z,{content:o||"loading",language:"prolog",height:800})})]})}}}]); +//# sourceMappingURL=591.222f4f03.chunk.js.map \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/591.222f4f03.chunk.js.map b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/591.222f4f03.chunk.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a31d0a214339d5e7565cb6f690e57caebf405730 --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/591.222f4f03.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/591.222f4f03.chunk.js","mappings":"qRAOA,MAsGA,EAtGkB,KAChB,MAAM,IAAEA,EAAG,GAAEC,EAAE,IAAEC,IAAQC,EAAAA,EAAAA,OAKlBC,EAAQC,IAAaC,EAAAA,EAAAA,aACrBC,EAAQC,IAAaF,EAAAA,EAAAA,UAAS,UAC/BG,GAAeC,EAAAA,EAAAA,cACnB,ICYoB,EAACT,EAAYC,EAAaS,IACzCC,IAAAA,IAAkB,cAAe,CACtCC,OAAQ,CACNZ,KACAC,MACAS,aDhBAG,CAASb,EAAIC,EAAKK,GACfQ,MAAMC,IACDA,EAAIC,KAAKb,OACXC,EAAUW,EAAIC,KAAKA,KAAKC,QAExBb,EAAUW,EAAIC,KAAKE,IACrB,IAEDC,OAAOC,GAAQhB,EAAUgB,EAAIC,eAClC,CAACrB,EAAIC,EAAKK,IAoCZ,OAjCAgB,EAAAA,EAAAA,YAAU,KACR,OAAQvB,GACN,IAAK,SCrBc,EAACC,EAAYC,IAC7BU,IAAAA,IAAkB,eAAgB,CACvCC,OAAQ,CACNZ,KACAC,SDkBEsB,CAAUvB,EAAIC,GACXa,MAAMC,IACDA,EAAIC,KAAKb,OACXC,EAAUW,EAAIC,KAAKA,KAAKC,QAExBb,EAAUW,EAAIC,KAAKE,IACrB,IAEDC,OAAOC,GAAQhB,EAAUgB,EAAIC,cAChC,MACF,IAAK,OCvBY,EAACrB,EAAYC,IAC3BU,IAAAA,IAAkB,aAAc,CACrCC,OAAQ,CACNZ,KACAC,SDoBEuB,CAAQxB,EAAIC,GACTa,MAAMC,IACDA,EAAIC,KAAKb,OACXC,EAAUW,EAAIC,KAAKA,KAAKC,QAExBb,EAAUW,EAAIC,KAAKE,IACrB,IAEDC,OAAOC,GAAQhB,EAAUgB,EAAIC,cAChC,MACF,IAAK,QACHb,IACA,MACF,QACEJ,EAAU,WAAD,OAAYL,EAAG,uBAClB,GAET,CAACA,EAAKS,EAAcR,EAAIC,KAGzB,UAACwB,EAAA,EAAG,CAACC,GAAI,CAAEC,QAAS,EAAGC,MAAO,QAAS,WACrC,SAACC,EAAA,EAAS,CAACC,MAAO/B,EAAI,SACX,UAARA,IACC,SAAC0B,EAAA,EAAG,CAACC,GAAI,CAAEC,QAAS,EAAGI,UAAW,GAAI,UACpC,UAACC,EAAA,GAAI,CAACC,WAAS,EAACC,QAAS,EAAE,WACzB,SAACF,EAAA,GAAI,CAACG,MAAI,YACR,SAACC,EAAA,EAAM,CACLC,MAAO/B,EACPgC,SAAWC,GAAMhC,EAAUgC,EAAEC,OAAOH,OAAiB,SAEpD,CACC,QACA,WACA,KACA,aACA,iBACA,QACA,gBACA,QACA,gBACA,SACA,UACA,oBACAI,KAAKF,IACL,SAACG,EAAA,EAAQ,CAACL,MAAOE,EAAE,SAAEA,WAI3B,SAACP,EAAA,GAAI,CAACG,MAAI,YACR,SAACQ,EAAA,EAAM,CAACC,QAASpC,EAAa,+BAMxC,SAACqB,EAAA,EAAS,CAACC,MAAK,cAAS9B,EAAE,mBAAWC,GAAM,UAC1C,SAAC4C,EAAA,EAAc,CACbC,QAAS3C,GAAU,UACnB4C,SAAS,SACTC,OAAQ,UAGR,C","sources":["pages/cmd/CMDResult.tsx","service/util.ts"],"sourcesContent":["import { Box, Button, Grid, MenuItem, Select } from \"@mui/material\";\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport { useParams } from \"react-router-dom\";\nimport LogVirtualView from \"../../components/LogView/LogVirtualView\";\nimport TitleCard from \"../../components/TitleCard\";\nimport { getJmap, getJstack, getJstat } from \"../../service/util\";\n\nconst CMDResult = () => {\n const { cmd, ip, pid } = useParams() as {\n cmd: string;\n ip: string;\n pid: string;\n };\n const [result, setResult] = useState();\n const [option, setOption] = useState(\"gcutil\");\n const executeJstat = useCallback(\n () =>\n getJstat(ip, pid, option)\n .then((rsp) => {\n if (rsp.data.result) {\n setResult(rsp.data.data.output);\n } else {\n setResult(rsp.data.msg);\n }\n })\n .catch((err) => setResult(err.toString())),\n [ip, pid, option],\n );\n\n useEffect(() => {\n switch (cmd) {\n case \"jstack\":\n getJstack(ip, pid)\n .then((rsp) => {\n if (rsp.data.result) {\n setResult(rsp.data.data.output);\n } else {\n setResult(rsp.data.msg);\n }\n })\n .catch((err) => setResult(err.toString()));\n break;\n case \"jmap\":\n getJmap(ip, pid)\n .then((rsp) => {\n if (rsp.data.result) {\n setResult(rsp.data.data.output);\n } else {\n setResult(rsp.data.msg);\n }\n })\n .catch((err) => setResult(err.toString()));\n break;\n case \"jstat\":\n executeJstat();\n break;\n default:\n setResult(`Command ${cmd} is not supported.`);\n break;\n }\n }, [cmd, executeJstat, ip, pid]);\n\n return (\n \n \n {cmd === \"jstat\" && (\n \n \n \n setOption(e.target.value as string)}\n >\n {[\n \"class\",\n \"compiler\",\n \"gc\",\n \"gccapacity\",\n \"gcmetacapacity\",\n \"gcnew\",\n \"gcnewcapacity\",\n \"gcold\",\n \"gcoldcapacity\",\n \"gcutil\",\n \"gccause\",\n \"printcompilation\",\n ].map((e) => (\n {e}\n ))}\n \n \n \n \n \n \n \n )}\n \n \n \n \n \n );\n};\n\nexport default CMDResult;\n","import axios from \"axios\";\n\ntype CMDRsp = {\n result: boolean;\n msg: string;\n data: {\n output: string;\n };\n};\n\nexport const getJstack = (ip: string, pid: string) => {\n return axios.get(\"utils/jstack\", {\n params: {\n ip,\n pid,\n },\n });\n};\n\nexport const getJmap = (ip: string, pid: string) => {\n return axios.get(\"utils/jmap\", {\n params: {\n ip,\n pid,\n },\n });\n};\n\nexport const getJstat = (ip: string, pid: string, options: string) => {\n return axios.get(\"utils/jstat\", {\n params: {\n ip,\n pid,\n options,\n },\n });\n};\n\ntype NamespacesRsp = {\n result: boolean;\n msg: string;\n data: {\n namespaces: {\n namespaceId: string;\n hostNameList: string[];\n }[];\n };\n};\n\nexport const getNamespaces = () => {\n return axios.get(\"namespaces\");\n};\n"],"names":["cmd","ip","pid","useParams","result","setResult","useState","option","setOption","executeJstat","useCallback","options","axios","params","getJstat","then","rsp","data","output","msg","catch","err","toString","useEffect","getJstack","getJmap","Box","sx","padding","width","TitleCard","title","marginTop","Grid","container","spacing","item","Select","value","onChange","e","target","map","MenuItem","Button","onClick","LogVirtualView","content","language","height"],"sourceRoot":""} \ No newline at end of file diff --git a/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/main.b3a3eb48.js b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/main.b3a3eb48.js new file mode 100644 index 0000000000000000000000000000000000000000..5a6325f2dedb09d0727b1a12d33ccc2ce76da04c --- /dev/null +++ b/tool_server/.venv/lib/python3.12/site-packages/ray/dashboard/client/build/static/js/main.b3a3eb48.js @@ -0,0 +1,3 @@ +/*! For license information please see main.b3a3eb48.js.LICENSE.txt */ +(()=>{var e={7262:(e,t,n)=>{"use strict";n.d(t,{k:()=>vs,Z:()=>bs});var r=n(7462),o=n(2791),a=n(1402),i=n(6199),s=n(184);const l=(e,t)=>(0,r.Z)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),c=e=>(0,r.Z)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}});const u=function(e){const t=(0,a.Z)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:u=!1}=t;return(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(i.Z,{styles:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n;const o={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach((t=>{let[n,r]=t;var a;o[e.getColorSchemeSelector(n).replace(/\s*&/,"")]={colorScheme:null==(a=r.palette)?void 0:a.mode}}));let a=(0,r.Z)({html:l(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,r.Z)({margin:0},c(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},o);const i=null==(n=e.components)||null==(n=n.MuiCssBaseline)?void 0:n.styleOverrides;return i&&(a=[a,i]),a}(e,u)}),n]})};var d=n(2564),p=n(3361);let f;function h(e){const{injectFirst:t,children:n}=e;return t&&f?(0,s.jsx)(d.C,{value:f,children:n}):n}"object"===typeof document&&(f=(0,p.Z)({key:"css",prepend:!0}));var m=n(3366);const g=o.createContext(null);function v(){return o.useContext(g)}const b="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const y=function(e){const{children:t,theme:n}=e,a=v(),i=o.useMemo((()=>{const e=null===a?n:function(e,t){if("function"===typeof t)return t(e);return(0,r.Z)({},e,t)}(a,n);return null!=e&&(e[b]=null!==a),e}),[n,a]);return(0,s.jsx)(g.Provider,{value:i,children:t})};var x=n(9120);const w={};function _(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return o.useMemo((()=>{const o=e&&t[e]||t;if("function"===typeof n){const i=n(o),s=e?(0,r.Z)({},t,{[e]:i}):i;return a?()=>s:s}return e?(0,r.Z)({},t,{[e]:n}):(0,r.Z)({},t,n)}),[e,t,n,a])}const S=function(e){const{children:t,theme:n,themeId:r}=e,o=(0,x.Z)(w),a=v()||w,i=_(r,o,n),l=_(r,a,n,!0);return(0,s.jsx)(y,{theme:l,children:(0,s.jsx)(d.T.Provider,{value:i,children:t})})};var k=n(988);const j=["theme"];function Z(e){let{theme:t}=e,n=(0,m.Z)(e,j);const o=t[k.Z];return(0,s.jsx)(S,(0,r.Z)({},n,{themeId:o?k.Z:void 0,theme:o||t}))}var E=n(7892),C=n.n(E),N=n(3666),I=n.n(N),A=n(1087),P=n(7689),O=n(697),T=n(7273),R=n(890),M={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},L=o.createContext&&o.createContext(M),D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{let{title:n,expanded:r,onExpandButtonClick:a,startExpanded:i=!1,className:l,children:c,keepRendered:u,icon:d,sx:p}=e;const[f,h]=(0,o.useState)(i),m=void 0!==r?r:f;return(0,s.jsxs)(O.Z,{ref:t,className:l,sx:p,children:[(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,s.jsxs)(R.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",fontWeight:500,cursor:"pointer",marginRight:1},variant:"h4",onClick:()=>{null===a||void 0===a||a(),h(!m)},children:[m?(0,s.jsx)(O.Z,{component:ee,sx:{marginRight:1,width:24,height:24}}):(0,s.jsx)(O.Z,{component:ne,sx:{marginRight:1,width:24,height:24}}),n]}),d]}),(0,s.jsx)(pe,{visible:m,keepRendered:u,children:c})]})})),pe=e=>{let{visible:t,keepRendered:n,children:r}=e;const[a,i]=(0,o.useState)(t);return(0,o.useEffect)((()=>{t&&i(!0)}),[t]),t||n&&a?(0,s.jsx)(O.Z,{sx:{marginTop:1,display:t?"block":"none"},children:r}):null};var fe=n(7052),he=n(8260),me=n(2515),ge=n(4520),ve=n(5527);const be=e=>{let{title:t,children:n,className:r,noTopPadding:o=!1,...a}=e;return(0,s.jsxs)(O.Z,{className:r,...a,children:[t&&(0,s.jsx)(O.Z,{paddingBottom:2,children:(0,s.jsx)(R.Z,{variant:"h4",children:t})}),(0,s.jsx)(ve.Z,{variant:"outlined",sx:{padding:2,height:"100%",paddingTop:o?0:void 0},children:n})]})};var ye=n(168),xe=n(9278),we=n(4419),_e=n(2554),Se=n(4036),ke=n(6934),je=n(5878),Ze=n(1217);function Ee(e){return(0,Ze.ZP)("MuiCircularProgress",e)}(0,je.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var Ce,Ne,Ie,Ae;const Pe=["className","color","disableShrink","size","style","thickness","value","variant"];let Oe,Te,Re,Me;const Le=44,De=(0,_e.F4)(Oe||(Oe=Ce||(Ce=(0,ye.Z)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),ze=(0,_e.F4)(Te||(Te=Ne||(Ne=(0,ye.Z)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),Fe=(0,ke.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,Se.Z)(n.color))]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.Z)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,_e.iv)(Re||(Re=Ie||(Ie=(0,ye.Z)(["\n animation: "," 1.4s linear infinite;\n "]))),De)})),Be=(0,ke.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Ue=(0,ke.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,Se.Z)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.Z)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,_e.iv)(Me||(Me=Ae||(Ae=(0,ye.Z)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),ze)})),We=o.forwardRef((function(e,t){const n=(0,a.Z)({props:e,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:l=!1,size:c=40,style:u,thickness:d=3.6,value:p=0,variant:f="indeterminate"}=n,h=(0,m.Z)(n,Pe),g=(0,r.Z)({},n,{color:i,disableShrink:l,size:c,thickness:d,value:p,variant:f}),v=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,a={root:["root",n,"color".concat((0,Se.Z)(r))],svg:["svg"],circle:["circle","circle".concat((0,Se.Z)(n)),o&&"circleDisableShrink"]};return(0,we.Z)(a,Ee,t)})(g),b={},y={},x={};if("determinate"===f){const e=2*Math.PI*((Le-d)/2);b.strokeDasharray=e.toFixed(3),x["aria-valuenow"]=Math.round(p),b.strokeDashoffset="".concat(((100-p)/100*e).toFixed(3),"px"),y.transform="rotate(-90deg)"}return(0,s.jsx)(Fe,(0,r.Z)({className:(0,xe.Z)(v.root,o),style:(0,r.Z)({width:c,height:c},y,u),ownerState:g,ref:t,role:"progressbar"},x,h,{children:(0,s.jsx)(Be,{className:v.svg,ownerState:g,viewBox:"".concat(22," ").concat(22," ").concat(Le," ").concat(Le),children:(0,s.jsx)(Ue,{className:v.circle,style:b,ownerState:g,cx:Le,cy:Le,r:(Le-d)/2,fill:"none",strokeWidth:d})})}))})),He=e=>{let{loading:t}=e;return t?(0,s.jsx)(We,{color:"primary"}):null};var $e=n(68),Ge=n(3400),Ve=n(533),qe=n(6998),Ke=n.n(qe),Ye=n(5282);const Qe={contentContainer:{display:"flex",alignItems:"center"},content:{display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},Xe=e=>{let{content:t,label:n}=e;const[r,a]=(0,o.useState)(!1),i=t&&"copyableValue"in t&&(0,s.jsx)($e.Z,{placement:"top",title:r?"Copied":"Click to copy",children:(0,s.jsx)(Ge.Z,{"aria-label":"copy",onClick:()=>{a(!0),Ke()(t.copyableValue)},onMouseEnter:()=>a(!1),onMouseLeave:()=>setTimeout((()=>a(!1)),333),size:"small",sx:{color:"black",marginLeft:.5},children:(0,s.jsx)(q,{})})});var l;return void 0===t||"value"in t?void 0!==t&&"link"in t&&void 0!==t.link?t.link.startsWith("http")?(0,s.jsxs)(O.Z,{sx:Qe.contentContainer,children:[(0,s.jsx)(Ve.Z,{sx:Qe.content,href:t.link,"data-testid":"metadata-content-for-".concat(n),children:t.value}),i]}):(0,s.jsxs)(O.Z,{sx:Qe.contentContainer,children:[(0,s.jsx)(Ve.Z,{sx:Qe.content,component:A.rU,to:t.link,"data-testid":"metadata-content-for-".concat(n),children:t.value}),i]}):(0,s.jsxs)(O.Z,{sx:Qe.contentContainer,children:[(0,s.jsx)(R.Z,{sx:Qe.content,variant:"body2",title:null===t||void 0===t?void 0:t.value,"data-testid":"metadata-content-for-".concat(n),children:null!==(l=null===t||void 0===t?void 0:t.value)&&void 0!==l?l:"-"}),i]}):(0,s.jsx)("div",{"data-testid":"metadata-content-for-".concat(n),children:t})},Je=e=>{let{metadataList:t}=e;const n=t.filter((e=>{let{isAvailable:t}=e;return null===t||void 0===t||t}));return(0,s.jsx)(O.Z,{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",rowGap:1,columnGap:4},children:n.map(((e,t)=>{let{label:n,labelTooltip:r,content:o}=e;return(0,s.jsxs)(O.Z,{flex:1,paddingTop:.5,paddingBottom:.5,children:[(0,s.jsxs)(O.Z,{display:"flex",alignItems:"center",marginBottom:.5,children:[(0,s.jsx)(R.Z,{sx:{color:e=>e.palette.text.secondary},variant:"body2",children:n}),r&&(0,s.jsx)(Ye.b,{sx:{marginLeft:.5},children:r})]}),(0,s.jsx)(Xe,{content:o,label:n})]},t)}))})},et=e=>{let{header:t,metadataList:n,footer:r}=e;return(0,s.jsxs)(be,{title:t,marginTop:1,marginBottom:4,children:[(0,s.jsx)(Je,{metadataList:n}),(0,s.jsx)(O.Z,{marginTop:1,children:r})]})};var tt=n(6535),nt=n(359);const rt={mainNavPageHierarchy:[],addPage:()=>{},updatePage:()=>{},removePage:()=>{}},ot=o.createContext(rt),at=e=>{let{pageInfo:t}=e;return(e=>{const{addPage:t,updatePage:n,removePage:r}=(0,o.useContext)(ot);(0,o.useEffect)((()=>(t(e.id),()=>{r(e.id)})),[e.id,t,r]),(0,o.useEffect)((()=>{var t;return n(e.title,e.id,e.path,e.pageTitle),document.title="".concat(null!==(t=e.pageTitle)&&void 0!==t?t:e.title," | Ray Dashboard"),()=>{document.title="Ray Dashboard"}}),[e.title,e.id,e.path,e.pageTitle,n])})(t),null};var it=n(1889),st=n(9431),lt=n(3466),ct=n(9836),ut=n(6890),dt=n(5855),pt=n(3994),ft=n(3382),ht=n(5699),mt=n(7246),gt=n(791),vt=n(7630),bt=n(8683),yt=n(1434);const xt=e=>{let{tasks:t=[],jobId:n,filterToTaskId:r,onFilterChange:a,actorId:i}=e;const[l,c]=(0,o.useState)(1),{changeFilter:u,filterFunc:d}=(0,bt.L)({overrideFilters:void 0!==r?[{key:"task_id",val:r}]:void 0,onFilterChange:a}),[p,f]=(0,o.useState)(r),[h,m]=(0,o.useState)(10),g=t.filter(d),{items:v,constrainedPage:b,maxPage:y}=(0,vt.NR)(g,l,h),x=[{label:"ID"},{label:"Name"},{label:"Job ID"},{label:"State"},{label:"Actions",helpInfo:(0,s.jsxs)(R.Z,{children:["A list of actions performable on this task.",(0,s.jsx)("br",{}),"- Log: view log messages of the worker that ran this task. You can only view all the logs of the worker and a worker can run multiple tasks.",(0,s.jsx)("br",{}),"- Error: For tasks that have failed, show a stack trace for the faiure.",(0,s.jsx)("br",{})," Stack Trace: Get a stacktrace of the worker process where the task is running.",(0,s.jsx)("br",{}),"- CPU Flame Graph: Get a flame graph of the next 5 seconds of the worker process where the task is running."]})},{label:"Duration"},{label:"Function or class name"},{label:"Node ID"},{label:"Actor ID"},{label:"Worker ID"},{label:"Type"},{label:"Placement group ID"},{label:"Required resources"},{label:"Label selector"}];return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{flex:1,display:"flex",alignItems:"center"},children:[(0,s.jsx)(ht.Z,{value:null!==r&&void 0!==r?r:p,inputValue:null!==r&&void 0!==r?r:p,style:{margin:8,width:120},options:Array.from(new Set(t.map((e=>e.task_id)))),onInputChange:(e,t)=>{u("task_id",t.trim()),f(t)},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Task ID"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:120},options:Array.from(new Set(t.map((e=>e.state)))),onInputChange:(e,t)=>{u("state",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"State"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:150},defaultValue:void 0===r?n:void 0,options:Array.from(new Set(t.map((e=>e.job_id)))),onInputChange:(e,t)=>{u("job_id",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Job Id"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:150},defaultValue:void 0===r?i:void 0,options:Array.from(new Set(t.map((e=>e.actor_id?e.actor_id:"")))),onInputChange:(e,t)=>{u("actor_id",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Actor Id"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:150},options:Array.from(new Set(t.map((e=>e.name)))),onInputChange:(e,t)=>{u("name",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Name"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:150},options:Array.from(new Set(t.map((e=>e.func_or_class_name)))),onInputChange:(e,t)=>{u("func_or_class_name",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Function or Class Name"})}),(0,s.jsx)(st.Z,{label:"Page Size",sx:{margin:1,width:120},size:"small",defaultValue:10,InputProps:{onChange:e=>{let{target:{value:t}}=e;m(Math.min(Number(t),500)||10)},endAdornment:(0,s.jsx)(lt.Z,{position:"end",children:"Per Page"})}})]}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,s.jsx)("div",{children:(0,s.jsx)(mt.Z,{page:b,onChange:(e,t)=>c(t),count:y})}),(0,s.jsx)("div",{children:(0,s.jsx)(yt.Z,{type:"task",list:g})})]}),(0,s.jsx)(O.Z,{sx:{overflowX:"scroll"},children:(0,s.jsxs)(ct.Z,{children:[(0,s.jsx)(ut.Z,{children:(0,s.jsx)(dt.Z,{children:x.map((e=>{let{label:t,helpInfo:n}=e;return(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsxs)(O.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:[t,n&&(0,s.jsx)(Ye.b,{sx:{marginLeft:1},children:n})]})},t)}))})}),(0,s.jsx)(ft.Z,{children:v.map((e=>{const{task_id:t,name:n,job_id:r,state:o,func_or_class_name:a,node_id:i,actor_id:l,placement_group_id:c,type:u,required_resources:d,start_time_ms:p,end_time_ms:f,worker_id:h,label_selector:m}=e;return(0,s.jsxs)(dt.Z,{children:[(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)($e.Z,{title:t,arrow:!0,children:(0,s.jsx)(Ve.Z,{sx:gt.Z.idCol,component:A.rU,to:"tasks/".concat(t),children:t})})}),(0,s.jsx)(pt.Z,{align:"center",children:n||"-"}),(0,s.jsx)(pt.Z,{align:"center",children:r}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(tt.b,{type:"task",status:o})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(wt,{task:e})}),(0,s.jsx)(pt.Z,{align:"center",children:p&&p>0?(0,s.jsx)(fe.c,{startTime:p,endTime:f}):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:a}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)($e.Z,{title:i||"-",arrow:!0,children:i?(0,s.jsx)(me.dG,{sx:gt.Z.idCol,nodeId:i}):(0,s.jsx)(O.Z,{sx:gt.Z.idCol,children:"-"})})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)($e.Z,{sx:gt.Z.idCol,title:l||"-",arrow:!0,children:l?(0,s.jsx)(me.y6,{sx:gt.Z.idCol,actorId:l}):(0,s.jsx)(O.Z,{sx:gt.Z.idCol,children:"-"})})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)($e.Z,{title:h||"-",arrow:!0,children:(0,s.jsx)(O.Z,{sx:gt.Z.idCol,children:h||"-"})})}),(0,s.jsx)(pt.Z,{align:"center",children:u}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)($e.Z,{title:c||"-",arrow:!0,children:(0,s.jsx)(O.Z,{sx:gt.Z.idCol,children:c||"-"})})}),(0,s.jsx)(pt.Z,{align:"center",children:Object.entries(d||{}).length>0?(0,s.jsx)(T.b,{title:"Required resources",code:JSON.stringify(d,void 0,2)}):"{}"}),(0,s.jsx)(pt.Z,{align:"center",children:Object.entries(m||{}).length>0?(0,s.jsx)(T.b,{title:"Label selector",code:JSON.stringify(m,void 0,2)}):"{}"})]},t)}))})]})})]})},wt=e=>{let{task:t}=e;const n=null!==t.error_type&&null!==t.error_message?"Error Type: ".concat(t.error_type,"\n\n").concat(t.error_message):void 0,r="RUNNING"===t.state&&t.worker_id;return(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(Ve.Z,{component:A.rU,to:"tasks/".concat(t.task_id),children:"Log"}),r&&(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)("br",{}),(0,s.jsx)(ge.MJ,{taskId:t.task_id,attemptNumber:t.attempt_number,nodeId:t.node_id}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.x4,{taskId:t.task_id,attemptNumber:t.attempt_number,nodeId:t.node_id}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.jf,{taskId:t.task_id,attemptNumber:t.attempt_number,nodeId:t.node_id})]}),(0,s.jsx)("br",{}),n&&(0,s.jsx)(T.b,{title:"Error details",code:n,buttonText:"Error"})]})};var _t=n(476);const St=e=>{let t="api/v0/tasks/timeline?download=1";return e&&(t+="&job_id=".concat(e)),t};var kt=n(4887),jt=n(6689);const Zt=(e,t)=>{const{data:n}=(0,kt.ZP)(e,(async()=>{var e,n,r;const o=await t();return null!==o&&void 0!==o&&null!==(e=o.data)&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&null!==(r=n.result)&&void 0!==r&&r.result?o.data.data.result.result:[]}),{refreshInterval:jt.G});return n},Et=e=>{const{data:t,isLoading:n}=(0,kt.ZP)(e?["useStateApiTask",e]:null,(async e=>{var t,n,r;let[o,a]=e;const i=await(e=>{const t="api/v0/tasks?detail=1&limit=1&filter_keys=task_id&filter_predicates=%3D&filter_values=".concat(encodeURIComponent(e));return(0,_t.U)(t)})(a);return null!==i&&void 0!==i&&null!==(t=i.data)&&void 0!==t&&null!==(n=t.data)&&void 0!==n&&null!==(r=n.result)&&void 0!==r&&r.result?i.data.data.result.result[0]:void 0}),{refreshInterval:jt.G});return{task:t,isLoading:n}},Ct=e=>{let{jobId:t,actorId:n,...r}=e;const[a]=(0,o.useState)(C()()),i=Zt(["useTasks",t],(()=>(e=>{let t="api/v0/tasks?detail=1&limit=10000";return e&&(t+="&filter_keys=job_id&filter_predicates=%3D&filter_values=".concat(e)),(0,_t.U)(t)})(t))),l=i||[];return(0,s.jsxs)("div",{children:[(0,s.jsx)(it.ZP,{container:!0,alignItems:"center",children:(0,s.jsxs)(it.ZP,{item:!0,children:["Last updated: ",a.format("YYYY-MM-DD HH:mm:ss")]})}),(0,s.jsx)(xt,{tasks:l,jobId:t,actorId:n,...r})]})};n(8457);var Nt=n(3572),It=n(3967),At=n(3199);let Pt;function Ot(){if(Pt)return Pt;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Pt="reverse",e.scrollLeft>0?Pt="default":(e.scrollLeft=1,0===e.scrollLeft&&(Pt="negative")),document.body.removeChild(e),Pt}function Tt(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(Ot()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function Rt(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Mt(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const{ease:a=Rt,duration:i=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/i);t[e]=a(u)*(n-l)+l,u>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}var Lt=n(162),Dt=n(7602);const zt=["onChange"],Ft={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var Bt=n(6189);const Ut=(0,Bt.Z)((0,s.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Wt=(0,Bt.Z)((0,s.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");var Ht=n(3701);function $t(e){return(0,Ze.ZP)("MuiTabScrollButton",e)}const Gt=(0,je.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Vt=["className","slots","slotProps","direction","orientation","disabled"],qt=(0,ke.ZP)(Ht.Z,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})((e=>{let{ownerState:t}=e;return(0,r.Z)({width:40,flexShrink:0,opacity:.8,["&.".concat(Gt.disabled)]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})})),Kt=o.forwardRef((function(e,t){var n,o;const i=(0,a.Z)({props:e,name:"MuiTabScrollButton"}),{className:l,slots:c={},slotProps:u={},direction:d}=i,p=(0,m.Z)(i,Vt),f="rtl"===(0,It.Z)().direction,h=(0,r.Z)({isRtl:f},i),g=(e=>{const{classes:t,orientation:n,disabled:r}=e,o={root:["root",n,r&&"disabled"]};return(0,we.Z)(o,$t,t)})(h),v=null!=(n=c.StartScrollButtonIcon)?n:Ut,b=null!=(o=c.EndScrollButtonIcon)?o:Wt,y=(0,Nt.y)({elementType:v,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),x=(0,Nt.y)({elementType:b,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return(0,s.jsx)(qt,(0,r.Z)({component:"div",className:(0,xe.Z)(g.root,l),ref:t,role:null,ownerState:h,tabIndex:null},p,{children:"left"===d?(0,s.jsx)(v,(0,r.Z)({},y)):(0,s.jsx)(b,(0,r.Z)({},x))}))}));var Yt=n(9683);function Qt(e){return(0,Ze.ZP)("MuiTabs",e)}const Xt=(0,je.Z)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var Jt=n(8301);const en=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],tn=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,nn=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,rn=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},on=(0,ke.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Xt.scrollButtons)]:t.scrollButtons},{["& .".concat(Xt.scrollButtons)]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.Z)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{["& .".concat(Xt.scrollButtons)]:{[n.breakpoints.down("sm")]:{display:"none"}}})})),an=(0,ke.ZP)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((e=>{let{ownerState:t}=e;return(0,r.Z)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})})),sn=(0,ke.ZP)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((e=>{let{ownerState:t}=e;return(0,r.Z)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})})),ln=(0,ke.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((e=>{let{ownerState:t,theme:n}=e;return(0,r.Z)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})})),cn=(0,ke.ZP)((function(e){const{onChange:t}=e,n=(0,m.Z)(e,zt),a=o.useRef(),i=o.useRef(null),l=()=>{a.current=i.current.offsetHeight-i.current.clientHeight};return(0,Lt.Z)((()=>{const e=(0,At.Z)((()=>{const e=a.current;l(),e!==a.current&&t(a.current)})),n=(0,Dt.Z)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),o.useEffect((()=>{l(),t(a.current)}),[t]),(0,s.jsx)("div",(0,r.Z)({style:Ft,ref:i},n))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),un={};const dn=o.forwardRef((function(e,t){const n=(0,a.Z)({props:e,name:"MuiTabs"}),i=(0,It.Z)(),l="rtl"===i.direction,{"aria-label":c,"aria-labelledby":u,action:d,centered:p=!1,children:f,className:h,component:g="div",allowScrollButtonsMobile:v=!1,indicatorColor:b="primary",onChange:y,orientation:x="horizontal",ScrollButtonComponent:w=Kt,scrollButtons:_="auto",selectionFollowsFocus:S,slots:k={},slotProps:j={},TabIndicatorProps:Z={},TabScrollButtonProps:E={},textColor:C="primary",value:N,variant:I="standard",visibleScrollbar:A=!1}=n,P=(0,m.Z)(n,en),O="scrollable"===I,T="vertical"===x,R=T?"scrollTop":"scrollLeft",M=T?"top":"left",L=T?"bottom":"right",D=T?"clientHeight":"clientWidth",z=T?"height":"width",F=(0,r.Z)({},n,{component:g,allowScrollButtonsMobile:v,indicatorColor:b,orientation:x,vertical:T,scrollButtons:_,textColor:C,variant:I,visibleScrollbar:A,fixed:!O,hideScrollbar:O&&!A,scrollableX:O&&!T,scrollableY:O&&T,centered:p&&!O,scrollButtonsHideMobile:!v}),B=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:i,scrollButtonsHideMobile:s,classes:l}=e,c={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,we.Z)(c,Qt,l)})(F),U=(0,Nt.y)({elementType:k.StartScrollButtonIcon,externalSlotProps:j.startScrollButtonIcon,ownerState:F}),W=(0,Nt.y)({elementType:k.EndScrollButtonIcon,externalSlotProps:j.endScrollButtonIcon,ownerState:F});const[H,$]=o.useState(!1),[G,V]=o.useState(un),[q,K]=o.useState(!1),[Y,Q]=o.useState(!1),[X,J]=o.useState(!1),[ee,te]=o.useState({overflow:"hidden",scrollbarWidth:0}),ne=new Map,re=o.useRef(null),oe=o.useRef(null),ae=()=>{const e=re.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Tt(e,i.direction),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==N){const e=oe.current.children;if(e.length>0){const t=e[ne.get(N)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},ie=(0,Yt.Z)((()=>{const{tabsMeta:e,tabMeta:t}=ae();let n,r=0;if(T)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=l?"right":"left",t&&e){const o=l?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(l?-1:1)*(t[n]-e[n]+o)}const o={[n]:r,[z]:t?t[z]:0};if(isNaN(G[n])||isNaN(G[z]))V(o);else{const e=Math.abs(G[n]-o[n]),t=Math.abs(G[z]-o[z]);(e>=1||t>=1)&&V(o)}})),se=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?Mt(R,re.current,e,{duration:i.transitions.duration.standard}):re.current[R]=e},le=e=>{let t=re.current[R];T?t+=e:(t+=e*(l?-1:1),t*=l&&"reverse"===Ot()?-1:1),se(t)},ce=()=>{const e=re.current[D];let t=0;const n=Array.from(oe.current.children);for(let r=0;re){0===r&&(t=e);break}t+=o[D]}return t},ue=()=>{le(-1*ce())},de=()=>{le(ce())},pe=o.useCallback((e=>{te({overflow:null,scrollbarWidth:e})}),[]),fe=(0,Yt.Z)((e=>{const{tabsMeta:t,tabMeta:n}=ae();if(n&&t)if(n[M]t[L]){const r=t[R]+(n[L]-t[L]);se(r,{animation:e})}})),he=(0,Yt.Z)((()=>{O&&!1!==_&&J(!X)}));o.useEffect((()=>{const e=(0,At.Z)((()=>{re.current&&ie()}));let t;const n=n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{var n;null==(n=t)||n.unobserve(e)})),e.addedNodes.forEach((e=>{var n;null==(n=t)||n.observe(e)}))})),e(),he()},r=(0,Dt.Z)(re.current);let o;return r.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(oe.current.children).forEach((e=>{t.observe(e)}))),"undefined"!==typeof MutationObserver&&(o=new MutationObserver(n),o.observe(oe.current,{childList:!0})),()=>{var n,a;e.clear(),r.removeEventListener("resize",e),null==(n=o)||n.disconnect(),null==(a=t)||a.disconnect()}}),[ie,he]),o.useEffect((()=>{const e=Array.from(oe.current.children),t=e.length;if("undefined"!==typeof IntersectionObserver&&t>0&&O&&!1!==_){const n=e[0],r=e[t-1],o={root:re.current,threshold:.99},a=new IntersectionObserver((e=>{K(!e[0].isIntersecting)}),o);a.observe(n);const i=new IntersectionObserver((e=>{Q(!e[0].isIntersecting)}),o);return i.observe(r),()=>{a.disconnect(),i.disconnect()}}}),[O,_,X,null==f?void 0:f.length]),o.useEffect((()=>{$(!0)}),[]),o.useEffect((()=>{ie()})),o.useEffect((()=>{fe(un!==G)}),[fe,G]),o.useImperativeHandle(d,(()=>({updateIndicator:ie,updateScrollButtons:he})),[ie,he]);const me=(0,s.jsx)(ln,(0,r.Z)({},Z,{className:(0,xe.Z)(B.indicator,Z.className),ownerState:F,style:(0,r.Z)({},G,Z.style)}));let ge=0;const ve=o.Children.map(f,(e=>{if(!o.isValidElement(e))return null;const t=void 0===e.props.value?ge:e.props.value;ne.set(t,ge);const n=t===N;return ge+=1,o.cloneElement(e,(0,r.Z)({fullWidth:"fullWidth"===I,indicator:n&&!H&&me,selected:n,selectionFollowsFocus:S,onChange:y,textColor:C,value:t},1!==ge||!1!==N||e.props.tabIndex?{}:{tabIndex:0}))})),be=(()=>{const e={};e.scrollbarSizeListener=O?(0,s.jsx)(cn,{onChange:pe,className:(0,xe.Z)(B.scrollableX,B.hideScrollbar)}):null;const t=O&&("auto"===_&&(q||Y)||!0===_);return e.scrollButtonStart=t?(0,s.jsx)(w,(0,r.Z)({slots:{StartScrollButtonIcon:k.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:U},orientation:x,direction:l?"right":"left",onClick:ue,disabled:!q},E,{className:(0,xe.Z)(B.scrollButtons,E.className)})):null,e.scrollButtonEnd=t?(0,s.jsx)(w,(0,r.Z)({slots:{EndScrollButtonIcon:k.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:W},orientation:x,direction:l?"left":"right",onClick:de,disabled:!Y},E,{className:(0,xe.Z)(B.scrollButtons,E.className)})):null,e})();return(0,s.jsxs)(on,(0,r.Z)({className:(0,xe.Z)(B.root,h),ownerState:F,ref:t,as:g},P,{children:[be.scrollButtonStart,be.scrollbarSizeListener,(0,s.jsxs)(an,{className:B.scroller,ownerState:F,style:{overflow:ee.overflow,[T?"margin".concat(l?"Left":"Right"):"marginBottom"]:A?void 0:-ee.scrollbarWidth},ref:re,children:[(0,s.jsx)(sn,{"aria-label":c,"aria-labelledby":u,"aria-orientation":"vertical"===x?"vertical":null,className:B.flexContainer,ownerState:F,onKeyDown:e=>{const t=oe.current,n=(0,Jt.Z)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===x?"ArrowLeft":"ArrowUp",o="horizontal"===x?"ArrowRight":"ArrowDown";switch("horizontal"===x&&l&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),rn(t,n,nn);break;case o:e.preventDefault(),rn(t,n,tn);break;case"Home":e.preventDefault(),rn(t,null,tn);break;case"End":e.preventDefault(),rn(t,null,nn)}},ref:oe,role:"tablist",children:ve}),H&&me]}),be.scrollButtonEnd]}))}));function pn(e){return(0,Ze.ZP)("MuiTab",e)}const fn=(0,je.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),hn=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],mn=(0,ke.ZP)(Ht.Z,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor".concat((0,Se.Z)(n.textColor))],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},n.label&&{flexDirection:"top"===n.iconPosition||"bottom"===n.iconPosition?"column":"row"},{lineHeight:1.25},n.icon&&n.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > .".concat(fn.iconWrapper)]:(0,r.Z)({},"top"===n.iconPosition&&{marginBottom:6},"bottom"===n.iconPosition&&{marginTop:6},"start"===n.iconPosition&&{marginRight:t.spacing(1)},"end"===n.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===n.textColor&&{color:"inherit",opacity:.6,["&.".concat(fn.selected)]:{opacity:1},["&.".concat(fn.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(fn.selected)]:{color:(t.vars||t).palette.primary.main},["&.".concat(fn.disabled)]:{color:(t.vars||t).palette.text.disabled}},"secondary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(fn.selected)]:{color:(t.vars||t).palette.secondary.main},["&.".concat(fn.disabled)]:{color:(t.vars||t).palette.text.disabled}},n.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},n.wrapped&&{fontSize:t.typography.pxToRem(12)})})),gn=o.forwardRef((function(e,t){const n=(0,a.Z)({props:e,name:"MuiTab"}),{className:i,disabled:l=!1,disableFocusRipple:c=!1,fullWidth:u,icon:d,iconPosition:p="top",indicator:f,label:h,onChange:g,onClick:v,onFocus:b,selected:y,selectionFollowsFocus:x,textColor:w="inherit",value:_,wrapped:S=!1}=n,k=(0,m.Z)(n,hn),j=(0,r.Z)({},n,{disabled:l,disableFocusRipple:c,selected:y,icon:!!d,iconPosition:p,label:!!h,fullWidth:u,textColor:w,wrapped:S}),Z=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:a,label:i,selected:s,disabled:l}=e,c={root:["root",a&&i&&"labelIcon","textColor".concat((0,Se.Z)(n)),r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return(0,we.Z)(c,pn,t)})(j),E=d&&h&&o.isValidElement(d)?o.cloneElement(d,{className:(0,xe.Z)(Z.iconWrapper,d.props.className)}):d;return(0,s.jsxs)(mn,(0,r.Z)({focusRipple:!c,className:(0,xe.Z)(Z.root,i),ref:t,role:"tab","aria-selected":y,disabled:l,onClick:e=>{!y&&g&&g(e,_),v&&v(e)},onFocus:e=>{x&&!y&&g&&g(e,_),b&&b(e)},ownerState:j,tabIndex:y?0:-1},k,{children:["top"===p||"start"===p?(0,s.jsxs)(o.Fragment,{children:[E,h]}):(0,s.jsxs)(o.Fragment,{children:[h,E]}),f]}))}));function vn(e,t,n,r){const a=(0,o.useRef)(t);bn((()=>{a.current=t}),[t]),(0,o.useEffect)((()=>{var t;const o=null!==(t=null===n||void 0===n?void 0:n.current)&&void 0!==t?t:window;if(!o||!o.addEventListener)return;const i=e=>a.current(e);return o.addEventListener(e,i,r),()=>{o.removeEventListener(e,i,r)}}),[e,n,r])}const bn="undefined"!==typeof window?o.useLayoutEffect:o.useEffect;function yn(e,t){const n=(0,o.useCallback)((()=>{if("undefined"===typeof window)return t;try{const n=window.localStorage.getItem(e);return n?function(e){try{return"undefined"===e?void 0:JSON.parse(null!==e&&void 0!==e?e:"")}catch(t){return void console.log("parsing error on",{value:e})}}(n):t}catch(n){return console.warn("Error reading localStorage key \u201c".concat(e,"\u201d:"),n),t}}),[t,e]),[r,a]=(0,o.useState)(n),i=function(e){const t=(0,o.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return bn((()=>{t.current=e}),[e]),(0,o.useCallback)((function(){return t.current(...arguments)}),[t])}((t=>{"undefined"===typeof window&&console.warn("Tried setting localStorage key \u201c".concat(e,"\u201d even though environment is not a client"));try{const n=t instanceof Function?t(r):t;window.localStorage.setItem(e,JSON.stringify(n)),a(n),window.dispatchEvent(new Event("local-storage"))}catch(n){console.warn("Error setting localStorage key \u201c".concat(e,"\u201d:"),n)}}));(0,o.useEffect)((()=>{a(n())}),[]);const s=(0,o.useCallback)((t=>{(null===t||void 0===t?void 0:t.key)&&t.key!==e||a(n())}),[e,n]);return vn("storage",s),vn("local-storage",s),[r,i]}var xn=n(4938);const wn=(e,t)=>{const n=(0,xn.Fc)({...e,maxLines:-1}),{data:r,isLoading:o,mutate:a}=(0,kt.ZP)(n?["useDriverLogs",n]:null,(async t=>{let[n]=t;return(0,xn.Q$)(e)}));return{log:o?"Loading...":r,downloadUrl:n,refresh:a,path:t}};var _n=n(9907),Sn=n(9955),kn=n(4518),jn=n(4402);function Zn(e){return(0,Ze.ZP)("MuiLinearProgress",e)}(0,je.Z)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var En,Cn,Nn,In,An,Pn;const On=["className","color","value","valueBuffer","variant"];let Tn,Rn,Mn,Ln,Dn,zn;const Fn=(0,_e.F4)(Tn||(Tn=En||(En=(0,ye.Z)(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])))),Bn=(0,_e.F4)(Rn||(Rn=Cn||(Cn=(0,ye.Z)(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])))),Un=(0,_e.F4)(Mn||(Mn=Nn||(Nn=(0,ye.Z)(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])))),Wn=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress["".concat(t,"Bg")]:"light"===e.palette.mode?(0,jn.$n)(e.palette[t].main,.62):(0,jn._j)(e.palette[t].main,.5),Hn=(0,ke.ZP)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["color".concat((0,Se.Z)(n.color))],t[n.variant]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.Z)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:Wn(n,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),$n=(0,ke.ZP)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t["dashedColor".concat((0,Se.Z)(n.color))]]}})((e=>{let{ownerState:t,theme:n}=e;const o=Wn(n,t.color);return(0,r.Z)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:"radial-gradient(".concat(o," 0%, ").concat(o," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,_e.iv)(Ln||(Ln=In||(In=(0,ye.Z)(["\n animation: "," 3s infinite linear;\n "]))),Un)),Gn=(0,ke.ZP)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t["barColor".concat((0,Se.Z)(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.Z)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .".concat(4,"s linear")},"buffer"===t.variant&&{zIndex:1,transition:"transform .".concat(4,"s linear")})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,_e.iv)(Dn||(Dn=An||(An=(0,ye.Z)(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "]))),Fn)})),Vn=(0,ke.ZP)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t["barColor".concat((0,Se.Z)(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,r.Z)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:Wn(n,t.color),transition:"transform .".concat(4,"s linear")})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,_e.iv)(zn||(zn=Pn||(Pn=(0,ye.Z)(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "]))),Bn)})),qn=o.forwardRef((function(e,t){const n=(0,a.Z)({props:e,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:l,valueBuffer:c,variant:u="indeterminate"}=n,d=(0,m.Z)(n,On),p=(0,r.Z)({},n,{color:i,variant:u}),f=(e=>{const{classes:t,variant:n,color:r}=e,o={root:["root","color".concat((0,Se.Z)(r)),n],dashed:["dashed","dashedColor".concat((0,Se.Z)(r))],bar1:["bar","barColor".concat((0,Se.Z)(r)),("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&"barColor".concat((0,Se.Z)(r)),"buffer"===n&&"color".concat((0,Se.Z)(r)),("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,we.Z)(o,Zn,t)})(p),h=(0,It.Z)(),g={},v={bar1:{},bar2:{}};if("determinate"===u||"buffer"===u)if(void 0!==l){g["aria-valuenow"]=Math.round(l),g["aria-valuemin"]=0,g["aria-valuemax"]=100;let e=l-100;"rtl"===h.direction&&(e=-e),v.bar1.transform="translateX(".concat(e,"%)")}else 0;if("buffer"===u)if(void 0!==c){let e=(c||0)-100;"rtl"===h.direction&&(e=-e),v.bar2.transform="translateX(".concat(e,"%)")}else 0;return(0,s.jsxs)(Hn,(0,r.Z)({className:(0,xe.Z)(f.root,o),ownerState:p,role:"progressbar"},g,{ref:t},d,{children:["buffer"===u?(0,s.jsx)($n,{className:f.dashed,ownerState:p}):null,(0,s.jsx)(Gn,{className:f.bar1,ownerState:p,style:v.bar1}),"determinate"===u?null:(0,s.jsx)(Vn,{className:f.bar2,ownerState:p,style:v.bar2})]}))}));var Kn=n(1035);const Yn=(0,o.memo)((e=>{let{path:t,log:n,downloadUrl:r,onRefreshClick:a,height:i=600}=e;const{search:l,setSearch:c,startTime:u,setStart:d,endTime:p,setEnd:f}=(()=>{const[e,t]=(0,o.useState)(),[n,r]=(0,o.useState)(),[a,i]=(0,o.useState)();return{search:e,setSearch:t,startTime:n,setStart:r,endTime:a,setEnd:i}})();return(0,s.jsxs)(o.Fragment,{children:["Loading..."!==n&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(st.Z,{sx:{margin:1},label:"Keyword",InputProps:{onChange:e=>{let{target:{value:t}}=e;c({...l,keywords:t})},type:"",endAdornment:(0,s.jsx)(lt.Z,{position:"end",children:(0,s.jsx)(_n.Z,{})})}}),(0,s.jsx)(st.Z,{id:"datetime-local",label:"Start Time",type:"datetime-local",value:u,sx:{margin:1},onChange:e=>{d(e.target.value)},InputLabelProps:{shrink:!0}}),(0,s.jsx)(st.Z,{label:"End Time",type:"datetime-local",value:p,sx:{margin:1},onChange:e=>{f(e.target.value)},InputLabelProps:{shrink:!0}}),(0,s.jsxs)(O.Z,{sx:{margin:1},children:["Reverse:"," ",(0,s.jsx)(Sn.Z,{checked:null===l||void 0===l?void 0:l.revert,onChange:(e,t)=>c({...l,revert:t})}),a&&(0,s.jsx)(kn.Z,{sx:{margin:1},variant:"contained",onClick:a,children:"Refresh"}),(0,s.jsx)(kn.Z,{sx:{margin:1},variant:"contained",onClick:()=>{d(""),f("")},children:"Reset Time"}),r&&t&&(0,s.jsx)(kn.Z,{variant:"contained",component:"a",href:r,download:t,children:"Download log file"})]})]}),(0,s.jsx)(Kn.Z,{height:i,revert:null===l||void 0===l?void 0:l.revert,keywords:null===l||void 0===l?void 0:l.keywords,focusLine:Number(null===l||void 0===l?void 0:l.lineNumber)||void 0,fontSize:(null===l||void 0===l?void 0:l.fontSize)||12,content:n,language:"prolog",startTime:u,endTime:p})]}),"Loading..."===n&&(0,s.jsxs)("div",{children:[(0,s.jsx)("br",{}),(0,s.jsx)(qn,{})]})]})})),Qn=e=>{var t;let{tabs:n,otherLogsLink:r,contextKey:a,className:i}=e;const[l,c]=yn("MultiTabLogViewer-tabMemory-".concat(a),null),[u,d]=(0,o.useState)(a&&l?l:null===(t=n[0])||void 0===t?void 0:t.title),[p,f]=(0,o.useState)(!1);(0,o.useEffect)((()=>{var e;n.some((e=>e.title===u))||d(null===(e=n[0])||void 0===e?void 0:e.title)}),[n,u]);const h=n.find((e=>e.title===u));return 0===n.length?(0,s.jsx)(R.Z,{children:"No logs to display."}):(0,s.jsx)("div",{className:i,children:(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",children:[(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"column",alignItems:"stretch",flexGrow:1,children:[(n.length>1||r)&&(0,s.jsxs)(dn,{sx:{borderBottom:e=>"1px solid ".concat(e.palette.divider)},value:u,onChange:(e,t)=>{a&&c(t),d(t)},indicatorColor:"primary",children:[n.map((e=>{let{title:t}=e;return(0,s.jsx)(gn,{label:t,value:t},t)})),r&&(0,s.jsx)(gn,{label:(0,s.jsxs)(O.Z,{display:"flex",alignItems:"center",children:["Other logs \xa0 ",(0,s.jsx)(se,{size:20})]}),onClick:e=>{d(u)},component:A.rU,to:r,target:"_blank",rel:"noopener noreferrer"})]}),h?n.map((e=>{const{title:t,...n}=e;return(0,s.jsx)(pe,{visible:t===(null===h||void 0===h?void 0:h.title),keepRendered:!0,children:(0,s.jsx)(Xn,{data:n,height:p?800:300})},t)})):(0,s.jsx)(R.Z,{color:"error",children:"Please select a tab."})]}),(0,s.jsx)(Ge.Z,{onClick:()=>{f(!p)},size:"large",children:p?(0,s.jsx)(K,{}):(0,s.jsx)(Y,{})})]})})},Xn=e=>{let{height:t=300,data:n}=e;return(e=>"contents"in e)(n)?(0,s.jsx)(Jn,{height:t,contents:n.contents}):(e=>"actorId"in e)(n)?(0,s.jsx)(tr,{height:t,...n}):(e=>"taskId"in e)(n)?(0,s.jsx)(nr,{height:t,...n}):(0,s.jsx)(er,{height:t,...n})},Jn=e=>{let{height:t=300,contents:n}=e;return(0,s.jsx)(Yn,{log:n,height:t})},er=e=>{let{height:t=300,nodeId:n,filename:r}=e;const o=wn({nodeId:n,filename:r},r);return(0,s.jsx)(rr,{apiData:o,height:t})},tr=e=>{let{height:t=300,actorId:n,suffix:r}=e;const o=wn({actorId:n,suffix:r},"actor-log-".concat(n,".").concat(r));return(0,s.jsx)(rr,{apiData:o,height:t})},nr=e=>{let{height:t=300,taskId:n,suffix:r}=e;const o=wn({taskId:n,suffix:r},"task-log-".concat(n,".").concat(r));return(0,s.jsx)(rr,{apiData:o,height:t})},rr=e=>{let{apiData:{downloadUrl:t,log:n,path:r,refresh:o},height:a=300}=e;return"string"===typeof n?(0,s.jsx)(Yn,{log:n,path:r,downloadUrl:null!==t?t:void 0,height:a,onRefreshClick:o}):(0,s.jsx)(R.Z,{color:"error",children:"Failed to load"})},or=e=>{let{actor:{actorId:t,pid:n,address:{workerId:r,nodeId:o}}}=e;const a=[{title:"stderr",actorId:t,suffix:"err"},{title:"stdout",actorId:t,suffix:"out"},{title:"system",nodeId:o,filename:"python-core-worker-".concat(r,"_").concat(n,".log")}];return(0,s.jsx)(Qn,{tabs:a,contextKey:"actors-page"})};var ar=n(2374);const ir=e=>(0,kt.ZP)(e?["useActorDetail",e]:null,(async e=>{let[t,n]=e;const r=await(0,ar.I)(n),o=null===r||void 0===r?void 0:r.data,{data:a}=o;if(a.detail)return a.detail})),sr=()=>{const e=(0,P.UO)(),[t,n]=(0,o.useState)("Loading the actor infos..."),{namespaceMap:r}=(0,o.useContext)(vs),{data:a,isLoading:i}=(0,kt.ZP)(["useActorDetail",e.actorId],(async e=>{let[t,r]=e;const o=await(0,ar.I)(r),a=null===o||void 0===o?void 0:o.data,{data:i,msg:s,result:l}=a;if(s&&n(s),!1===l&&n("Actor Query Error Please Check Actor Id"),i.detail)return i.detail}),{refreshInterval:jt.Q});return{params:e,actorDetail:a,msg:t,isLoading:i,namespaceMap:r}},lr=()=>{const{params:e,actorDetail:t}=sr();return(0,s.jsxs)("div",{children:[(0,s.jsx)(at,{pageInfo:t?{title:"".concat(e.actorId),pageTitle:"".concat(e.actorId," | Actor"),id:"actor-detail",path:"".concat(e.actorId)}:{id:"actor-detail",title:"Actor",path:"".concat(e.actorId)}}),(0,s.jsx)(P.j3,{})]})},cr=()=>{var e,t,n,r,a,i,l,c,u;const{params:d,actorDetail:p,msg:f,isLoading:h}=sr();return h||void 0===p?(0,s.jsxs)(O.Z,{sx:{padding:2,backgroundColor:"white"},children:[(0,s.jsx)(He,{loading:h}),(0,s.jsxs)(nt.Z,{title:"ACTOR - ".concat(d.actorId),children:[(0,s.jsx)(tt.b,{type:"actor",status:"LOADING"}),(0,s.jsx)("br",{}),"Request Status: ",f," ",(0,s.jsx)("br",{})]})]}):(0,s.jsxs)(O.Z,{sx:{padding:2,backgroundColor:"white"},children:[(0,s.jsx)(et,{metadataList:[{label:"State",content:(0,s.jsx)(tt.b,{type:"actor",status:p.state})},{label:"ID",content:p.actorId?{value:p.actorId,copyableValue:p.actorId}:{value:"-"}},{label:"Name",content:p.name?{value:p.name}:{value:"-"}},{label:"Class Name",content:p.actorClass?{value:p.actorClass}:{value:"-"}},{label:"Repr",content:p.reprName?{value:p.reprName}:{value:"-"}},{label:"Job ID",content:p.jobId?{value:p.jobId,copyableValue:p.jobId}:{value:"-"}},{label:"Node ID",content:null!==(e=p.address)&&void 0!==e&&e.nodeId?{value:null===(t=p.address)||void 0===t?void 0:t.nodeId,copyableValue:null===(n=p.address)||void 0===n?void 0:n.nodeId,link:p.address.nodeId?(0,me.ip)(p.address.nodeId):void 0}:{value:"-"}},{label:"Worker ID",content:null!==(r=p.address)&&void 0!==r&&r.workerId?{value:null===(a=p.address)||void 0===a?void 0:a.workerId,copyableValue:null===(i=p.address)||void 0===i?void 0:i.workerId}:{value:"-"}},{label:"PID",content:p.pid?{value:"".concat(p.pid),copyableValue:"".concat(p.pid)}:{value:"-"}},{label:"Started at",content:{value:p.startTime?(0,he.M9)(p.startTime):"-"}},{label:"Ended at",content:{value:p.endTime?(0,he.M9)(p.endTime):"-"}},{label:"Uptime",content:p.startTime?(0,s.jsx)(fe.c,{startTime:p.startTime,endTime:p.endTime}):(0,s.jsx)(o.Fragment,{children:"-"})},{label:"Restarted",content:{value:p.numRestarts}},{label:"Exit Detail",content:p.exitDetail?{value:p.exitDetail}:{value:"-"}},{label:"Actions",content:(0,s.jsxs)("div",{children:[(0,s.jsx)(ge.IL,{pid:p.pid,ip:null===(l=p.address)||void 0===l?void 0:l.ipAddress,type:""}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.Sl,{pid:p.pid,ip:null===(c=p.address)||void 0===c?void 0:c.ipAddress,type:""}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.d3,{pid:p.pid,ip:null===(u=p.address)||void 0===u?void 0:u.ipAddress,type:""})]})},{label:"Call site",content:(0,s.jsx)(O.Z,{display:"inline-block",children:(0,s.jsx)(T.b,{title:"Call site",code:p.callSite||'Call site not recorded. To enable, set environment variable "RAY_record_task_actor_creation_sites" to "true".'})})},{label:"Required Resources",content:(0,s.jsx)(O.Z,{display:"inline-block",children:Object.entries(p.requiredResources||{}).length>0?(0,s.jsx)(T.Z,{sx:{maxWidth:200},title:"Required resources",code:JSON.stringify(p.requiredResources,void 0,2)}):"{}"})},{label:"Label Selector",content:(0,s.jsx)(O.Z,{display:"inline-block",children:Object.entries(p.labelSelector||{}).length>0?(0,s.jsx)(T.Z,{sx:{maxWidth:200},title:"Label selector",code:JSON.stringify(p.labelSelector,void 0,2)}):"{}"})}]}),(0,s.jsx)(de,{title:"Logs",startExpanded:!0,children:(0,s.jsx)(be,{noTopPadding:!0,children:(0,s.jsx)(or,{actor:p})})}),(0,s.jsx)(de,{title:"Tasks History",sx:{marginTop:4},children:(0,s.jsx)(be,{children:(0,s.jsx)(Ct,{jobId:p.jobId,actorId:d.actorId})})})]})},ur=()=>(0,s.jsxs)("div",{children:[(0,s.jsx)(at,{pageInfo:{id:"actors",title:"Actors",path:"/actors"}}),(0,s.jsx)(P.j3,{})]});const dr=n.p+"static/media/logo.3704c1bbca650bb72a64b5d4c3fa5ced.svg",pr=(0,s.jsx)("div",{style:{height:"100vh",width:"100vw"},children:(0,s.jsxs)("div",{style:{margin:"250px auto 0 auto",textAlign:"center",fontSize:40,fontWeight:500},children:[(0,s.jsx)("img",{src:dr,alt:"Loading",width:100}),(0,s.jsx)("br",{}),"Loading..."]})});var fr=n(9281),hr=n(4231),mr=n(6566);const gr=()=>{const[e,t]=(0,o.useState)({pageSize:10,pageNo:1}),[n,r]=(0,o.useState)("Loading the job list..."),[a,i]=(0,o.useState)(!0),[s,l]=(0,o.useState)([]);(0,o.useRef)(a).current=a;const{data:c,isLoading:u}=(0,kt.ZP)("useJobList",(async()=>{const e=await(0,mr.Go)();if(e)return r("Fetched jobs"),e.data.sort(((e,t)=>{var n,r;return(null!==(n=t.start_time)&&void 0!==n?n:0)-(null!==(r=e.start_time)&&void 0!==r?r:0)}))}),{refreshInterval:a?jt.Q:0}),d=null!==c&&void 0!==c?c:[];return{jobList:d.filter((e=>s.every((t=>{var n;return e[t.key]&&(null!==(n=e[t.key])&&void 0!==n?n:"").includes(t.val)})))),msg:n,isLoading:u,isRefreshing:a,onSwitchChange:e=>{i(e.target.checked)},changeFilter:(e,t)=>{const n=s.find((t=>t.key===e));n?n.val=t:s.push({key:e,val:t}),l([...s])},page:e,originalJobs:d,setPage:(n,r)=>t({...e,[n]:r})}};var vr,br=n(7027);const yr=(0,_e.F4)(vr||(vr=(0,ye.Z)(["\nfrom {\n transform: rotate(0deg)\n},\nto {\n transform: rotate(360deg)\n}"]))),xr=e=>{let{className:t,title:n,small:r=!1,sx:o=[],...a}=e;return(0,s.jsx)(O.Z,{component:ce,sx:[{width:r?16:20,height:r?16:20,color:"#1E88E5",animation:"".concat(yr," 1s linear infinite")},...Array.isArray(o)?o:[o]],title:n,...a})},wr=e=>{let{job:t,small:n=!1,className:r,sx:o}=e;switch(t.status){case br.B.SUCCEEDED:return(0,s.jsx)(O.Z,{component:re,className:r,sx:[{width:n?16:20,height:n?16:20,color:e=>e.palette.success.main},...Array.isArray(o)?o:[o]]});case br.B.FAILED:return(0,s.jsx)(O.Z,{component:oe,className:r,sx:[{width:n?16:20,height:n?16:20,color:e=>e.palette.error.main},...Array.isArray(o)?o:[o]]});case br.B.STOPPED:return(0,s.jsx)(O.Z,{component:X,className:r,sx:[{width:n?16:20,height:n?16:20,color:"#757575"},...Array.isArray(o)?o:[o]]});default:return(0,s.jsx)(xr,{className:r,sx:o,small:n})}},_r=e=>{let{job:t}=e;return(0,s.jsx)(O.Z,{display:"inline-flex",alignItems:"center",children:(0,s.jsx)(tt.b,{type:"job",status:t.status,icon:t.status===br.B.RUNNING&&(0,s.jsx)(xr,{})})})};var Sr=n(2948);const kr=e=>{let{progress:t,total:n,unaccountedLabel:r,showLegend:o=!0,showTooltip:a=!1,showTotalProgress:i,expanded:l,onClick:c,controls:u}=e;const d=t.reduce(((e,t)=>{let{value:n}=t;return e+n}),0),p=null!==n&&void 0!==n?n:d,f=(d{let{value:t}=e;return t}));return(0,s.jsxs)(O.Z,{sx:{display:"flex",flexDirection:"column"},children:[(o||u)&&(0,s.jsxs)(O.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:1,children:[o&&(0,s.jsxs)(O.Z,{sx:{display:"flex",flexDirection:"row"},children:[(0,s.jsxs)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center","&:not(:first-child)":{marginLeft:1.5},"&:not(:last-child)":{marginRight:1.5}},children:[(0,s.jsx)(O.Z,{sx:{width:16,height:16,borderRadius:"4px",marginRight:1,backgroundColor:"black"}}),(0,s.jsxs)(R.Z,{children:["Total: ",p]})]}),f.map((e=>{let{value:t,label:n,hint:r,color:o}=e;return(0,s.jsxs)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center","&:not(:first-child)":{marginLeft:1.5},"&:not(:last-child)":{marginRight:1.5}},children:[(0,s.jsx)(O.Z,{sx:{width:16,height:16,borderRadius:"4px",marginRight:1,backgroundColor:o}}),(0,s.jsxs)(R.Z,{children:[n,": ",t]}),r&&(0,s.jsx)(Ye.b,{sx:{marginLeft:.5},children:r})]},n)}))]}),u&&u]}),(0,s.jsxs)(O.Z,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},onClick:c,children:[void 0!==l&&(l?(0,s.jsx)(O.Z,{component:ee,sx:{width:16,height:16,marginRight:1}}):(0,s.jsx)(O.Z,{component:ne,sx:{width:16,height:16,marginRight:1}})),(0,s.jsx)(jr,{showTooltip:a,total:p,segments:f,children:(0,s.jsx)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"100%",height:8,borderRadius:"6px",overflow:"hidden",backgroundColor:0===d?"lightGrey":"white"},children:f.map((e=>{let{color:t,label:n,value:r}=e;return(0,s.jsx)(O.Z,{component:"span",sx:{"&:not(:last-child)":{marginRight:"1px"},flex:r,backgroundColor:t},"data-testid":"progress-bar-segment"},n)}))})}),void 0!==i&&(0,s.jsxs)(O.Z,{sx:{flex:"1 0 40px",marginLeft:1,textAlign:"end",whiteSpace:"nowrap"},children:[i," / ",p]})]})]})},jr=e=>{let{showTooltip:t,segments:n,total:r,children:o}=e;return t?(0,s.jsx)(Ye.m,{placement:"right",title:(0,s.jsxs)(O.Z,{children:[(0,s.jsxs)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center","&:not(:first-child)":{marginTop:1}},children:[(0,s.jsx)(O.Z,{sx:{width:16,height:16,borderRadius:"4px",marginRight:1,backgroundColor:"black"}}),(0,s.jsxs)(R.Z,{children:["Total: ",r]})]}),n.map((e=>{let{value:t,label:n,color:r}=e;return(0,s.jsxs)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center","&:not(:first-child)":{marginTop:1}},children:[(0,s.jsx)(O.Z,{sx:{width:16,height:16,borderRadius:"4px",marginRight:1,backgroundColor:r}}),(0,s.jsxs)(R.Z,{children:[n,": ",t]})]},n)}))]}),children:o}):o},Zr=e=>{let{numFinished:t=0,numRunning:n=0,numPendingArgsAvail:r=0,numPendingNodeAssignment:o=0,numSubmittedToWorker:a=0,numFailed:i=0,numCancelled:l=0,numUnknown:c=0,showAsComplete:u=!1,showLegend:d=!0,showTooltip:p=!0,expanded:f,onClick:h,total:m,controls:g}=e;const v=(0,It.Z)(),b=[{label:"Finished",value:t,color:v.palette.success.main},{label:"Failed",value:i,color:v.palette.error.main},{label:"Running",value:n,color:v.palette.primary.main},{label:"Waiting for scheduling",value:o+a,color:"#cfcf08"},{label:"Waiting for dependencies",value:r,color:"#f79e02"},{label:"Cancelled",value:l,color:v.palette.grey.A100},{label:"Unknown",value:c,color:"#5f6469"}];return(0,s.jsx)(kr,{progress:b,expanded:f,showLegend:d,showTooltip:p,onClick:h,showTotalProgress:t,total:m,controls:g})},Er=e=>{let{numFinished:t=0,numRunning:n=0,numPendingArgsAvail:r=0,numPendingNodeAssignment:o=0,numSubmittedToWorker:a=0,numUnknown:i=0,numFailed:l=0,showAsComplete:c=!1,showTooltip:u=!0,showTotal:d=!1}=e;const p=(0,It.Z)();if(c){const e=t+n+r+o+a+l+i;return(0,s.jsx)(kr,{progress:[{label:"Finished",value:e-l,color:p.palette.success.main},{label:"Failed",value:l,color:p.palette.error.main}],showLegend:!1,showTooltip:u})}{const e=[{label:"Finished",value:t,color:p.palette.success.main},{label:"Failed",value:l,color:p.palette.error.main},{label:"Running",value:n,color:p.palette.primary.main},{label:"Waiting for scheduling",value:o+a,color:"#cfcf08"},{label:"Waiting for dependencies",value:r,color:"#f79e02"},{label:"Unknown",value:i,color:"#5f6469"}];return(0,s.jsx)(kr,{progress:e,showLegend:!1,showTooltip:u,showTotalProgress:d?t:void 0})}},Cr=e=>{var t,n,r,a,i,l,c;let{job:u}=e;const{job_id:d,submission_id:p,driver_info:f,status:h,message:m,start_time:g,end_time:v,entrypoint:b}=u,{progress:y,error:x,driverExists:w}=(0,Sr.T)(null!==d&&void 0!==d?d:void 0),_=w?!y||x?"unavailable":"SUCCEEDED"===h||"FAILED"===h?(0,s.jsx)(Er,{...y,showAsComplete:!0}):(0,s.jsx)(Er,{...y}):(0,s.jsx)(Er,{}),S=d||p;return(0,s.jsxs)(dt.Z,{children:[(0,s.jsx)(pt.Z,{align:"center",children:d?(0,s.jsx)(Ve.Z,{component:A.rU,to:d,children:d}):p?(0,s.jsx)(Ve.Z,{component:A.rU,to:p,children:"(no ray driver)"}):"(no ray driver)"}),(0,s.jsx)(pt.Z,{align:"center",children:null!==p&&void 0!==p?p:"-"}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)($e.Z,{title:b,arrow:!0,children:(0,s.jsx)(O.Z,{sx:{display:"block",margin:"auto",maxWidth:360,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:b})})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(_r,{job:u})}),(0,s.jsx)(pt.Z,{align:"center",children:m?(0,s.jsx)(T.Z,{sx:{maxWidth:250,display:"inline-flex"},title:"Status message",code:m}):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:g&&g>0?(0,s.jsx)(fe.c,{startTime:g,endTime:v}):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:_}),(0,s.jsxs)(pt.Z,{align:"center",children:[S&&(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(Ve.Z,{component:A.rU,to:S,children:"Log"}),(0,s.jsx)("br",{})]}),(0,s.jsx)(ge.IL,{pid:null===(t=u.driver_info)||void 0===t?void 0:t.pid,ip:null===(n=u.driver_info)||void 0===n?void 0:n.node_ip_address,type:"Driver"}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.Sl,{pid:null===(r=u.driver_info)||void 0===r?void 0:r.pid,ip:null===(a=u.driver_info)||void 0===a?void 0:a.node_ip_address,type:"Driver"}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.d3,{pid:null===(i=u.driver_info)||void 0===i?void 0:i.pid,ip:null===(l=u.driver_info)||void 0===l?void 0:l.node_ip_address,type:"Driver"})]}),(0,s.jsx)(pt.Z,{align:"center",children:g?(0,he.M9)(g):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:v&&v>0?(0,he.M9)(v):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:null!==(c=null===f||void 0===f?void 0:f.pid)&&void 0!==c?c:"-"})]})},Nr=[{label:"Job ID"},{label:"Submission ID"},{label:"Entrypoint"},{label:"Status"},{label:"Status message"},{label:"Duration"},{label:"Tasks",helpInfo:(0,s.jsx)(R.Z,{children:"The progress of the all submitted tasks per job. Tasks that are not yet submitted do not show up in the progress bar."})},{label:"Actions"},{label:"StartTime"},{label:"EndTime"},{label:"Driver Pid"}],Ir=()=>(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(at,{pageInfo:{title:"Jobs",id:"jobs",path:"/jobs"}}),(0,s.jsx)(P.j3,{})]}),Ar=()=>{const{msg:e,isLoading:t,isRefreshing:n,onSwitchChange:r,jobList:o,changeFilter:a,page:i,setPage:l}=gr(),{items:c,constrainedPage:u,maxPage:d}=(0,vt.NR)(o,i.pageNo,i.pageSize);return(0,s.jsxs)(O.Z,{sx:{padding:2,width:"100%"},children:[(0,s.jsx)(He,{loading:t}),(0,s.jsxs)(nt.Z,{title:"JOBS",children:["Auto Refresh:",(0,s.jsx)(Sn.Z,{checked:n,onChange:e=>{r(e)},name:"refresh",inputProps:{"aria-label":"secondary checkbox"}}),(0,s.jsx)("br",{}),"Request Status: ",e]}),(0,s.jsx)(nt.Z,{title:"Job List",children:(0,s.jsxs)(fr.Z,{children:[(0,s.jsxs)(O.Z,{sx:{display:"flex",alignItems:"center",gap:2,paddingTop:1},children:[(0,s.jsx)(hr.Mj,{label:"Job ID",onChange:e=>a("job_id",e)}),(0,s.jsx)(hr.Mj,{label:"Submission ID",onChange:e=>a("submission_id",e)}),(0,s.jsx)(st.Z,{sx:{width:120},label:"Page Size",size:"small",defaultValue:10,InputProps:{onChange:e=>{let{target:{value:t}}=e;l("pageSize",Math.min(Number(t),500)||10)},endAdornment:(0,s.jsx)(lt.Z,{position:"end",children:"Per Page"})}}),(0,s.jsx)(ht.Z,{sx:{height:35,width:150},options:["PENDING","RUNNING","SUCCEEDED","STOPPED","FAILED"],onInputChange:(e,t)=>a("status",t.trim()),renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Status"})})]}),(0,s.jsx)("div",{children:(0,s.jsx)(mt.Z,{count:d,page:u,onChange:(e,t)=>l("pageNo",t)})}),(0,s.jsxs)(ct.Z,{children:[(0,s.jsx)(ut.Z,{children:(0,s.jsx)(dt.Z,{children:Nr.map((e=>{let{label:t,helpInfo:n}=e;return(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsxs)(O.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:[t,n&&(0,s.jsx)(Ye.b,{sx:{marginLeft:1},children:n})]})},t)}))})}),(0,s.jsx)(ft.Z,{children:c.map(((e,t)=>{var n;const{job_id:r,submission_id:o}=e;return(0,s.jsx)(Cr,{job:e},null!==(n=null!==r&&void 0!==r?r:o)&&void 0!==n?n:t)}))})]})]})})]})},Pr=e=>{if(!e)return"No cluster status.";try{const t=e.split("Resources");return Tr("Node Status",t[0].split("Node status")[1])}catch(t){return"No cluster status."}},Or=e=>{if(!e)return"No cluster status.";try{const t=e.split("Resources");return Tr("Resource Status",t[1])}catch(t){return"No cluster status."}},Tr=(e,t)=>{const n=t.split("\n");return(0,s.jsxs)("div",{children:[(0,s.jsx)(O.Z,{marginBottom:2,children:(0,s.jsx)(R.Z,{variant:"h3",children:e})}),n.map(((e,t)=>e.startsWith("-----")||e.startsWith("=====")||""===e?null:e.endsWith(":")?(0,s.jsx)("div",{children:(0,s.jsx)("b",{children:e})},t):(0,s.jsx)("div",{children:e},t)))]})},Rr=e=>{let{clusterStatus:t}=e;return(0,s.jsx)(O.Z,{style:{overflow:"hidden",overflowY:"scroll"},children:Pr(null===t||void 0===t?void 0:t.data.clusterStatus)})},Mr=e=>{let{clusterStatus:t}=e;return(0,s.jsx)(O.Z,{style:{overflow:"hidden",overflowY:"scroll"},children:Or(null===t||void 0===t?void 0:t.data.clusterStatus)})};var Lr=n(9903),Dr=n(1426);const zr=[{label:""},{label:"Dataset / Operator Name",align:"start"},{label:"Blocks Outputted",helpInfo:(0,s.jsx)(R.Z,{children:"Blocks outputted by output operator."})},{label:"State",align:"center"},{label:"Rows Outputted"},{label:"Memory Usage (current / max)",helpInfo:(0,s.jsx)(R.Z,{children:"Amount of object store memory used by a dataset. Includes spilled objects."})},{label:"Bytes Spilled",helpInfo:(0,s.jsx)(R.Z,{children:'Set "ray.data.context.DataContext.get_current().enable_get_object_locations_for_metrics = True" to collect spill stats.'})},{label:"Logical CPU Cores (current / max)",align:"center"},{label:"Logical GPU Cores (current / max)",align:"center"},{label:"Start Time",align:"center"},{label:"End Time",align:"center"}],Fr=e=>{let{datasetMetrics:t,operatorMetrics:n,isExpanded:r,setIsExpanded:o}=e;const a=void 0!==t,i=void 0!==n,l=t||n;if(a&&i||void 0===l)throw new Error("Exactly one of datasetMetrics or operatorMetrics musts be given.");return(0,s.jsxs)(dt.Z,{children:[(0,s.jsx)(pt.Z,{align:"center",children:a&&void 0!==o&&(r?(0,s.jsx)(O.Z,{component:ee,title:"Collapse Dataset "+t.dataset,sx:{width:16,height:16},onClick:()=>o(!1)}):(0,s.jsx)(O.Z,{component:ne,title:"Expand Dataset "+t.dataset,sx:{width:16,height:16},onClick:()=>o(!0)}))}),(0,s.jsxs)(pt.Z,{align:"left",children:[a&&t.dataset,i&&n.name]}),(0,s.jsx)(pt.Z,{align:"right",style:{width:200},children:(0,s.jsx)(Zr,{showLegend:!1,numFinished:l.progress,numRunning:"RUNNING"===l.state?l.total-l.progress:void 0,numCancelled:"FAILED"===l.state?l.total-l.progress:void 0,total:l.total})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(tt.b,{type:"task",status:l.state})}),(0,s.jsx)(pt.Z,{align:"right",children:l.ray_data_output_rows.max}),(0,s.jsxs)(pt.Z,{align:"right",children:[(0,Dr.r)(Number(l.ray_data_current_bytes.value)),"/",(0,Dr.r)(Number(l.ray_data_current_bytes.max))]}),(0,s.jsx)(pt.Z,{align:"right",children:(0,Dr.r)(Number(l.ray_data_spilled_bytes.max))}),(0,s.jsxs)(pt.Z,{align:"center",style:{width:200},children:[l.ray_data_cpu_usage_cores.value,"/",l.ray_data_cpu_usage_cores.max]}),(0,s.jsxs)(pt.Z,{align:"center",style:{width:200},children:[l.ray_data_gpu_usage_cores.value,"/",l.ray_data_gpu_usage_cores.max]}),(0,s.jsx)(pt.Z,{align:"center",children:a&&(0,he.M9)(1e3*t.start_time)}),(0,s.jsx)(pt.Z,{align:"center",children:a&&t.end_time&&(0,he.M9)(1e3*t.end_time)})]})},Br=e=>{let{datasetMetrics:t,isExpanded:n,setIsExpanded:r}=e;const a=n&&t.operators.map((e=>(0,s.jsx)(Fr,{operatorMetrics:e},e.operator)));return(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(Fr,{datasetMetrics:t,isExpanded:n,setIsExpanded:r}),a]})},Ur=e=>{let{datasets:t=[]}=e;const[n,r]=(0,o.useState)(1),{changeFilter:a,filterFunc:i}=(0,bt.L)(),l=t.filter(i),[c,u]=(0,o.useState)({}),{items:d,constrainedPage:p,maxPage:f}=(0,vt.NR)(l,n,10);return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center"},children:(0,s.jsx)(ht.Z,{style:{margin:8,width:120},options:Array.from(new Set(t.map((e=>e.dataset)))),onInputChange:(e,t)=>{a("dataset",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Dataset Name"})})}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,s.jsx)("div",{children:(0,s.jsx)(mt.Z,{page:p,onChange:(e,t)=>r(t),count:f})}),(0,s.jsx)("div",{children:(0,s.jsx)(yt.Z,{type:"task",list:l})})]}),(0,s.jsx)(fr.Z,{children:(0,s.jsxs)(ct.Z,{children:[(0,s.jsx)(ut.Z,{children:(0,s.jsx)(dt.Z,{children:zr.map((e=>{let{label:t,helpInfo:n,align:r}=e;return(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsxs)(O.Z,{display:"flex",justifyContent:r||"end",alignItems:"center",children:[t,n&&(0,s.jsx)(Ye.b,{sx:{marginLeft:1},children:n})]})},t)}))})}),(0,s.jsx)(ft.Z,{children:d.map((e=>(0,s.jsx)(Br,{datasetMetrics:e,isExpanded:c[e.dataset],setIsExpanded:t=>{const n={...c,[e.dataset]:t};u(n)}},e.dataset)))})]})})]})},Wr=e=>{let{datasets:t=[]}=e;return(0,s.jsx)("div",{children:(0,s.jsx)(Ur,{datasets:t})})};var Hr=n(911),$r=n(4387);function Gr(e){return(0,Ze.ZP)("MuiAlert",e)}const Vr=(0,je.Z)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),qr=(0,Bt.Z)((0,s.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Kr=(0,Bt.Z)((0,s.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Yr=(0,Bt.Z)((0,s.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),Qr=(0,Bt.Z)((0,s.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined");var Xr=n(8799);const Jr=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],eo=(0,ke.ZP)(ve.Z,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,Se.Z)(n.color||n.severity))]]}})((e=>{let{theme:t,ownerState:n}=e;const o="light"===t.palette.mode?jn._j:jn.$n,a="light"===t.palette.mode?jn.$n:jn._j,i=n.color||n.severity;return(0,r.Z)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},i&&"standard"===n.variant&&{color:t.vars?t.vars.palette.Alert["".concat(i,"Color")]:o(t.palette[i].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(i,"StandardBg")]:a(t.palette[i].light,.9),["& .".concat(Vr.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(i,"IconColor")]}:{color:t.palette[i].main}},i&&"outlined"===n.variant&&{color:t.vars?t.vars.palette.Alert["".concat(i,"Color")]:o(t.palette[i].light,.6),border:"1px solid ".concat((t.vars||t).palette[i].light),["& .".concat(Vr.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(i,"IconColor")]}:{color:t.palette[i].main}},i&&"filled"===n.variant&&(0,r.Z)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(i,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(i,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[i].dark:t.palette[i].main,color:t.palette.getContrastText(t.palette[i].main)}))})),to=(0,ke.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),no=(0,ke.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),ro=(0,ke.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),oo={success:(0,s.jsx)(qr,{fontSize:"inherit"}),warning:(0,s.jsx)(Kr,{fontSize:"inherit"}),error:(0,s.jsx)(Yr,{fontSize:"inherit"}),info:(0,s.jsx)(Qr,{fontSize:"inherit"})},ao=o.forwardRef((function(e,t){var n,o,i,l,c,u;const d=(0,a.Z)({props:e,name:"MuiAlert"}),{action:p,children:f,className:h,closeText:g="Close",color:v,components:b={},componentsProps:y={},icon:x,iconMapping:w=oo,onClose:_,role:S="alert",severity:k="success",slotProps:j={},slots:Z={},variant:E="standard"}=d,C=(0,m.Z)(d,Jr),N=(0,r.Z)({},d,{color:v,severity:k,variant:E}),I=(e=>{const{variant:t,color:n,severity:r,classes:o}=e,a={root:["root","".concat(t).concat((0,Se.Z)(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,we.Z)(a,Gr,o)})(N),A=null!=(n=null!=(o=Z.closeButton)?o:b.CloseButton)?n:Ge.Z,P=null!=(i=null!=(l=Z.closeIcon)?l:b.CloseIcon)?i:Xr.Z,O=null!=(c=j.closeButton)?c:y.closeButton,T=null!=(u=j.closeIcon)?u:y.closeIcon;return(0,s.jsxs)(eo,(0,r.Z)({role:S,elevation:0,ownerState:N,className:(0,xe.Z)(I.root,h),ref:t},C,{children:[!1!==x?(0,s.jsx)(to,{ownerState:N,className:I.icon,children:x||w[k]||oo[k]}):null,(0,s.jsx)(no,{ownerState:N,className:I.message,children:f}),null!=p?(0,s.jsx)(ro,{ownerState:N,className:I.action,children:p}):null,null==p&&_?(0,s.jsx)(ro,{ownerState:N,className:I.action,children:(0,s.jsx)(A,(0,r.Z)({size:"small","aria-label":g,title:g,color:"inherit",onClick:_},O,{children:(0,s.jsx)(P,(0,r.Z)({fontSize:"small"},T))}))}):null]}))}));function io(e){return B({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10 11H7.101l.001-.009a4.956 4.956 0 0 1 .752-1.787 5.054 5.054 0 0 1 2.2-1.811c.302-.128.617-.226.938-.291a5.078 5.078 0 0 1 2.018 0 4.978 4.978 0 0 1 2.525 1.361l1.416-1.412a7.036 7.036 0 0 0-2.224-1.501 6.921 6.921 0 0 0-1.315-.408 7.079 7.079 0 0 0-2.819 0 6.94 6.94 0 0 0-1.316.409 7.04 7.04 0 0 0-3.08 2.534 6.978 6.978 0 0 0-1.054 2.505c-.028.135-.043.273-.063.41H2l4 4 4-4zm4 2h2.899l-.001.008a4.976 4.976 0 0 1-2.103 3.138 4.943 4.943 0 0 1-1.787.752 5.073 5.073 0 0 1-2.017 0 4.956 4.956 0 0 1-1.787-.752 5.072 5.072 0 0 1-.74-.61L7.05 16.95a7.032 7.032 0 0 0 2.225 1.5c.424.18.867.317 1.315.408a7.07 7.07 0 0 0 2.818 0 7.031 7.031 0 0 0 4.395-2.945 6.974 6.974 0 0 0 1.053-2.503c.027-.135.043-.273.063-.41H22l-4-4-4 4z"}}]})(e)}function so(e){return B({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z"}},{tag:"path",attr:{d:"M13 7h-2v6h6v-2h-4z"}}]})(e)}const lo=()=>{const e=(()=>{const[e,t]=(0,o.useState)([]);return{mainNavPageHierarchy:e,addPage:(0,o.useCallback)((e=>{t((t=>[...t,{title:e,pageTitle:e,id:e}]))}),[]),updatePage:(0,o.useCallback)(((e,n,r,o)=>{t((t=>{const a=t.findIndex((e=>e.id===n));return[...t.slice(0,a),{title:e,pageTitle:o,id:n,path:r},...t.slice(a+1)]}))}),[]),removePage:(0,o.useCallback)((e=>{t((t=>{console.assert(t.length>0,"Trying to remove when nav hierarchy length is 0");const n=t.findIndex((t=>t.id===e));return console.assert(-1!==n,"Trying to remove page that is not in the hiearchy..."),-1===n?t:[...t.slice(0,n),...t.slice(n+1)]}))}),[])}})();return(0,s.jsxs)(ot.Provider,{value:e,children:[(0,s.jsxs)(O.Z,{component:"nav",sx:{position:"fixed",width:"100%",backgroundColor:"white",zIndex:1e3},children:[(0,s.jsx)(po,{}),(0,s.jsx)(fo,{})]}),(0,s.jsx)(co,{})]})},co=()=>{const{mainNavPageHierarchy:e}=(0,o.useContext)(ot),t=e.length>1;return(0,s.jsx)(O.Z,{component:"main",sx:{paddingTop:"".concat(t?94:56,"px")},children:(0,s.jsx)(P.j3,{})})},uo=[{title:"Overview",path:"/overview",id:"overview"},{title:"Jobs",path:"/jobs",id:"jobs"},{title:"Serve",path:"/serve",id:"serve"},{title:"Cluster",path:"/cluster",id:"cluster"},{title:"Actors",path:"/actors",id:"actors"},{title:"Metrics",path:"/metrics",id:"metrics"},{title:"Logs",path:"/logs",id:"logs"}],po=()=>{var e;const{mainNavPageHierarchy:t}=(0,o.useContext)(ot),n=null===(e=t[0])||void 0===e?void 0:e.id,{metricsContextLoaded:r,grafanaHost:a,serverTimeZone:i,currentTimeZone:l}=(0,o.useContext)(vs);let c=uo;return r&&"DISABLED"!==a||(c=c.filter((e=>{let{id:t}=e;return"metrics"!==t}))),(0,s.jsxs)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",height:56,backgroundColor:"white",alignItems:"center",boxShadow:"0px 1px 0px #D2DCE6"},children:[(0,s.jsx)(Ve.Z,{component:A.rU,sx:{display:"flex",justifyContent:"center",marginLeft:2,marginRight:3},to:"/",children:(0,s.jsx)("img",{width:28,src:dr,alt:"Ray"})}),c.map((e=>{let{title:t,path:r,id:o}=e;return(0,s.jsx)(R.Z,{children:(0,s.jsx)(Ve.Z,{component:A.rU,sx:{marginRight:6,fontSize:"1rem",fontWeight:500,color:n===o?"#036DCF":"black",textDecoration:"none"},to:r,children:t})},o)})),(0,s.jsx)(O.Z,{sx:{flexGrow:1}}),(0,s.jsxs)(O.Z,{sx:{marginRight:2},children:[(0,s.jsx)($e.Z,{title:"Docs",children:(0,s.jsx)(Ge.Z,{sx:{color:"#5F6469"},href:"https://docs.ray.io/en/latest/ray-core/ray-dashboard.html",target:"_blank",rel:"noopener noreferrer",size:"large",children:(0,s.jsx)(V,{})})}),(0,s.jsx)($e.Z,{title:"Leave feedback",children:(0,s.jsx)(Ge.Z,{sx:{color:"#5F6469"},href:"https://github.com/ray-project/ray/issues/new?assignees=&labels=bug%2Ctriage%2Cdashboard&template=bug-report.yml&title=%5BDashboard%5D+%3CTitle%3E",target:"_blank",rel:"noopener noreferrer",size:"large",children:(0,s.jsx)(H,{})})})]}),(0,s.jsx)($e.Z,{placement:"left-start",title:"The timezone of logs are not impacted by this selection.",children:(0,s.jsx)(O.Z,{sx:{marginRight:3},children:(0,s.jsx)(hr.y6,{currentTimeZone:l,serverTimeZone:i})})})]})},fo=()=>{const{mainNavPageHierarchy:e}=(0,o.useContext)(ot);if(e.length<=1)return null;let t="";return(0,s.jsx)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",height:36,marginTop:"1px",paddingLeft:2,paddingRight:2,backgroundColor:"white",alignItems:"center",boxShadow:"0px 1px 0px #D2DCE6"},children:e.map(((n,r)=>{let{title:a,id:i,path:l}=n;l&&(t=l.startsWith("/")?l:"".concat(t,"/").concat(l));const c=l?(0,s.jsx)(Ve.Z,{component:A.rU,sx:{textDecoration:"none",color:r===e.length-1?"black":"#8C9196"},to:t,children:a}):a;return 0===r?(0,s.jsx)(R.Z,{sx:{fontWeight:500,color:"#8C9196","&:not(:first-child)":{marginLeft:1}},variant:"body2",children:c},i):(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(R.Z,{sx:{fontWeight:500,color:"#8C9196","&:not(:first-child)":{marginLeft:1}},variant:"body2",children:"/"}),(0,s.jsx)(R.Z,{sx:{fontWeight:500,color:"#8C9196","&:not(:first-child)":{marginLeft:1}},variant:"body2",children:c})]},i)}))})};let ho,mo;!function(e){e.OFF="off",e.FIVE_SECONDS="5s",e.TEN_SECONDS="10s",e.THIRTY_SECONDS="30s",e.ONE_MIN="1m",e.FIVE_MINS="5m",e.FIFTEEN_MINS="15m",e.THIRTY_MINS="30m",e.ONE_HOUR="1h",e.TWO_HOURS="2h",e.ONE_DAY="1d"}(ho||(ho={})),function(e){e.FIVE_MINS="Last 5 minutes",e.THIRTY_MINS="Last 30 minutes",e.ONE_HOUR="Last 1 hour",e.THREE_HOURS="Last 3 hours",e.SIX_HOURS="Last 6 hours",e.TWELVE_HOURS="Last 12 hours",e.ONE_DAY="Last 1 day",e.TWO_DAYS="Last 2 days",e.SEVEN_DAYS="Last 7 days"}(mo||(mo={}));const go={[ho.OFF]:"",[ho.FIVE_SECONDS]:"5s",[ho.TEN_SECONDS]:"10s",[ho.THIRTY_SECONDS]:"30s",[ho.ONE_MIN]:"1m",[ho.FIVE_MINS]:"5m",[ho.FIFTEEN_MINS]:"15m",[ho.THIRTY_MINS]:"30m",[ho.ONE_HOUR]:"1h",[ho.TWO_HOURS]:"2h",[ho.ONE_DAY]:"1d"},vo={[mo.FIVE_MINS]:"now-5m",[mo.THIRTY_MINS]:"now-30m",[mo.ONE_HOUR]:"now-1h",[mo.THREE_HOURS]:"now-3h",[mo.SIX_HOURS]:"now-6h",[mo.TWELVE_HOURS]:"now-12h",[mo.ONE_DAY]:"now-1d",[mo.TWO_DAYS]:"now-2d",[mo.SEVEN_DAYS]:"now-7d"},bo=[{title:"Tasks and Actors",contents:[{title:"Scheduler Task State",pathParams:"theme=light&panelId=26"},{title:"Requested Live Tasks by Name",pathParams:"theme=light&panelId=35"},{title:"Running Tasks by Name",pathParams:"theme=light&panelId=38"},{title:"Scheduler Actor State",pathParams:"theme=light&panelId=33"},{title:"Requested Live Actors by Name",pathParams:"theme=light&panelId=36"},{title:"Out of Memory Failures by Name",pathParams:"theme=light&panelId=44"}]},{title:"Ray Resource Usage",contents:[{title:"Scheduler CPUs (logical slots)",pathParams:"theme=light&panelId=27"},{title:"Scheduler GPUs (logical slots)",pathParams:"theme=light&panelId=28"},{title:"Object Store Memory",pathParams:"theme=light&panelId=29"},{title:"Placement Groups",pathParams:"theme=light&panelId=40"}]},{title:"Hardware Utilization",contents:[{title:"Node Count",pathParams:"theme=light&panelId=24"},{title:"Node CPU (hardware utilization)",pathParams:"theme=light&panelId=2"},{title:"Node Memory (heap + object store)",pathParams:"theme=light&panelId=4"},{title:"Node Memory Percentage (heap + object store)",pathParams:"theme=light&panelId=48"},{title:"Node GPU (hardware utilization)",pathParams:"theme=light&panelId=8"},{title:"Node GPU Memory (GRAM)",pathParams:"theme=light&panelId=18"},{title:"Node TPU (tensorcore utilization)",pathParams:"theme=light&panelId=50"},{title:"Node TPU (high bandwidth memory utilization)",pathParams:"theme=light&panelId=51"},{title:"Node TPU (duty cycle)",pathParams:"theme=light&panelId=52"},{title:"Node TPU (memory used)",pathParams:"theme=light&panelId=53"},{title:"Node Disk",pathParams:"theme=light&panelId=6"},{title:"Node Disk IO Speed",pathParams:"theme=light&panelId=32"},{title:"Node Network",pathParams:"theme=light&panelId=20"},{title:"Node CPU by Component",pathParams:"theme=light&panelId=37"},{title:"Node Memory by Component",pathParams:"theme=light&panelId=34"},{title:"Node GPU by Component",pathParams:"orgId=1&theme=light&panelId=45"},{title:"Node GPU Memory by Component",pathParams:"orgId=1&theme=light&panelId=46"}]}],yo=[{title:"Ray Data Metrics (Overview)",contents:[{title:"Bytes Spilled",pathParams:"theme=light&panelId=1"},{title:"Bytes Freed",pathParams:"theme=light&panelId=3"},{title:"Object Store Memory",pathParams:"theme=light&panelId=4"},{title:"CPUs (logical slots)",pathParams:"theme=light&panelId=5"},{title:"GPUs (logical slots)",pathParams:"theme=light&panelId=6"},{title:"Bytes Outputted",pathParams:"theme=light&panelId=7"},{title:"Rows Outputted",pathParams:"theme=light&panelId=11"}]},{title:"Ray Data Metrics (Inputs)",contents:[{title:"Input Blocks Received by Operator",pathParams:"theme=light&panelId=17"},{title:"Input Blocks Processed by Tasks",pathParams:"theme=light&panelId=19"},{title:"Input Bytes Processed by Tasks",pathParams:"theme=light&panelId=20"},{title:"Input Bytes Submitted to Tasks",pathParams:"theme=light&panelId=21"}]},{title:"Ray Data Metrics (Outputs)",contents:[{title:"Blocks Generated by Tasks",pathParams:"theme=light&panelId=22"},{title:"Bytes Generated by Tasks",pathParams:"theme=light&panelId=23"},{title:"Rows Generated by Tasks",pathParams:"theme=light&panelId=24"},{title:"Output Blocks Taken by Downstream Operators",pathParams:"theme=light&panelId=25"},{title:"Output Bytes Taken by Downstream Operators",pathParams:"theme=light&panelId=26"}]},{title:"Ray Data Metrics (Tasks)",contents:[{title:"Submitted Tasks",pathParams:"theme=light&panelId=29"},{title:"Running Tasks",pathParams:"theme=light&panelId=30"},{title:"Tasks with output blocks",pathParams:"theme=light&panelId=31"},{title:"Finished Tasks",pathParams:"theme=light&panelId=32"},{title:"Failed Tasks",pathParams:"theme=light&panelId=33"},{title:"Block Generation Time",pathParams:"theme=light&panelId=8"},{title:"Task Submission Backpressure Time",pathParams:"theme=light&panelId=37"},{title:"Task Completion Time",pathParams:"theme=light&panelId=38"}]},{title:"Ray Data Metrics (Object Store Memory)",contents:[{title:"Operator Internal Inqueue Size (Blocks)",pathParams:"theme=light&panelId=13"},{title:"Operator Internal Inqueue Size (Bytes)",pathParams:"theme=light&panelId=14"},{title:"Operator Internal Outqueue Size (Blocks)",pathParams:"theme=light&panelId=15"},{title:"Operator Internal Outqueue Size (Bytes)",pathParams:"theme=light&panelId=16"},{title:"Size of Blocks used in Pending Tasks (Bytes)",pathParams:"theme=light&panelId=34"},{title:"Freed Memory in Object Store (Bytes)",pathParams:"theme=light&panelId=35"},{title:"Spilled Memory in Object Store (Bytes)",pathParams:"theme=light&panelId=36"}]},{title:"Ray Data Metrics (Iteration)",contents:[{title:"Iteration Initialization Time",pathParams:"theme=light&panelId=12"},{title:"Iteration Blocked Time",pathParams:"theme=light&panelId=9"},{title:"Iteration User Time",pathParams:"theme=light&panelId=10"}]}],xo=()=>{var e;const{grafanaHost:t,grafanaOrgId:n,prometheusHealth:r,dashboardUids:a,dashboardDatasource:i}=(0,o.useContext)(vs),l=null!==(e=null===a||void 0===a?void 0:a.default)&&void 0!==e?e:"rayDefaultDashboard",c=null!==n&&void 0!==n?n:"1",u=null!==i&&void 0!==i?i:"Prometheus",[d,p]=(0,o.useState)(ho.FIVE_SECONDS),[f,h]=(0,o.useState)(mo.FIVE_MINS),[m,g]=(0,o.useState)(null),[[v,b],y]=(0,o.useState)([null,null]);(0,o.useEffect)((()=>{g(go[d])}),[d]),(0,o.useEffect)((()=>{y([vo[f],"now"])}),[f]);const[x,w]=(0,o.useState)(null),_=null!==v?"&from=".concat(v):"",S=null!==b?"&to=".concat(b):"",k="".concat(_).concat(S),j=m?"&refresh=".concat(m):"";return(0,s.jsxs)("div",{children:[(0,s.jsx)(at,{pageInfo:{id:"metrics",title:"Metrics",path:"/metrics"}}),void 0!==t&&r?(0,s.jsxs)("div",{children:[(0,s.jsxs)(ve.Z,{sx:{position:"sticky",top:56,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",padding:1,boxShadow:"0px 1px 0px #D2DCE6",zIndex:1,height:36},children:[(0,s.jsx)(kn.Z,{onClick:e=>{let{currentTarget:t}=e;w(t)},endIcon:(0,s.jsx)(se,{}),children:"View in Grafana"}),x&&(0,s.jsxs)(Hr.Z,{open:!0,anchorEl:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:()=>{w(null)},children:[(0,s.jsx)($r.Z,{component:"a",href:"".concat(t,"/d/").concat(l,"/?orgId=").concat(n,"&var-datasource=").concat(u),target:"_blank",rel:"noopener noreferrer",children:"Core Dashboard"}),(null===a||void 0===a?void 0:a.data)&&(0,s.jsx)($e.Z,{title:"The Ray Data dashboard has a dropdown to filter the data metrics by Dataset ID",children:(0,s.jsx)($r.Z,{component:"a",href:"".concat(t,"/d/").concat(a.data,"/?orgId=").concat(n,"&var-datasource=").concat(u),target:"_blank",rel:"noopener noreferrer",children:"Ray Data Dashboard"})})]}),(0,s.jsx)(st.Z,{sx:{marginLeft:2,width:80},select:!0,size:"small",value:d,onChange:e=>{let{target:{value:t}}=e;p(t)},variant:"standard",InputProps:{startAdornment:(0,s.jsx)(lt.Z,{position:"start",children:(0,s.jsx)(io,{style:{fontSize:25,paddingBottom:5}})})},children:Object.entries(ho).map((e=>{let[t,n]=e;return(0,s.jsx)($r.Z,{value:n,children:n},t)}))}),(0,s.jsx)(Ye.b,{children:"Auto-refresh interval"}),(0,s.jsx)(st.Z,{sx:{marginLeft:2,width:140},select:!0,size:"small",value:f,onChange:e=>{let{target:{value:t}}=e;h(t)},variant:"standard",InputProps:{startAdornment:(0,s.jsx)(lt.Z,{position:"start",children:(0,s.jsx)(so,{style:{fontSize:22,paddingBottom:5}})})},children:Object.entries(mo).map((e=>{let[t,n]=e;return(0,s.jsx)($r.Z,{value:n,children:n},t)}))}),(0,s.jsx)(Ye.b,{children:"Time range picker"})]}),(0,s.jsx)(ao,{severity:"info",children:"Tip: You can click on the legend to focus on a specific line in the time-series graph. You can use control/cmd + click to filter out a line in the time-series graph."}),(0,s.jsxs)(O.Z,{sx:{margin:1},children:[bo.map((e=>(0,s.jsx)(wo,{metricConfig:e,refreshParams:j,timeRangeParams:k,grafanaOrgId:c,dashboardUid:l,dashboardDatasource:u},e.title))),(null===a||void 0===a?void 0:a.data)&&yo.map((e=>(0,s.jsx)(wo,{metricConfig:e,refreshParams:j,timeRangeParams:k,grafanaOrgId:c,dashboardUid:a.data,dashboardDatasource:u},e.title)))]})]}):(0,s.jsx)(_o,{sx:{marginTop:"30px"}})]})},wo=e=>{let{metricConfig:{title:t,contents:n},refreshParams:r,timeRangeParams:a,grafanaOrgId:i,dashboardUid:l,dashboardDatasource:c}=e;const{grafanaHost:u,sessionName:d,currentTimeZone:p}=(0,o.useContext)(vs);return(0,s.jsx)(de,{title:t,startExpanded:!0,sx:{marginTop:3},keepRendered:!0,children:(0,s.jsx)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:3,marginTop:2},children:n.map((e=>{let{title:t,pathParams:n}=e;const o="/d-solo/".concat(l,"?").concat(n,"&orgId=").concat(i)+"&".concat(r,"&timezone=").concat(p).concat(a,"&var-SessionName=").concat(d,"&var-datasource=").concat(c);return(0,s.jsx)(ve.Z,{sx:e=>({width:"100%",height:400,overflow:"hidden",[e.breakpoints.up("md")]:{width:"calc((100% - ".concat(e.spacing(3)," * 2) / 3)")}}),variant:"outlined",elevation:0,children:(0,s.jsx)(O.Z,{component:"iframe",title:t,sx:{width:"100%",height:"100%"},src:"".concat(u).concat(o),frameBorder:"0"},t)},n)}))})},t)},_o=e=>{let{className:t,severity:n="warning",sx:r}=e;const{grafanaHost:a,prometheusHealth:i}=(0,o.useContext)(vs);return void 0!==a&&i?null:(0,s.jsxs)(ao,{className:t,sx:r,severity:n,children:[(0,s.jsx)(O.Z,{component:"span",sx:{fontWeight:500},children:"Set up Prometheus and Grafana for better Ray Dashboard experience"}),(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Time-series charts are hidden because either Prometheus or Grafana server is not detected. Follow"," ",(0,s.jsx)(Ve.Z,{href:"https://docs.ray.io/en/latest/cluster/metrics.html",target:"_blank",rel:"noreferrer",children:"these instructions"})," ","to set them up and refresh this page."]})},So=e=>{let{children:t,className:n,sx:r}=e;return(0,s.jsx)(ve.Z,{className:n,sx:[{height:400,overflow:"hidden"},...Array.isArray(r)?r:[r]],variant:"outlined",children:t})},ko=e=>{let{text:t,to:n}=e;return(0,s.jsxs)(Ve.Z,{component:A.rU,sx:{color:"#036DCF",textDecoration:"none",display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center"},to:n,children:[(0,s.jsx)(R.Z,{variant:"h4",children:t}),(0,s.jsx)(O.Z,{component:te,sx:{marginLeft:.5,width:24,height:24}})]})},jo=e=>{var t;let{className:n,sx:r}=e;const{metricsContextLoaded:a,grafanaHost:i,grafanaOrgId:l,prometheusHealth:c,sessionName:u,dashboardUids:d,dashboardDatasource:p,currentTimeZone:f}=(0,o.useContext)(vs),h=null!==(t=null===d||void 0===d?void 0:d.default)&&void 0!==t?t:"rayDefaultDashboard",m="/d-solo/".concat(h,"/default-dashboard?orgId=").concat(l,"&theme=light&panelId=24&var-datasource=").concat(p);return a&&"DISABLED"!==i?(0,s.jsxs)(So,{className:n,sx:[{display:"flex",flexDirection:"column",flexWrap:"nowrap"},...Array.isArray(r)?r:[r]],children:[void 0!==i&&c?(0,s.jsx)(O.Z,{component:"iframe",title:"Node Count",sx:{flex:1},src:"".concat(i).concat(m,"&refresh&timezone=").concat(f).concat("&from=now-1h&to=now","&var-SessionName=").concat(u),frameBorder:"0"}):(0,s.jsxs)(O.Z,{sx:{flex:1,paddingX:3,paddingY:2},children:[(0,s.jsx)(R.Z,{variant:"h3",children:"Node count"}),(0,s.jsx)(_o,{sx:{marginTop:2},severity:"info"})]}),(0,s.jsx)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",marginX:3,marginTop:1,marginBottom:2},children:(0,s.jsx)(ko,{text:"View all nodes",to:"/cluster"})})]}):null},Zo=e=>{let{bundles:t}=e;const n=t.map((e=>{let{unit_resources:t}=e;return t}));return(0,s.jsx)(o.Fragment,{children:Object.entries(n).length>0?(0,s.jsx)(T.Z,{title:"Required resources",code:JSON.stringify(n,void 0,2)}):"[]"})},Eo=e=>{let{bundles:t}=e;const n=t.map((e=>{let{label_selector:t}=e;return t}));return(0,s.jsx)(o.Fragment,{children:Object.entries(n).length>0?(0,s.jsx)(T.Z,{title:"Label selector",code:JSON.stringify(n,void 0,2)}):"[]"})},Co=e=>{let{placementGroups:t=[],jobId:n=null}=e;const[r,a]=(0,o.useState)(1),{changeFilter:i,filterFunc:l}=(0,bt.L)(),[c,u]=(0,o.useState)(10),d=t.filter(l),{items:p,constrainedPage:f,maxPage:h}=(0,vt.NR)(d,r,c);return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{flex:1,display:"flex",alignItems:"center"},children:[(0,s.jsx)(ht.Z,{style:{margin:8,width:120},options:Array.from(new Set(t.map((e=>e.placement_group_id)))),onInputChange:(e,t)=>{i("placement_group_id",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Placement group ID"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:120},options:Array.from(new Set(t.map((e=>e.state)))),onInputChange:(e,t)=>{i("state",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"State"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:150},defaultValue:n,options:Array.from(new Set(t.map((e=>e.creator_job_id)))),onInputChange:(e,t)=>{i("creator_job_id",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Job Id"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:150},options:Array.from(new Set(t.map((e=>e.name)))),onInputChange:(e,t)=>{i("name",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Name"})}),(0,s.jsx)(st.Z,{label:"Page Size",sx:{margin:1,width:120},size:"small",defaultValue:10,InputProps:{onChange:e=>{let{target:{value:t}}=e;u(Math.min(Number(t),500)||10)},endAdornment:(0,s.jsx)(lt.Z,{position:"end",children:"Per Page"})}})]}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,s.jsx)("div",{children:(0,s.jsx)(mt.Z,{page:f,onChange:(e,t)=>a(t),count:h})}),(0,s.jsx)("div",{children:(0,s.jsx)(yt.Z,{type:"placementGroup",list:d})})]}),(0,s.jsx)(O.Z,{sx:{overflowX:"scroll"},children:(0,s.jsxs)(ct.Z,{children:[(0,s.jsx)(ut.Z,{children:(0,s.jsx)(dt.Z,{children:[{label:"ID"},{label:"Name"},{label:"Job Id"},{label:"State"},{label:"Reserved Resources"},{label:"Label Selector"},{label:"Scheduling Detail"}].map((e=>{let{label:t}=e;return(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(O.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:t})},t)}))})}),(0,s.jsx)(ft.Z,{children:p.map((e=>{let{placement_group_id:t,name:n,creator_job_id:r,state:o,stats:a,bundles:i}=e;return(0,s.jsxs)(dt.Z,{children:[(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)($e.Z,{title:t,arrow:!0,children:(0,s.jsx)(O.Z,{sx:gt.Z.idCol,children:t})})}),(0,s.jsx)(pt.Z,{align:"center",children:n||"-"}),(0,s.jsx)(pt.Z,{align:"center",children:r}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(tt.b,{type:"placementGroup",status:o})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(Zo,{bundles:i})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(Eo,{bundles:i})}),(0,s.jsx)(pt.Z,{align:"center",children:a?a.scheduling_state:"-"})]},t)}))})]})})]})},No=()=>(0,_t.U)("api/v0/placement_groups?detail=1&limit=10000"),Io=e=>{let{jobId:t=null}=e;const[n]=(0,o.useState)(C()()),r=Zt("usePlacementGroup",No),a=r||[];return(0,s.jsxs)("div",{children:[(0,s.jsx)(it.ZP,{container:!0,alignItems:"center",children:(0,s.jsxs)(it.ZP,{item:!0,children:["Last updated: ",n.format("YYYY-MM-DD HH:mm:ss")]})}),(0,s.jsx)(Co,{placementGroups:a,jobId:t})]})},Ao=()=>{const{data:e}=(0,kt.ZP)("useClusterStatus",(async()=>{try{return(await(0,_t.U)("api/cluster_status?format=1")).data}catch(e){console.error("Cluster Status Error. Couldn't get the cluster status data from the dashboard server.")}}),{refreshInterval:jt.Q});return{clusterStatus:e}},Po=()=>{const e=(0,P.UO)(),[t,n]=(0,o.useState)("Loading the job detail"),[r,a]=(0,o.useState)(!0),{data:i,isLoading:s}=(0,kt.ZP)(["useJobDetail",e.id],(async e=>{let[t,r]=e;try{return(await(0,mr.iK)(r)).data}catch(o){n("Job Query Error Please Check JobId"),a(!1)}}),{refreshInterval:r?jt.Q:0});return{job:i,isLoading:s,msg:t,params:e}},Oo=()=>{const{job:e,msg:t,isLoading:n,params:r}=Po();return e?(0,s.jsxs)(O.Z,{sx:{padding:2,backgroundColor:"white"},children:[(0,s.jsx)(at,{pageInfo:{title:"Info",id:"job-info",path:e.job_id?"/jobs/".concat(e.job_id,"/info"):void 0}}),(0,s.jsx)(R.Z,{variant:"h2",children:e.job_id}),(0,s.jsx)(To,{job:e})]}):(0,s.jsxs)(O.Z,{sx:{padding:2,backgroundColor:"white"},children:[(0,s.jsx)(at,{pageInfo:{title:"Info",id:"job-info",path:"info"}}),(0,s.jsx)(He,{loading:n}),(0,s.jsxs)(nt.Z,{title:"JOB - ".concat(r.id),children:[(0,s.jsx)(tt.b,{type:"job",status:"LOADING"}),(0,s.jsx)("br",{}),"Request Status: ",t," ",(0,s.jsx)("br",{})]})]})},To=e=>{var t,n,r,a,i,l;let{job:c}=e;return(0,s.jsx)(et,{metadataList:[{label:"Entrypoint",content:c.entrypoint?{value:c.entrypoint,copyableValue:c.entrypoint}:{value:"-"}},{label:"Status",content:(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(_r,{job:c})," ",c.message&&(0,s.jsx)(T.b,{title:"Status details",code:c.message,buttonText:"View details"})]})},{label:"Job ID",content:c.job_id?{value:c.job_id,copyableValue:c.job_id}:{value:"-"}},{label:"Submission ID",content:c.submission_id?{value:c.submission_id,copyableValue:c.submission_id}:{value:"-"}},{label:"Duration",content:c.start_time?(0,s.jsx)(fe.c,{startTime:c.start_time,endTime:c.end_time}):(0,s.jsx)(o.Fragment,{children:"-"})},{label:"Started at",content:{value:c.start_time?(0,he.M9)(c.start_time):"-"}},{label:"Ended at",content:{value:c.end_time?(0,he.M9)(c.end_time):"-"}},{label:"Runtime environment",...c.runtime_env?{content:(0,s.jsx)(T.b,{title:"Runtime environment",code:(0,vt.A8)(c.runtime_env)})}:{content:{value:"-"}}},..."SUBMISSION"===c.type?[{label:"User-provided metadata",content:c.metadata&&Object.keys(c.metadata).length?(0,s.jsx)(T.Z,{sx:{display:"inline-flex",maxWidth:"100%"},title:"User-provided metadata",code:JSON.stringify(c.metadata,void 0,2)}):void 0}]:[],{label:"Actions",content:(0,s.jsxs)("div",{children:[(0,s.jsx)(ge.IL,{pid:null===(t=c.driver_info)||void 0===t?void 0:t.pid,ip:null===(n=c.driver_info)||void 0===n?void 0:n.node_ip_address,type:"Driver"}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.Sl,{pid:null===(r=c.driver_info)||void 0===r?void 0:r.pid,ip:null===(a=c.driver_info)||void 0===a?void 0:a.node_ip_address,type:"Driver"}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.d3,{pid:null===(i=c.driver_info)||void 0===i?void 0:i.pid,ip:null===(l=c.driver_info)||void 0===l?void 0:l.node_ip_address,type:"Driver"})]})}]})},Ro=e=>{var t,n;let{job:r}=e;const{driver_node_id:a,submission_id:i,type:l}=r,c=i?"job-driver-".concat(i,".log"):void 0,{nodeMapByIp:u}=(0,o.useContext)(vs);let d;return r.driver_node_id?d="/logs/?nodeId=".concat(encodeURIComponent(r.driver_node_id)):null!==(t=r.driver_info)&&void 0!==t&&t.node_id?d="/logs/?nodeId=".concat(encodeURIComponent(r.driver_info.node_id)):null!==(n=r.driver_info)&&void 0!==n&&n.node_ip_address&&(d="/logs/?nodeId=".concat(encodeURIComponent(u[r.driver_info.node_ip_address]))),d&&r.job_id?d+="&fileName=".concat(r.job_id):d=void 0,(0,s.jsx)(Qn,{tabs:["SUBMISSION"===l?{title:"Driver",nodeId:a,filename:c}:{title:"Driver",contents:"Driver logs are only available when submitting jobs via the Job Submission API, SDK or the `ray job submit` CLI command.\nTo learn more, please read the documentation at https://docs.ray.io/en/latest/cluster/running-applications/job-submission/index.html"}],otherLogsLink:d,contextKey:"job-driver"})};var Mo=n(2114),Lo=n(4454);const Do=e=>{let{progressGroups:t,className:n,sx:r,...o}=e;return(0,s.jsx)(ct.Z,{className:n,sx:r,children:(0,s.jsx)(ft.Z,{children:void 0!==t?t.map((e=>(0,s.jsx)(zo,{jobProgressGroup:e,...o},e.key))):(0,s.jsx)(dt.Z,{children:(0,s.jsx)(pt.Z,{children:"Loading..."})})})})},zo=e=>{let{jobProgressGroup:{name:t,progress:n,children:r,type:a,link:i},startExpanded:l=!1,nestedIndex:c=1,showParentCollapseButton:u=!1,onParentCollapseButtonPressed:d,onClickLink:p}=e;const[f,h]=(0,o.useState)(l),m="GROUP"===a,g=m?f?ue:J:f?ee:ne,v=m&&f,b=v?()=>{h(!1)}:void 0;return(0,s.jsxs)(o.Fragment,{children:[m&&f?null:(0,s.jsxs)(dt.Z,{children:[(0,s.jsxs)(pt.Z,{sx:{paddingLeft:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"},onClick:()=>{h(!f)},children:[u&&(0,s.jsx)(O.Z,{component:ue,title:"Collapse group",onClick:d,sx:{width:16,height:16,verticalAlign:"top",marginRight:.5,marginLeft:3*(c-1)}}),(0,s.jsx)(O.Z,{component:g,title:f?"Collapse":"Expand",sx:{width:16,height:16,verticalAlign:"top",marginRight:.5,visibility:0===r.length?"hidden":"visible"},style:{marginLeft:u?4:24*(m?c-1:c),marginRight:m?28:4}}),i?"actor"===i.type?(0,s.jsx)(O.Z,{component:"button",sx:{border:"none",cursor:"pointer",color:"#036DCF",textDecoration:"underline",background:"none"},onClick:e=>{null===p||void 0===p||p(i),e.stopPropagation()},children:t}):(0,s.jsx)(Ve.Z,{component:A.rU,sx:{border:"none",cursor:"pointer",color:"#036DCF",textDecoration:"underline",background:"none"},to:"tasks/".concat(i.id),children:t}):t,m&&(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(O.Z,{component:"span",sx:{width:4}}),"(",(0,s.jsx)(ae,{})," ",r.length,")"]})]}),(0,s.jsx)(pt.Z,{sx:{width:"100%",paddingRight:0},children:(0,s.jsx)(Er,{...n,showTotal:!0})})]}),f&&r.map(((e,t)=>(0,s.jsx)(zo,{jobProgressGroup:e,nestedIndex:m?c:c+1,showParentCollapseButton:v&&0===t,onParentCollapseButtonPressed:b,onClickLink:p},e.key)))]})},Fo=e=>{let{jobId:t,job:n,...r}=e;const[a,i]=(0,o.useState)(!1),[l,c]=(0,o.useState)(!1),[u,d]=(0,o.useState)(!0);(0,o.useEffect)((()=>{l&&i(!0)}),[l]);const{progress:p,isLoading:f,driverExists:h,totalTasks:m,latestFetchTimestamp:g}=(0,Sr.T)(t,l),{progressGroups:v,isLoading:b,total:y,totalTasks:x,latestFetchTimestamp:w}=(0,Sr.$8)(a?t:void 0,!l,u);if(!h)return(0,s.jsx)(Zr,{});if(f&&(b||!a))return(0,s.jsx)(qn,{});const{status:_}=n,[S,k]=void 0===y||void 0===x||g>w?[p,m]:[y,x];return(0,s.jsxs)("div",{children:[(0,s.jsx)(Zr,{...S,total:k,showAsComplete:"SUCCEEDED"===_||"FAILED"===_,showTooltip:!1,expanded:l,onClick:()=>c(!l),controls:(0,s.jsx)(Mo.Z,{control:(0,s.jsx)(Lo.Z,{color:"primary",value:!u,onChange:e=>{let{target:{checked:t}}=e;d(!t)}}),label:"Hide finished",sx:{marginRight:0}})}),l&&(0,s.jsx)(Do,{sx:{marginTop:.5},progressGroups:v,...r})]})},Bo=e=>{let{jobId:t}=e;return(0,s.jsxs)("div",{children:[(0,s.jsxs)(R.Z,{children:["Timeline view shows how tasks are executed across different nodes and worker processes.",(0,s.jsx)("br",{}),"Download the trace file and analyze it by uploading it to tools like"," ",(0,s.jsx)(Ve.Z,{href:"https://ui.perfetto.dev/",target:"_blank",rel:"noreferrer",children:"Perfetto UI"})," ","or if you are using chrome,"," ",(0,s.jsx)(Ve.Z,{href:"chrome://tracing",children:"chrome://tracing"}),". You can use the tool by visiting chrome://tracing using your address bar."]}),(0,s.jsx)(Uo,{sx:{marginTop:2},jobId:t})]})},Uo=e=>{let{jobId:t,className:n,sx:r}=e;return(0,s.jsx)(kn.Z,{sx:r,className:n,variant:"outlined",startIcon:(0,s.jsx)(ie,{}),href:St(t),children:"Download trace file"})},Wo=()=>{const{job:e,msg:t,isLoading:n,params:r}=Po(),[a,i]=(0,o.useState)(),[l,c]=(0,o.useState)(!1),u=(0,o.useRef)(null),[d,p]=(0,o.useState)(),[f,h]=(0,o.useState)(!1),m=(0,o.useRef)(null),{clusterStatus:g}=Ao(),{data:v}=(0,kt.ZP)(null!==e&&void 0!==e&&e.job_id?["useDataDatasets",e.job_id]:null,(async e=>{let[t,n]=e;const r=await(e=>(0,_t.U)("api/data/datasets/".concat(e)))(n);if(r)return r.data}),{refreshInterval:5e3});if(!e)return(0,s.jsxs)(O.Z,{sx:{padding:2,backgroundColor:"white"},children:[(0,s.jsx)(He,{loading:n}),(0,s.jsxs)(nt.Z,{title:"JOB - ".concat(r.id),children:[(0,s.jsx)(tt.b,{type:"job",status:"LOADING"}),(0,s.jsx)("br",{}),"Request Status: ",t," ",(0,s.jsx)("br",{})]})]});return(0,s.jsxs)(O.Z,{sx:{padding:2,backgroundColor:"white"},children:[(0,s.jsx)(To,{job:e}),(null===v||void 0===v?void 0:v.datasets)&&v.datasets.length>0&&(0,s.jsx)(de,{title:"Ray Data Overview",sx:{marginBottom:4},children:(0,s.jsx)(be,{children:(0,s.jsx)(Wr,{datasets:v.datasets})})}),(0,s.jsx)(de,{title:"Ray Core Overview",startExpanded:!0,sx:{marginBottom:4},children:(0,s.jsx)(be,{children:(0,s.jsx)(Fo,{jobId:e.job_id?e.job_id:void 0,job:e,onClickLink:e=>{var t;if("task"===e.type)i(e.id),l?null===(t=u.current)||void 0===t||t.scrollIntoView():(c(!0),setTimeout((()=>{var e;null===(e=u.current)||void 0===e||e.scrollIntoView()}),50));else if("actor"===e.type){var n;if(p(e.id),f)null===(n=m.current)||void 0===n||n.scrollIntoView();else h(!0),setTimeout((()=>{var e;null===(e=m.current)||void 0===e||e.scrollIntoView()}),50)}}})})}),(0,s.jsx)(de,{title:"Logs",startExpanded:!0,sx:{marginBottom:4},children:(0,s.jsx)(be,{noTopPadding:!0,children:(0,s.jsx)(Ro,{job:e})})}),e.job_id&&(0,s.jsx)(de,{title:"Task Timeline (beta)",startExpanded:!0,sx:{marginBottom:4},children:(0,s.jsx)(be,{children:(0,s.jsx)(Bo,{jobId:e.job_id})})}),(0,s.jsx)(de,{title:"Cluster status and autoscaler",startExpanded:!0,sx:{marginBottom:4},children:(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"row",gap:3,alignItems:"stretch",sx:e=>({flexWrap:"wrap",[e.breakpoints.up("md")]:{flexWrap:"nowrap"}}),children:[(0,s.jsx)(jo,{sx:{flex:"1 0 500px"}}),(0,s.jsx)(be,{flex:"1 1 500px",children:(0,s.jsx)(Rr,{clusterStatus:g})}),(0,s.jsx)(be,{flex:"1 1 500px",children:(0,s.jsx)(Mr,{clusterStatus:g})})]})}),e.job_id&&(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(de,{ref:u,title:"Task Table",expanded:l,onExpandButtonClick:()=>{c(!l)},sx:{marginBottom:4},children:(0,s.jsx)(be,{children:(0,s.jsx)(Ct,{jobId:e.job_id,filterToTaskId:a,onFilterChange:()=>{i(void 0)}})})}),(0,s.jsx)(de,{ref:m,title:"Actor Table",expanded:f,onExpandButtonClick:()=>{h(!f)},sx:{marginBottom:4},children:(0,s.jsx)(be,{children:(0,s.jsx)(Lr.Z,{jobId:e.job_id,filterToActorId:d,onFilterChange:()=>{p(void 0)},detailPathPrefix:"actors"})})}),(0,s.jsx)(de,{title:"Placement Group Table",sx:{marginBottom:4},children:(0,s.jsx)(be,{children:(0,s.jsx)(Io,{jobId:e.job_id})})})]})]})},Ho=()=>{const{params:e}=Po();return(0,s.jsxs)(O.Z,{sx:{padding:2,backgroundColor:"white"},children:[(0,s.jsx)(at,{pageInfo:{title:"Actors",id:"actors",path:"actors"}}),(0,s.jsx)(be,{title:"Actors",children:(0,s.jsx)(Lr.Z,{jobId:e.id})})]})},$o=e=>{let{children:t}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)(at,{pageInfo:{title:"Actors",id:"actors",path:"actors"}}),t]})},Go={setSelectedTab:()=>{}},Vo=o.createContext(Go),qo=e=>{let{children:t}=e;const n=(()=>{const[e,t]=(0,o.useState)();return{selectedTab:e,setSelectedTab:t}})();return(0,s.jsx)(Vo.Provider,{value:n,children:(0,s.jsxs)(O.Z,{children:[(0,s.jsx)(O.Z,{sx:{position:"fixed",height:"100%",width:64,display:"flex",flexDirection:"column",flexWrap:"nowrap",alignItems:"center",paddingTop:1,paddingBottom:2,background:"white",borderRight:"1px solid #D2DCE6"},children:t}),(0,s.jsx)(O.Z,{sx:{marginLeft:"64px"},children:(0,s.jsx)(P.j3,{})})]})})},Ko=e=>{let{tabId:t,title:n,Icon:r}=e;const{selectedTab:a}=(0,o.useContext)(Vo),i=a===t;return(0,s.jsx)(Ye.m,{title:n,placement:"right",children:(0,s.jsx)(O.Z,{id:t,role:"tab","aria-selected":i,sx:{width:40,height:40,display:"flex",justifyContent:"center",alignItems:"center",color:i?"#036DCF":"#5F6469",backgroundColor:i?"#EBF3FB":null,borderRadius:"4px",marginTop:1,"&:hover":{backgroundColor:"#EBF3FB"}},children:r?(0,s.jsx)(O.Z,{component:r,sx:{width:24,height:24}}):t})})},Yo=e=>{let{to:t,...n}=e;const{tabId:r}=n;return(0,s.jsx)(A.rU,{to:null!==t&&void 0!==t?t:r,children:(0,s.jsx)(Ko,{...n})})},Qo=e=>{let{tabId:t,children:n}=e;return(e=>{const{setSelectedTab:t}=(0,o.useContext)(Vo);(0,o.useEffect)((()=>(t(e),()=>{t(void 0)})),[e,t])})(t),n},Xo=()=>{var e;const{job:t,params:n}=Po(),r=null!==(e=null===t||void 0===t?void 0:t.job_id)&&void 0!==e?e:null===t||void 0===t?void 0:t.submission_id,o=r?{title:null!==r&&void 0!==r?r:"Job",pageTitle:r?"".concat(r," | Job"):void 0,id:"job-detail",path:r}:{title:"Job",id:"job-detail",path:n.id};return(0,s.jsxs)("div",{children:[(0,s.jsx)(at,{pageInfo:o}),(0,s.jsx)(P.j3,{})]})},Jo=()=>(0,s.jsxs)(qo,{children:[(0,s.jsx)(Yo,{tabId:"info",title:"Info",Icon:le}),(0,s.jsx)(Yo,{to:"",tabId:"charts",title:"Charts",Icon:W}),(0,s.jsx)(Yo,{to:"actors",tabId:"actors",title:"Actors",Icon:G})]});var ea=n(493),ta=n(6897),na=n(9103),ra=n(2071),oa=n(9480);function aa(e){return(0,Ze.ZP)("MuiListItem",e)}const ia=(0,je.Z)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);const sa=(0,je.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function la(e){return(0,Ze.ZP)("MuiListItemSecondaryAction",e)}(0,je.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);const ca=["className"],ua=(0,ke.ZP)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})((e=>{let{ownerState:t}=e;return(0,r.Z)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})})),da=o.forwardRef((function(e,t){const n=(0,a.Z)({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=n,l=(0,m.Z)(n,ca),c=o.useContext(oa.Z),u=(0,r.Z)({},n,{disableGutters:c.disableGutters}),d=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return(0,we.Z)(r,la,n)})(u);return(0,s.jsx)(ua,(0,r.Z)({className:(0,xe.Z)(d.root,i),ownerState:u,ref:t},l))}));da.muiName="ListItemSecondaryAction";const pa=da,fa=["className"],ha=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],ma=(0,ke.ZP)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!n.disablePadding&&(0,r.Z)({paddingTop:8,paddingBottom:8},n.dense&&{paddingTop:4,paddingBottom:4},!n.disableGutters&&{paddingLeft:16,paddingRight:16},!!n.secondaryAction&&{paddingRight:48}),!!n.secondaryAction&&{["& > .".concat(sa.root)]:{paddingRight:48}},{["&.".concat(ia.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(ia.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,jn.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(ia.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,jn.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(ia.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"flex-start"===n.alignItems&&{alignItems:"flex-start"},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},n.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(ia.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,jn.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,jn.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity)}}},n.hasSecondaryAction&&{paddingRight:48})})),ga=(0,ke.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),va=o.forwardRef((function(e,t){const n=(0,a.Z)({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:l=!1,button:c=!1,children:u,className:d,component:p,components:f={},componentsProps:h={},ContainerComponent:g="li",ContainerProps:{className:v}={},dense:b=!1,disabled:y=!1,disableGutters:x=!1,disablePadding:w=!1,divider:_=!1,focusVisibleClassName:S,secondaryAction:k,selected:j=!1,slotProps:Z={},slots:E={}}=n,C=(0,m.Z)(n.ContainerProps,fa),N=(0,m.Z)(n,ha),I=o.useContext(oa.Z),A=o.useMemo((()=>({dense:b||I.dense||!1,alignItems:i,disableGutters:x})),[i,I.dense,b,x]),P=o.useRef(null);(0,Lt.Z)((()=>{l&&P.current&&P.current.focus()}),[l]);const O=o.Children.toArray(u),T=O.length&&(0,na.Z)(O[O.length-1],["ListItemSecondaryAction"]),R=(0,r.Z)({},n,{alignItems:i,autoFocus:l,button:c,dense:A.dense,disabled:y,disableGutters:x,disablePadding:w,divider:_,hasSecondaryAction:T,selected:j}),M=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:a,disableGutters:i,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=e,d={root:["root",o&&"dense",!i&&"gutters",!s&&"padding",l&&"divider",a&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]};return(0,we.Z)(d,aa,r)})(R),L=(0,ra.Z)(P,t),D=E.root||f.Root||ma,z=Z.root||h.root||{},F=(0,r.Z)({className:(0,xe.Z)(M.root,z.className,d),disabled:y},N);let B=p||"li";return c&&(F.component=p||"div",F.focusVisibleClassName=(0,xe.Z)(ia.focusVisible,S),B=Ht.Z),T?(B=F.component||p?B:"div","li"===g&&("li"===B?B="div":"li"===F.component&&(F.component="div")),(0,s.jsx)(oa.Z.Provider,{value:A,children:(0,s.jsxs)(ga,(0,r.Z)({as:g,className:(0,xe.Z)(M.container,v),ref:L,ownerState:R},C,{children:[(0,s.jsx)(D,(0,r.Z)({},z,!(0,ta.X)(D)&&{as:B,ownerState:(0,r.Z)({},R,z.ownerState)},F,{children:O})),O.pop()]}))})):(0,s.jsx)(oa.Z.Provider,{value:A,children:(0,s.jsxs)(D,(0,r.Z)({},z,{as:B,ref:L},!(0,ta.X)(D)&&{ownerState:(0,r.Z)({},R,z.ownerState)},F,{children:[O,k&&(0,s.jsx)(pa,{children:k})]}))})}));var ba=n(5519);const ya=async()=>await(0,_t.U)("nodes?view=summary"),xa=async e=>await(0,_t.U)("nodes/".concat(e)),wa=()=>{const[e]=(0,A.lr)(),t=e.get("nodeId"),n=e.get("folder"),r=e.get("fileName"),[a,i]=(0,o.useState)(r||""),l=n?[...n.split("/").slice(0,-1)].join("/"):void 0,c=void 0!==l&&t?"/logs/?nodeId=".concat(encodeURIComponent(t),"&folder=").concat(encodeURIComponent(l)):"/logs/";return(0,s.jsx)(O.Z,{sx:{padding:2,width:"100%"},children:(0,s.jsxs)(nt.Z,{title:"Logs Viewer",children:[(0,s.jsxs)(ve.Z,{elevation:0,children:[!t&&(0,s.jsx)("p",{children:"Select a node to view logs"}),t&&(0,s.jsxs)(o.Fragment,{children:[(0,s.jsxs)("p",{children:["Node: ",t]}),(0,s.jsx)("p",{children:decodeURIComponent(n||"")})]}),t&&(0,s.jsxs)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",margin:1,gap:2},children:[(0,s.jsx)(kn.Z,{component:A.rU,variant:"contained",to:c,children:"Back To ../"}),(0,s.jsx)(hr.Mj,{defaultValue:a,label:"File Name",onChange:e=>{i(e)}})]})]}),(0,s.jsx)(ve.Z,{elevation:0,children:t?(0,s.jsx)(Sa,{nodeId:t,folder:n,fileName:a}):(0,s.jsx)(_a,{})})]})})},_a=()=>{const{data:e,error:t}=(0,kt.ZP)(["/api/v0/nodes"],(async()=>(await ya()).data.data.summary.filter((e=>"ALIVE"===e.raylet.state)))),n=void 0===e&&void 0===t;return(0,s.jsx)(o.Fragment,{children:n?(0,s.jsx)(R.Z,{children:"Loading..."}):t?(0,s.jsx)(R.Z,{color:"error",children:t}):(0,s.jsx)(ea.Z,{children:null===e||void 0===e?void 0:e.map((e=>{let{raylet:{nodeId:t},ip:n}=e;return(0,s.jsx)(va,{children:(0,s.jsxs)(Ve.Z,{component:A.rU,to:"?nodeId=".concat(t),children:["Node ID: ",t," (IP: ",n,")"]})},t)}))})})},Sa=e=>{let{nodeId:t,folder:n,fileName:r}=e;const a=r?"*".concat(r,"*"):void 0,i=a?n?"".concat(n,"/").concat(a):"".concat(a):n?"".concat(n,"/*"):void 0,{data:l,error:c}=(0,kt.ZP)(t?["/api/v0/logs",t,i]:null,(async e=>{let[t,n,r]=e;return(await(0,xn.n2)({nodeId:n,glob:r})).data.data.result})),u=void 0===l&&void 0===c,d=(0,o.useMemo)((()=>(void 0!==l?Object.values(l).flatMap((e=>e)).sort():[]).map((e=>{const r=e.endsWith("/"),o=e.substring(0,e.length-1),a=n?"".concat(n,"/"):"",i=e.startsWith(a)?e.substring(a.length):e;return{fileName:e,name:i,linkPath:r?"?nodeId=".concat(encodeURIComponent(t),"&folder=").concat(encodeURIComponent(o)):"viewer?nodeId=".concat(encodeURIComponent(t),"&fileName=").concat(encodeURIComponent(e)),isDir:r,downloadUrl:r?void 0:(0,xn.Fc)({nodeId:t,filename:e,maxLines:-1})}}))),[l,n,t]);return(0,s.jsxs)(o.Fragment,{children:[u?(0,s.jsx)("p",{children:"Loading..."}):0===d.length&&(0,s.jsx)("p",{children:"No files found."}),d&&(0,s.jsx)(ea.Z,{children:d.map((e=>{let{fileName:t,name:n,downloadUrl:r,linkPath:o}=e;return(0,s.jsxs)(va,{children:[(0,s.jsx)(Ve.Z,{component:A.rU,to:o,children:n}),r&&(0,s.jsx)(O.Z,{paddingLeft:.5,children:(0,s.jsx)(Ge.Z,{component:"a",href:r,download:t,size:"small",sx:{verticalAlign:"baseline",color:ba.Z[700]},children:(0,s.jsx)(ie,{size:16})})})]},t)}))})]})},ka=()=>{const[e]=(0,A.lr)(),t=e.get("nodeId"),n=e.get("fileName"),r=n?[...n.split("/").slice(0,-1)].join("/"):void 0,a=void 0!==r?"/logs/?nodeId=".concat(t,"&folder=").concat(r):"/logs/?nodeId=".concat(t);return(0,s.jsx)(O.Z,{sx:{padding:2,width:"100%"},children:(0,s.jsxs)(nt.Z,{title:"Logs Viewer",children:[(0,s.jsxs)(ve.Z,{elevation:0,children:[!t&&(0,s.jsx)("p",{children:"Select a node to view logs"}),t&&(0,s.jsxs)(o.Fragment,{children:[(0,s.jsxs)("p",{children:["Node: ",t]}),(0,s.jsxs)("p",{children:["File: ",decodeURIComponent(n||"")]})]}),t&&(0,s.jsx)(O.Z,{sx:{margin:1},children:(0,s.jsx)(kn.Z,{component:A.rU,variant:"contained",to:a,children:"Back To ../"})})]}),(0,s.jsx)(ve.Z,{elevation:0,children:t&&n?(0,s.jsx)(Xn,{data:{nodeId:t,filename:n},height:600}):(0,s.jsx)(R.Z,{color:"error",children:"Invalid url parameters"})})]})})},ja=()=>(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(at,{pageInfo:{title:"Logs",id:"logs",path:"/logs"}}),(0,s.jsx)(P.j3,{})]}),Za=async()=>{const e={grafanaHost:void 0,grafanaOrgId:"1",sessionName:void 0,prometheusHealth:void 0,dashboardUids:void 0,dashboardDatasource:void 0};try{const t=await(async()=>await(0,_t.U)("/api/grafana_health"))();t.data.result&&(e.grafanaHost=t.data.data.grafanaHost,e.grafanaOrgId=t.data.data.grafanaOrgId,e.sessionName=t.data.data.sessionName,e.dashboardUids=t.data.data.dashboardUids,e.dashboardDatasource=t.data.data.dashboardDatasource)}catch(t){}try{const t=await(async()=>await(0,_t.U)("/api/prometheus_health"))();t.data.result&&(e.prometheusHealth=t.data.result)}catch(t){}return e};function Ea(e){return(0,Ze.ZP)("MuiButtonGroup",e)}const Ca=(0,je.Z)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);var Na=n(1793),Ia=n(6340);const Aa=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],Pa=(0,ke.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Ca.grouped)]:t.grouped},{["& .".concat(Ca.grouped)]:t["grouped".concat((0,Se.Z)(n.orientation))]},{["& .".concat(Ca.grouped)]:t["grouped".concat((0,Se.Z)(n.variant))]},{["& .".concat(Ca.grouped)]:t["grouped".concat((0,Se.Z)(n.variant)).concat((0,Se.Z)(n.orientation))]},{["& .".concat(Ca.grouped)]:t["grouped".concat((0,Se.Z)(n.variant)).concat((0,Se.Z)(n.color))]},{["& .".concat(Ca.firstButton)]:t.firstButton},{["& .".concat(Ca.lastButton)]:t.lastButton},{["& .".concat(Ca.middleButton)]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[2]},n.disableElevation&&{boxShadow:"none"},n.fullWidth&&{width:"100%"},"vertical"===n.orientation&&{flexDirection:"column"},{["& .".concat(Ca.grouped)]:(0,r.Z)({minWidth:40,"&:hover":(0,r.Z)({},"contained"===n.variant&&{boxShadow:"none"})},"contained"===n.variant&&{boxShadow:"none"}),["& .".concat(Ca.firstButton,",& .").concat(Ca.middleButton)]:(0,r.Z)({},"horizontal"===n.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===n.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===n.variant&&"horizontal"===n.orientation&&{borderRight:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(Ca.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===n.variant&&"vertical"===n.orientation&&{borderBottom:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(Ca.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===n.variant&&"inherit"!==n.color&&{borderColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):(0,jn.Fq)(t.palette[n.color].main,.5)},"outlined"===n.variant&&"horizontal"===n.orientation&&{borderRightColor:"transparent"},"outlined"===n.variant&&"vertical"===n.orientation&&{borderBottomColor:"transparent"},"contained"===n.variant&&"horizontal"===n.orientation&&{borderRight:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(Ca.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===n.variant&&"vertical"===n.orientation&&{borderBottom:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(Ca.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===n.variant&&"inherit"!==n.color&&{borderColor:(t.vars||t).palette[n.color].dark},{"&:hover":(0,r.Z)({},"outlined"===n.variant&&"horizontal"===n.orientation&&{borderRightColor:"currentColor"},"outlined"===n.variant&&"vertical"===n.orientation&&{borderBottomColor:"currentColor"})}),["& .".concat(Ca.lastButton,",& .").concat(Ca.middleButton)]:(0,r.Z)({},"horizontal"===n.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===n.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===n.variant&&"horizontal"===n.orientation&&{marginLeft:-1},"outlined"===n.variant&&"vertical"===n.orientation&&{marginTop:-1})})})),Oa=o.forwardRef((function(e,t){const n=(0,a.Z)({props:e,name:"MuiButtonGroup"}),{children:i,className:l,color:c="primary",component:u="div",disabled:d=!1,disableElevation:p=!1,disableFocusRipple:f=!1,disableRipple:h=!1,fullWidth:g=!1,orientation:v="horizontal",size:b="medium",variant:y="outlined"}=n,x=(0,m.Z)(n,Aa),w=(0,r.Z)({},n,{color:c,component:u,disabled:d,disableElevation:p,disableFocusRipple:f,disableRipple:h,fullWidth:g,orientation:v,size:b,variant:y}),_=(e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:a,orientation:i,variant:s}=e,l={root:["root",s,"vertical"===i&&"vertical",a&&"fullWidth",o&&"disableElevation"],grouped:["grouped","grouped".concat((0,Se.Z)(i)),"grouped".concat((0,Se.Z)(s)),"grouped".concat((0,Se.Z)(s)).concat((0,Se.Z)(i)),"grouped".concat((0,Se.Z)(s)).concat((0,Se.Z)(n)),r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,we.Z)(l,Ea,t)})(w),S=o.useMemo((()=>({className:_.grouped,color:c,disabled:d,disableElevation:p,disableFocusRipple:f,disableRipple:h,fullWidth:g,size:b,variant:y})),[c,d,p,f,h,g,b,y,_.grouped]),k=function(e){return o.Children.toArray(e).filter((e=>o.isValidElement(e)))}(i),j=k.length,Z=e=>{const t=0===e,n=e===j-1;return t&&n?"":t?_.firstButton:n?_.lastButton:_.middleButton};return(0,s.jsx)(Pa,(0,r.Z)({as:u,role:"group",className:(0,xe.Z)(_.root,l),ref:t,ownerState:w},x,{children:(0,s.jsx)(Na.Z.Provider,{value:S,children:k.map(((e,t)=>(0,s.jsx)(Ia.Z.Provider,{value:Z(t),children:e},t)))})}))}));var Ta=n(348),Ra=n(763),Ma=n.n(Ra);var La=n(5529),Da=n(9755);const za=e=>{let{node:t,expanded:n,onExpandButtonClick:r}=e;const{hostname:o="",ip:a="",cpu:i=0,mem:l,disk:c,networkSpeed:u=[0,0],raylet:d,logicalResources:p}=t,f=d.objectStoreAvailableMemory+d.objectStoreUsedMemory;return(0,s.jsxs)(dt.Z,{children:[(0,s.jsx)(pt.Z,{children:(0,s.jsx)(Ge.Z,{size:"small",onClick:r,children:n?(0,s.jsx)(O.Z,{component:ee,sx:{color:e=>e.palette.text.secondary,fontSize:"1.5em",verticalAlign:"middle"}}):(0,s.jsx)(O.Z,{component:ne,sx:{color:e=>e.palette.text.secondary,fontSize:"1.5em",verticalAlign:"middle"}})})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(O.Z,{minWidth:100,children:o})}),(0,s.jsx)(pt.Z,{children:(0,s.jsx)(tt.b,{type:"node",status:d.state})}),(0,s.jsx)(pt.Z,{align:"center",children:d.stateMessage?(0,s.jsx)(T.Z,{sx:{maxWidth:200},title:"State Message",code:d.stateMessage}):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)($e.Z,{title:d.nodeId,arrow:!0,children:(0,s.jsx)("div",{children:(0,s.jsx)(me.dG,{nodeId:d.nodeId,to:"nodes/".concat(d.nodeId),sx:{display:"block",width:"50px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}})})})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsxs)(O.Z,{minWidth:100,children:[a," ",d.isHeadNode&&"(Head)"]})}),(0,s.jsx)(pt.Z,{children:"DEAD"!==d.state&&(0,s.jsx)(Ve.Z,{component:A.rU,to:"/logs/?nodeId=".concat(encodeURIComponent(d.nodeId)),children:"Log"})}),(0,s.jsx)(pt.Z,{children:(0,s.jsxs)(Ta.Z,{num:Number(i),total:100,children:[i,"%"]})}),(0,s.jsx)(pt.Z,{children:l&&(0,s.jsxs)(Ta.Z,{num:Number(l[0]-l[1]),total:l[0],children:[(0,Dr.r)(l[0]-l[1]),"/",(0,Dr.r)(l[0]),"(",l[2].toFixed(1),"%)"]})}),(0,s.jsx)(pt.Z,{children:(0,s.jsx)(La.LC,{node:t})}),(0,s.jsx)(pt.Z,{children:(0,s.jsx)(Da.CZ,{node:t})}),(0,s.jsx)(pt.Z,{children:d&&f&&(0,s.jsxs)(Ta.Z,{num:d.objectStoreUsedMemory,total:f,children:[(0,Dr.r)(d.objectStoreUsedMemory),"/",(0,Dr.r)(f),"(",(d.objectStoreUsedMemory/f*100).toFixed(1),"%)"]})}),(0,s.jsx)(pt.Z,{children:c&&c["/"]&&(0,s.jsxs)(Ta.Z,{num:Number(c["/"].used),total:c["/"].total,children:[(0,Dr.r)(c["/"].used),"/",(0,Dr.r)(c["/"].total),"(",c["/"].percent.toFixed(1),"%)"]})}),(0,s.jsxs)(pt.Z,{align:"center",children:[(0,Dr.r)(u[0]),"/s"]}),(0,s.jsxs)(pt.Z,{align:"center",children:[(0,Dr.r)(u[1]),"/s"]}),(0,s.jsx)(pt.Z,{align:"center",children:p?(0,s.jsx)(T.Z,{sx:{maxWidth:200},title:"Logical Resources",code:p}):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(T.Z,{sx:{maxWidth:200},title:"Labels",code:d.labels})})]})},Fa=e=>{let{node:t,worker:n}=e;const{ip:r,mem:o,raylet:{nodeId:a}}=t,{pid:i,cpuPercent:l=0,memoryInfo:c,coreWorkerStats:u,cmdline:d}=n,p=u.length?u[0]:void 0,f="/logs/?nodeId=".concat(encodeURIComponent(a))+(p?"&fileName=".concat(p.workerId):"");return(0,s.jsxs)(dt.Z,{children:[(0,s.jsx)(pt.Z,{}),(0,s.jsx)(pt.Z,{align:"center",children:d[0]}),(0,s.jsx)(pt.Z,{children:(0,s.jsx)(tt.b,{type:"worker",status:"ALIVE"})}),(0,s.jsx)(pt.Z,{align:"center",children:"N/A"}),(0,s.jsx)(pt.Z,{align:"center",children:p&&(0,s.jsx)($e.Z,{title:p.workerId,arrow:!0,children:(0,s.jsx)(O.Z,{component:"span",sx:{display:"block",width:"50px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.workerId})})}),(0,s.jsx)(pt.Z,{align:"center",children:i}),(0,s.jsxs)(pt.Z,{children:[(0,s.jsx)(Ve.Z,{component:A.rU,to:f,target:"_blank",children:"Log"}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.Sl,{pid:i,ip:r,type:""}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.IL,{pid:i,ip:r,type:""}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.d3,{pid:i,ip:r})]}),(0,s.jsx)(pt.Z,{children:(0,s.jsxs)(Ta.Z,{num:Number(l),total:100,children:[l,"%"]})}),(0,s.jsx)(pt.Z,{children:o&&(0,s.jsxs)(Ta.Z,{num:c.rss,total:o[0],children:[(0,Dr.r)(c.rss),"/",(0,Dr.r)(o[0]),"(",(c.rss/o[0]*100).toFixed(1),"%)"]})}),(0,s.jsx)(pt.Z,{children:(0,s.jsx)(La.HH,{workerPID:i,gpus:t.gpus})}),(0,s.jsx)(pt.Z,{children:(0,s.jsx)(Da.w,{workerPID:i,gpus:t.gpus})}),(0,s.jsx)(pt.Z,{children:"N/A"}),(0,s.jsx)(pt.Z,{children:"N/A"}),(0,s.jsx)(pt.Z,{align:"center",children:"N/A"}),(0,s.jsx)(pt.Z,{align:"center",children:"N/A"}),(0,s.jsx)(pt.Z,{align:"center",children:"N/A"}),(0,s.jsx)(pt.Z,{align:"center",children:"N/A"})]})},Ba=e=>{let{node:t,isRefreshing:n,startExpanded:r=!1}=e;const[a,i]=(0,o.useState)(r),{data:l}=(0,kt.ZP)(["getNodeDetail",t.raylet.nodeId],(async e=>{let[t,n]=e;const{data:r}=await xa(n),{data:o,result:a}=r;if(!1===a&&console.error("Node Query Error Please Check Node Name"),null!==o&&void 0!==o&&o.detail){return(0,Ra.sortBy)(o.detail.workers,(e=>e.pid))}}),{refreshInterval:n?jt.Q:0}),c=null!==l&&void 0!==l?l:[];return(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(za,{node:t,expanded:a,onExpandButtonClick:()=>{i(!a)}}),a&&c.map((e=>(0,s.jsx)(Fa,{node:t,worker:e},e.pid)))]})},Ua=[{label:""},{label:"Host / Worker Process name"},{label:"State"},{label:"State Message"},{label:"ID"},{label:"IP / PID"},{label:"Actions"},{label:"CPU",helpInfo:(0,s.jsxs)(R.Z,{children:["Hardware CPU usage of a Node or a Worker Process.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Node\u2019s CPU usage is calculated against all CPU cores. Worker Process\u2019s CPU usage is calculated against 1 CPU core. As a result, the sum of CPU usage from all Worker Processes is not equal to the Node\u2019s CPU usage."]})},{label:"Memory",helpInfo:(0,s.jsxs)(R.Z,{children:["A Node or a Worker Process's RAM usage. ",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"For a Node, Object Store holds up to 30% of RAM by default or a custom value configured by users.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"RAM is not pre-allocated for Object Store. Once memory is used by and allocated to Object Store, it will hold and not release it until the Ray Cluster is terminated."]})},{label:"GPU",helpInfo:(0,s.jsxs)(R.Z,{children:["Usage of each GPU device. If no GPU usage is detected, here are the potential root causes:",(0,s.jsx)("br",{}),"1. non-GPU Ray image is used on this node. Switch to a GPU Ray image and try again. ",(0,s.jsx)("br",{}),"2. Non Nvidia or AMD GPUs are being used.",(0,s.jsx)("br",{}),"3. pynvml or pyamdsmi module raises an exception."]})},{label:"GRAM"},{label:"Object Store Memory"},{label:"Disk(root)",helpInfo:"For Ray Clusters on Kubernetes, multiple Ray Nodes/Pods may share the same Kubernetes Node's disk, resulting in multiple nodes having the same disk usage."},{label:"Sent"},{label:"Received"},{label:"Logical Resources",helpInfo:(0,s.jsxs)(R.Z,{children:[(0,s.jsx)(Ve.Z,{href:"https://docs.ray.io/en/latest/ray-core/scheduling/resources.html#physical-resources-and-logical-resources",children:"Logical resources usage"})," ","(e.g., CPU, memory) for a node. Alternatively, you can run the CLI command ",(0,s.jsx)("p",{style:{fontFamily:"Roboto Mono, monospace"},children:"ray status -v "}),"to obtain a similar result."]})},{label:"Labels"}],Wa=e=>{const{node:t}=e;if(!t)return null;const{raylet:n,hostname:r,ip:o,cpu:a,mem:i,networkSpeed:l,disk:c}=t,{nodeId:u,state:d,objectStoreUsedMemory:p,objectStoreAvailableMemory:f}=n,h=p+f;return(0,s.jsxs)(ve.Z,{variant:"outlined",style:{padding:"12px 12px",margin:12},children:[(0,s.jsxs)("p",{style:{fontWeight:"bold",fontSize:12,textDecoration:"none"},children:[(0,s.jsx)(Ve.Z,{component:A.rU,to:"nodes/".concat(u),children:u})," "]}),(0,s.jsx)("p",{children:(0,s.jsxs)(it.ZP,{container:!0,spacing:1,children:[(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsx)(tt.b,{type:"node",status:d})}),(0,s.jsxs)(it.ZP,{item:!0,children:[r,"(",o,")"]}),l&&l[0]>=0&&(0,s.jsxs)(it.ZP,{item:!0,children:[(0,s.jsx)("span",{style:{fontWeight:"bold"},children:"Sent"})," ",(0,Dr.r)(l[0]),"/s"," ",(0,s.jsx)("span",{style:{fontWeight:"bold"},children:"Received"})," ",(0,Dr.r)(l[1]),"/s"]})]})}),(0,s.jsxs)(it.ZP,{container:!0,spacing:1,alignItems:"baseline",children:[a>=0&&(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:["CPU",(0,s.jsxs)(Ta.Z,{num:Number(a),total:100,children:[a,"%"]})]}),i&&(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:["Memory",(0,s.jsxs)(Ta.Z,{num:Number(i[0]-i[1]),total:i[0],children:[(0,Dr.r)(i[0]-i[1]),"/",(0,Dr.r)(i[0]),"(",i[2],"%)"]})]}),n&&(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:["Object Store Memory",(0,s.jsxs)(Ta.Z,{num:p,total:h,children:[(0,Dr.r)(p),"/",(0,Dr.r)(h)]})]}),c&&c["/"]&&(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:["Disk('/')",(0,s.jsxs)(Ta.Z,{num:Number(c["/"].used),total:c["/"].total,children:[(0,Dr.r)(c["/"].used),"/",(0,Dr.r)(c["/"].total),"(",c["/"].percent,"%)"]})]})]}),(0,s.jsx)(it.ZP,{container:!0,justifyContent:"flex-end",spacing:1,style:{margin:8},children:(0,s.jsx)(it.ZP,{children:(0,s.jsx)(kn.Z,{children:(0,s.jsx)(Ve.Z,{component:A.rU,to:"/logs/?nodeId".concat(encodeURIComponent(n.nodeId)),children:"log"})})})})]})},Ha=()=>(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(at,{pageInfo:{title:"Cluster",id:"cluster",path:"/cluster"}}),(0,s.jsx)(P.j3,{})]}),$a=()=>{const{msg:e,isLoading:t,isRefreshing:n,onSwitchChange:r,nodeList:a,changeFilter:i,page:l,setPage:c,setSortKey:u,setOrderDesc:d,mode:p,setMode:f}=(()=>{var e,t;const[n,r]=(0,o.useState)("Loading the nodes infos..."),[a,i]=(0,o.useState)(!0),[s,l]=(0,o.useState)("table"),[c,u]=(0,o.useState)([]),[d,p]=(0,o.useState)({pageSize:10,pageNo:1}),{sorterFunc:f,setOrderDesc:h,setSortKey:m,sorterKey:g}=(0,bt.s)(""),{data:v,isLoading:b}=(0,kt.ZP)("useNodeList",(async()=>{const{data:e}=await ya(),{data:t,msg:n}=e;return r(n||""),t}),{refreshInterval:a?jt.Q:0}),y=null!==(e=null===v||void 0===v?void 0:v.summary)&&void 0!==e?e:[],x=null!==(t=null===v||void 0===v?void 0:v.nodeLogicalResources)&&void 0!==t?t:{},w=y.map((e=>({...e,state:e.raylet.state,logicalResources:x[e.raylet.nodeId]}))),_=Ma().sortBy(w,(e=>["ALIVE"===e.raylet.state?"0":e.raylet.state,e.raylet.isHeadNode?"0":"1",e.raylet.nodeId])).sort(f),S=_.filter((e=>{const t=e.raylet.nodeId;return c.every((n=>"nodeId"===n.key?t&&t.includes(n.val):e[n.key]&&e[n.key].includes(n.val)))}));return{nodeList:S,msg:n,isLoading:b,isRefreshing:a,onSwitchChange:e=>{i(e.target.checked)},changeFilter:(e,t)=>{const n=c.find((t=>t.key===e));n?n.val=t:c.push({key:e,val:t}),u([...c])},page:d,originalNodes:y,setPage:(e,t)=>p({...d,[e]:t}),sorterKey:g,setSortKey:m,setOrderDesc:h,mode:s,setMode:l}})(),{items:h,constrainedPage:m,maxPage:g}=(0,vt.NR)(a,l.pageNo,l.pageSize);return(0,s.jsxs)(O.Z,{sx:{padding:2,width:"100%",position:"relative"},children:[(0,s.jsx)(He,{loading:t}),(0,s.jsxs)(nt.Z,{title:"NODES",children:["Auto Refresh:",(0,s.jsx)(Sn.Z,{checked:n,onChange:r,name:"refresh",inputProps:{"aria-label":"secondary checkbox"}}),(0,s.jsx)("br",{}),"Request Status: ",e]}),(0,s.jsx)(nt.Z,{title:"Node Statistics",children:(0,s.jsx)(yt.Z,{type:"node",list:a})}),(0,s.jsxs)(nt.Z,{title:"Node List",children:[(0,s.jsxs)(it.ZP,{container:!0,alignItems:"center",children:[(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsx)(hr.Mj,{label:"Host",onChange:e=>i("hostname",e.trim())})}),(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsx)(hr.Mj,{label:"IP",onChange:e=>i("ip",e.trim())})}),(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsx)(hr.Mj,{label:"Node ID",onChange:e=>i("nodeId",e.trim())})}),(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsx)(hr.ul,{label:"State",onChange:e=>i("state",e.trim()),options:["ALIVE","DEAD"],showAllOption:!0})}),(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsx)(hr.Mj,{label:"Page Size",onChange:e=>c("pageSize",Math.min(Number(e),500)||10)})}),(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsx)(hr.ul,{label:"Sort By",options:[["state","State"],["mem[2]","Used Memory"],["mem[0]","Total Memory"],["cpu","CPU"],["networkSpeed[0]","Sent"],["networkSpeed[1]","Received"],["disk./.used","Used Disk"]],onChange:e=>u(e),showAllOption:!0})}),(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsxs)("span",{style:{margin:8,marginTop:0},children:["Reverse:",(0,s.jsx)(Sn.Z,{onChange:(e,t)=>d(t)})]})}),(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsxs)(Oa,{size:"small",children:[(0,s.jsx)(kn.Z,{onClick:()=>f("table"),color:"primary",children:"Table"}),(0,s.jsx)(kn.Z,{onClick:()=>f("card"),color:"primary",children:"Card"})]})})]}),(0,s.jsx)("div",{children:(0,s.jsx)(mt.Z,{count:g,page:m,onChange:(e,t)=>c("pageNo",t)})}),"table"===p&&(0,s.jsx)(fr.Z,{children:(0,s.jsxs)(ct.Z,{children:[(0,s.jsx)(ut.Z,{children:(0,s.jsx)(dt.Z,{children:Ua.map((e=>{let{label:t,helpInfo:n}=e;return(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsxs)(O.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:[t,n&&(0,s.jsx)(Ye.b,{sx:{marginLeft:1},children:n})]})},t)}))})}),(0,s.jsx)(ft.Z,{children:h.map((e=>(0,s.jsx)(Ba,{node:e,isRefreshing:n,startExpanded:1===a.length},e.raylet.nodeId)))})]})}),"card"===p&&(0,s.jsx)(it.ZP,{container:!0,children:h.map((e=>(0,s.jsx)(it.ZP,{item:!0,xs:6,children:(0,s.jsx)(Wa,{node:e})})))})]})]})},Ga=()=>{const[e,t]=(0,o.useState)("Loading the job detail"),[n,r]=(0,o.useState)(!0),{data:a,isLoading:i}=(0,kt.ZP)("useClusterDetail",(async()=>{try{return(await(0,_t.U)("/api/v0/cluster_metadata")).data}catch(e){t("Cluster Detail Query Error."),r(!1)}}),{refreshInterval:n?jt.Q:0});return{clusterDetail:a,msg:e,isLoading:i}},Va=()=>{const{clusterDetail:e,msg:t,isLoading:n}=Ga();return e?(0,s.jsxs)(O.Z,{sx:{padding:2},children:[(0,s.jsx)(at,{pageInfo:{title:"Cluster Info",id:"cluster-info",path:"/cluster/info"}}),(0,s.jsx)(nt.Z,{title:"Cluster Info",children:(0,s.jsx)(et,{metadataList:[{label:"Ray Version",content:e.data.rayVersion?{value:e.data.rayVersion,copyableValue:e.data.rayVersion}:{value:"-"}},{label:"Python Version",content:e.data.pythonVersion?{value:e.data.pythonVersion,copyableValue:e.data.pythonVersion}:{value:"-"}},{label:"Ray Commit",content:e.data.gitCommit?{value:e.data.gitCommit,copyableValue:e.data.gitCommit}:{value:"-"}},{label:"Operating System",content:e.data.os?{value:e.data.os,copyableValue:e.data.os}:{value:"-"}},{label:"Session ID",content:e.data.sessionId?{value:e.data.sessionId,copyableValue:e.data.sessionId}:{value:"-"}}]})})]}):(0,s.jsxs)(O.Z,{sx:{padding:2},children:[(0,s.jsx)(at,{pageInfo:{title:"Cluster Info",id:"cluster-info",path:"info"}}),(0,s.jsx)(He,{loading:n}),(0,s.jsxs)(nt.Z,{title:"CLUSTER",children:[(0,s.jsx)(tt.b,{type:"cluster",status:"LOADING"}),(0,s.jsx)("br",{}),"Request Status: ",t," ",(0,s.jsx)("br",{})]})]})},qa=()=>(0,s.jsxs)(qo,{children:[(0,s.jsx)(Yo,{tabId:"info",title:"Info",Icon:le}),(0,s.jsx)(Yo,{to:"",tabId:"table",title:"Table",Icon:$})]});var Ka=n(4502),Ya=n(4700);const Qa=()=>{var e;const{params:t,selectedTab:n,nodeDetail:r,msg:a,isLoading:i,isRefreshing:l,onRefreshChange:c,raylet:u,handleChange:d}=(()=>{const e=(0,P.UO)(),[t,n]=(0,o.useState)("info"),[r,a]=(0,o.useState)("Loading the node infos..."),{namespaceMap:i}=(0,o.useContext)(vs),[s,l]=(0,o.useState)(!0),{data:c,isLoading:u}=(0,kt.ZP)(["useNodeDetail",e.id],(async e=>{let[t,n]=e;const{data:r}=await xa(n),{data:o,msg:i,result:s}=r;if(i&&a(i),!1===s&&(a("Node Query Error Please Check Node Name"),l(!1)),null!==o&&void 0!==o&&o.detail)return o.detail}),{refreshInterval:s?jt.Q:0});return{params:e,selectedTab:t,nodeDetail:c,msg:r,isLoading:u,isRefreshing:s,onRefreshChange:e=>{l(e.target.checked)},raylet:null===c||void 0===c?void 0:c.raylet,handleChange:(e,t)=>{n(t)},namespaceMap:i}})();return(0,s.jsxs)(O.Z,{sx:{padding:2},children:[(0,s.jsx)(at,{pageInfo:{title:"Node: ".concat(t.id),pageTitle:"".concat(t.id," | Node"),id:"node-detail",path:"/cluster/nodes/".concat(t.id)}}),(0,s.jsx)(He,{loading:i}),(0,s.jsxs)(nt.Z,{title:"NODE - ".concat(t.id),children:[(0,s.jsx)(tt.b,{type:"node",status:(null===r||void 0===r||null===(e=r.raylet)||void 0===e?void 0:e.state)||"LOADING"}),(0,s.jsx)("br",{}),"Auto Refresh:",(0,s.jsx)(Sn.Z,{checked:l,onChange:c,name:"refresh",inputProps:{"aria-label":"secondary checkbox"}}),(0,s.jsx)("br",{}),"Request Status: ",a]}),(0,s.jsxs)(nt.Z,{title:"Node Detail",children:[(0,s.jsxs)(dn,{value:n,onChange:d,sx:{marginBottom:2},children:[(0,s.jsx)(gn,{value:"info",label:"Info"}),(0,s.jsx)(gn,{value:"raylet",label:"Raylet"}),(0,s.jsx)(gn,{value:"worker",label:"Worker (".concat((null===r||void 0===r?void 0:r.workers.length)||0,")")}),(0,s.jsx)(gn,{value:"actor",label:"Actor (".concat(Object.values((null===r||void 0===r?void 0:r.actors)||{}).length||0,")")})]}),r&&"info"===n&&(0,s.jsxs)(O.Z,{sx:{padding:2,marginTop:2,marginBottom:2},children:[(0,s.jsxs)(it.ZP,{container:!0,children:[(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Hostname"})," ",r.hostname]}),(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"IP"})," ",r.ip]})]}),(0,s.jsxs)(it.ZP,{container:!0,children:[(0,s.jsx)(it.ZP,{item:!0,xs:!0,children:r.cpus&&(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"CPU (Logic/Physic)"})," ",r.cpus[0],"/ ",r.cpus[1]]})}),(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Load (1/5/15min)"})," ",(null===r||void 0===r?void 0:r.loadAvg[0])&&r.loadAvg[0].map((e=>Number(e).toFixed(2))).join("/")]})]}),(0,s.jsxs)(it.ZP,{container:!0,children:[(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Load per CPU (1/5/15min)"})," ",(null===r||void 0===r?void 0:r.loadAvg[1])&&r.loadAvg[1].map((e=>Number(e).toFixed(2))).join("/")]}),(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Boot Time"})," ",(0,he.M9)(1e3*r.bootTime)]})]}),(0,s.jsxs)(it.ZP,{container:!0,children:[(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Sent Tps"})," ",(0,Dr.r)(null===r||void 0===r?void 0:r.networkSpeed[0]),"/s"]}),(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Received Tps"})," ",(0,Dr.r)(null===r||void 0===r?void 0:r.networkSpeed[1]),"/s"]})]}),(0,s.jsxs)(it.ZP,{container:!0,children:[(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Memory"})," ",(null===r||void 0===r?void 0:r.mem)&&(0,s.jsxs)(Ta.Z,{num:Number((null===r||void 0===r?void 0:r.mem[0])-(null===r||void 0===r?void 0:r.mem[1])),total:null===r||void 0===r?void 0:r.mem[0],children:[(0,Dr.r)((null===r||void 0===r?void 0:r.mem[0])-(null===r||void 0===r?void 0:r.mem[1])),"/",(0,Dr.r)(null===r||void 0===r?void 0:r.mem[0]),"(",null===r||void 0===r?void 0:r.mem[2],"%)"]})]}),(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"CPU"})," ",(0,s.jsxs)(Ta.Z,{num:Number(r.cpu),total:100,children:[r.cpu,"%"]})]})]}),(0,s.jsx)(it.ZP,{container:!0,children:(null===r||void 0===r?void 0:r.disk)&&Object.entries(null===r||void 0===r?void 0:r.disk).map((e=>{let[t,n]=e;return(0,s.jsxs)(it.ZP,{item:!0,xs:6,children:[(0,s.jsxs)(O.Z,{sx:{fontWeight:"bold"},children:["Disk (",t,")"]})," ",n&&(0,s.jsxs)(Ta.Z,{num:Number(n.used),total:n.total,children:[(0,Dr.r)(n.used),"/",(0,Dr.r)(n.total),"(",n.percent,"%, ",(0,Dr.r)(n.free)," free)"]})]},t)}))}),(0,s.jsx)(it.ZP,{container:!0,children:(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Logs"})," ",(0,s.jsx)(A.rU,{to:"/logs/?nodeId=".concat(encodeURIComponent(r.raylet.nodeId)),children:"log"})]})})]}),u&&Object.keys(u).length>0&&"raylet"===n&&(0,s.jsx)(o.Fragment,{children:(0,s.jsxs)(O.Z,{sx:{padding:2,marginTop:2,marginBottom:2},children:[(0,s.jsx)(it.ZP,{container:!0,children:(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Command"}),(0,s.jsx)("br",{}),(0,s.jsx)("div",{style:{height:200,overflow:"auto"},children:null===r||void 0===r?void 0:r.cmdline.join(" ")})]})}),(0,s.jsxs)(it.ZP,{container:!0,children:[(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Pid"})," ",null===u||void 0===u?void 0:u.pid]}),(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Workers Num"})," ",null===u||void 0===u?void 0:u.numWorkers]}),(0,s.jsxs)(it.ZP,{item:!0,xs:!0,children:[(0,s.jsx)(O.Z,{sx:{fontWeight:"bold"},children:"Node Manager Port"})," ",null===u||void 0===u?void 0:u.nodeManagerPort]})]})]})}),(null===r||void 0===r?void 0:r.workers)&&"worker"===n&&(0,s.jsx)(o.Fragment,{children:(0,s.jsx)(fr.Z,{sx:{padding:2,marginTop:2,marginBottom:2},children:(0,s.jsx)(Ya.Z,{workers:null===r||void 0===r?void 0:r.workers,actorMap:null===r||void 0===r?void 0:r.actors})})}),(null===r||void 0===r?void 0:r.actors)&&"actor"===n&&(0,s.jsx)(o.Fragment,{children:(0,s.jsx)(fr.Z,{sx:{padding:2,marginTop:2,marginBottom:2},children:(0,s.jsx)(Ka.Z,{actors:r.actors,workers:null===r||void 0===r?void 0:r.workers,detailPathPrefix:"/actors"})})})]})]})};var Xa=n(1918),Ja=n(4569),ei=n.n(Ja);const ti=e=>{const{job_id:t}=e,{nodeMap:n}=(0,o.useContext)(vs),[r,a]=(0,o.useState)(!0),{changeFilter:i,filterFunc:s}=(0,bt.L)(),[l,c]=(0,o.useState)([]),[u,d]=(0,o.useState)({pageNo:1,pageSize:10,total:0}),p=l.filter(s).length,{pageSize:f}=u;return(0,o.useEffect)((()=>{(async()=>{try{if(t){var e,n;const r=await(e=>{if(e)return ei().get("events?job_id=".concat(e))})(t);null!==r&&void 0!==r&&null!==(e=r.data)&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.events&&c(r.data.data.events.sort(((e,t)=>Number(t.timestamp)-Number(e.timestamp))))}else{var r,o;const e=await ei().get("events");null!==e&&void 0!==e&&null!==(r=e.data)&&void 0!==r&&null!==(o=r.data)&&void 0!==o&&o.events&&c(Object.values(e.data.data.events).reduce(((e,t)=>e.concat(t))).sort(((e,t)=>Number(t.timestamp)-Number(e.timestamp))))}}catch(i){}finally{a(!1)}})()}),[t]),(0,o.useEffect)((()=>{d((e=>({...e,total:Math.ceil(p/e.pageSize),pageNo:1})))}),[p,f]),{events:(0,vt.NR)(l.filter(s),u.pageNo,u.pageSize).items,changeFilter:function(){i(...arguments),d({...u,pageNo:1})},pagination:u,changePage:(e,t)=>{d({...u,[e]:t})},labelOptions:Array.from(new Set(l.map((e=>e.label)))),hostOptions:Array.from(new Set(l.map((e=>e.sourceHostname||e.hostName)))),sourceOptions:Array.from(new Set(l.map((e=>e.sourceType)))),severityOptions:Array.from(new Set(l.map((e=>e.severity)))),loading:r,reverseEvents:()=>{c([...l.reverse()])},nodeMap:n}},ni=e=>{const{events:t,changeFilter:n,pagination:r,changePage:o,labelOptions:a,hostOptions:i,sourceOptions:l,severityOptions:c,loading:u,reverseEvents:d,nodeMap:p}=ti(e);return u?(0,s.jsx)(qn,{}):(0,s.jsxs)("div",{style:{position:"relative"},children:[(0,s.jsxs)(O.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,s.jsx)(ht.Z,{sx:{margin:1,display:"inline-block",fontSize:12},style:{width:200},options:a,onInputChange:(e,t)=>{n("label",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Label"})}),(0,s.jsx)(ht.Z,{sx:{margin:1,display:"inline-block",fontSize:12},style:{width:200},options:i,onInputChange:(e,t)=>{n("sourceHostname",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Host"})}),(0,s.jsx)(ht.Z,{sx:{margin:1,display:"inline-block",fontSize:12},style:{width:100},options:l,onInputChange:(e,t)=>{n("sourceType",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Source"})}),(0,s.jsx)(ht.Z,{sx:{margin:1,display:"inline-block",fontSize:12},style:{width:140},options:c,onInputChange:(e,t)=>{n("severity",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Severity"})}),(0,s.jsx)(st.Z,{sx:{margin:1,display:"inline-block",fontSize:12},label:"Msg",InputProps:{onChange:e=>{let{target:{value:t}}=e;n("message",t.trim())},endAdornment:(0,s.jsx)(lt.Z,{position:"end",children:(0,s.jsx)(_n.Z,{})})}}),(0,s.jsx)(st.Z,{label:"Page Size",sx:{margin:1,width:120},size:"small",defaultValue:10,InputProps:{onChange:e=>{let{target:{value:t}}=e;o("pageSize",Math.min(Number(t),500)||10)},endAdornment:(0,s.jsx)(lt.Z,{position:"end",children:"Per Page"})}}),(0,s.jsx)(kn.Z,{sx:{margin:1,display:"inline-block",fontSize:12},size:"small",variant:"contained",onClick:()=>d(),children:"Reverse"})]}),(0,s.jsx)("div",{children:(0,s.jsx)(mt.Z,{count:r.total,page:r.pageNo,onChange:(e,t)=>{o("pageNo",t)}})}),(0,s.jsx)(O.Z,{sx:{padding:2,marginTop:2},children:t.length?t.map((e=>{let{label:t,message:n,timestamp:r,timeStamp:o,sourceType:a,sourceHostname:i,hostName:l,sourcePid:c,pid:u,eventId:d,jobId:f,jobName:h,nodeId:m,severity:g,customFields:v}=e;const b=o||C()(Math.floor(1e3*r)).format("YYYY-MM-DD HH:mm:ss"),y=i||l,x=u||c;return(0,s.jsxs)(O.Z,{component:"article",sx:e=>({color:e.palette.text.secondary,fontSize:12}),children:[(0,s.jsxs)(it.ZP,{container:!0,spacing:4,children:[(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsx)(tt.b,{status:g,type:g})}),(0,s.jsx)(it.ZP,{item:!0,children:b}),v&&(0,s.jsx)(it.ZP,{item:!0,children:(0,s.jsx)($e.Z,{title:(0,s.jsx)("pre",{style:{whiteSpace:"pre-wrap"},children:JSON.stringify(v,null,2)}),children:(0,s.jsx)(Xa.Z,{size:"small",label:"CustomFields"})})})]}),(0,s.jsxs)(it.ZP,{container:!0,children:[(0,s.jsxs)(it.ZP,{item:!0,sx:{margin:1},children:["severity: ",g]}),(0,s.jsxs)(it.ZP,{item:!0,sx:{margin:1},children:["source: ",a]}),(0,s.jsxs)(it.ZP,{item:!0,sx:{margin:1},children:["hostname:"," ",p[y]?(0,s.jsx)(A.rU,{to:"/node/".concat(p[y]),children:y}):y]}),(0,s.jsxs)(it.ZP,{item:!0,sx:{margin:1},children:["pid: ",x]}),f&&(0,s.jsxs)(it.ZP,{item:!0,sx:{margin:1},children:["jobId: ",(0,s.jsx)(A.rU,{to:"/job/".concat(f),children:f})]}),h&&(0,s.jsxs)(it.ZP,{item:!0,sx:{margin:1},children:["jobId: ",h]}),d&&(0,s.jsxs)(it.ZP,{item:!0,sx:{margin:1},children:["eventId: ",d]}),m&&(0,s.jsxs)(it.ZP,{item:!0,sx:{margin:1},children:["nodeId: ",m]})]}),(0,s.jsx)("pre",{style:{whiteSpace:"pre-wrap"},children:n})]},d)})):"No Events Yet."}),(0,s.jsx)("div",{children:(0,s.jsx)(mt.Z,{count:r.total,page:r.pageNo,onChange:(e,t)=>{o("pageNo",t)}})})]})},ri=e=>{var t;let{className:n,sx:r}=e;const{metricsContextLoaded:a,grafanaHost:i,grafanaOrgId:l,prometheusHealth:c,sessionName:u,dashboardUids:d,dashboardDatasource:p,currentTimeZone:f}=(0,o.useContext)(vs),h=null!==(t=null===d||void 0===d?void 0:d.default)&&void 0!==t?t:"rayDefaultDashboard",m="/d-solo/".concat(h,"/default-dashboard?orgId=").concat(l,"&theme=light&panelId=41&var-datasource=").concat(p);return a&&"DISABLED"!==i?(0,s.jsx)(So,{className:n,sx:[{display:"flex",flexDirection:"column",flexWrap:"nowrap"},...Array.isArray(r)?r:[r]],children:void 0!==i&&c?(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(O.Z,{component:"iframe",title:"Cluster Utilization",sx:{flex:1},src:"".concat(i).concat(m,"&refresh&timezone=").concat(f).concat("&from=now-1h&to=now","&var-SessionName=").concat(u),frameBorder:"0"}),(0,s.jsx)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",marginX:3,marginTop:1,marginBottom:2},children:(0,s.jsx)(ko,{text:"View all metrics",to:"/metrics"})})]}):(0,s.jsxs)(O.Z,{sx:{flex:1,paddingX:3,paddingY:2},children:[(0,s.jsx)(R.Z,{variant:"h3",children:"Cluster utilization"}),(0,s.jsx)(_o,{sx:{marginTop:2},severity:"info"})]})}):null},oi=e=>{let{className:t,headerTitle:n,items:r,emptyListText:a,footerText:i,footerLink:l,sx:c}=e;return(0,s.jsxs)(So,{className:t,sx:[{display:"flex",flexDirection:"column",paddingX:3,paddingY:2},...Array.isArray(c)?c:[c]],children:[(0,s.jsx)(R.Z,{variant:"h3",children:n}),(0,s.jsxs)(O.Z,{sx:{marginTop:2,flex:1,overflow:"hidden"},children:[r.map((e=>(0,o.createElement)(ii,{...e,sx:{"&:not(:first-child)":{marginTop:1}},key:e.title}))),0===r.length&&(0,s.jsx)(R.Z,{variant:"h4",children:a})]}),(0,s.jsx)(ko,{text:i,to:l})]})},ai={root:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",textDecoration:"none"}},ii=e=>{let{icon:t,title:n,subtitle:r,className:a,link:i,sx:l}=e;const c=(0,s.jsxs)(o.Fragment,{children:[t,(0,s.jsxs)(O.Z,{sx:e=>({flex:"1 1 auto",width:"calc(100% - calc(".concat(e.spacing(1)," + 20px))")}),children:[(0,s.jsx)(R.Z,{sx:{color:"#036DCF"},variant:"body2",children:n}),(0,s.jsx)(R.Z,{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#5F6469"},title:r,variant:"caption",children:r})]})]});return(0,s.jsx)(O.Z,{className:a,sx:l,children:void 0!==i?(0,s.jsx)(Ve.Z,{component:A.rU,sx:ai.root,to:i,children:c}):(0,s.jsx)(O.Z,{sx:ai.root,children:c})})},si=e=>null!==e.job_id&&""!==e.job_id?"/jobs/".concat(e.job_id):null!==e.submission_id&&""!==e.submission_id?"/jobs/".concat(e.submission_id):void 0,li=e=>{let{className:t,sx:n}=e;const{jobList:r}=gr(),o=Ma().orderBy(r,["startTime"],["desc"]).slice(0,6).map((e=>{let n;var r,o;e.submission_id&&e.job_id?n="".concat(e.submission_id," (").concat(e.job_id,")"):n=null!==(r=null!==(o=e.submission_id)&&void 0!==o?o:e.job_id)&&void 0!==r?r:void 0;return{title:n,subtitle:e.entrypoint,link:si(e),className:t,icon:(0,s.jsx)(wr,{sx:{marginRight:1},job:e})}}));return(0,s.jsx)(oi,{headerTitle:"Recent jobs",className:t,sx:n,items:o,emptyListText:"No jobs yet...",footerText:"View all jobs",footerLink:"/jobs"})},ci=e=>{let{deployment:t,small:n,className:r,sx:o}=e;switch(t.status){case"HEALTHY":return(0,s.jsx)(O.Z,{component:Q,sx:[{width:20,height:20,marginRight:1,color:e=>e.palette.success.main},...Array.isArray(o)?o:[o]],title:"Healthy"});case"UNHEALTHY":return(0,s.jsx)(O.Z,{component:oe,sx:[{width:20,height:20,marginRight:1,color:e=>e.palette.error.main},...Array.isArray(o)?o:[o]],title:"Unhealthy"});default:return(0,s.jsx)(xr,{className:r,sx:o,small:n,title:"Updating"})}},ui=()=>(0,_t.U)("api/serve/applications/");var di=n(4602);const pi={[di.MA.UNHEALTHY]:0,[di.MA.STARTING]:1,[di.MA.HEALTHY]:2,[di.MA.DRAINING]:3},fi=()=>{var e,t;const[n,r]=(0,o.useState)({pageSize:10,pageNo:1}),[a,i]=(0,o.useState)({pageSize:10,pageNo:1}),{data:s,error:l}=(0,kt.ZP)("useServeDeployments",(async()=>{const e=await ui();if(e){const t=e.data?Object.values(e.data.applications).sort(((e,t)=>{var n,r;return(null!==(n=t.last_deployed_time_s)&&void 0!==n?n:0)-(null!==(r=e.last_deployed_time_s)&&void 0!==r?r:0)})):[],n=t.flatMap((e=>Object.values(e.deployments).map((t=>({...t,applicationName:e.name,application:e})))));return{...e.data,serveApplicationsList:t,serveDeploymentsList:n}}}),{refreshInterval:jt.Q}),c=s?{http_options:s.http_options,grpc_options:s.grpc_options,proxy_location:s.proxy_location,controller_info:s.controller_info}:void 0,u=s&&s.proxies?Object.values(s.proxies).sort(((e,t)=>pi[t.status]-pi[e.status])):[],d=null!==(e=null===s||void 0===s?void 0:s.serveDeploymentsList)&&void 0!==e?e:[],p=null!==(t=null===s||void 0===s?void 0:s.serveApplicationsList)&&void 0!==t?t:[];return{serveDetails:c,serveDeployments:d,proxies:u,error:l,page:n,setPage:(e,t)=>r({...n,[e]:t}),proxiesPage:a,setProxiesPage:(e,t)=>i({...a,[e]:t}),serveApplications:p}},hi=e=>{var t;const[n,r]=(0,o.useState)({pageSize:10,pageNo:1}),[a,i]=(0,o.useState)([]),{data:s,error:l}=(0,kt.ZP)("useServeApplications",(async()=>{const e=await ui();if(e)return e.data}),{refreshInterval:jt.Q}),c=e?null===s||void 0===s||null===(t=s.applications)||void 0===t?void 0:t["-"!==e?e:""]:void 0,u=c?Object.values(c.deployments).sort(((e,t)=>e.name.localeCompare(t.name))):[];return{loading:!s&&!l,application:c,filteredDeployments:u.filter((e=>a.every((t=>{var n;return!t.val||e[t.key]&&(null!==(n=e[t.key])&&void 0!==n?n:"").includes(t.val)})))),error:l,changeFilter:(e,t)=>{const n=a.find((t=>t.key===e));n?n.val=t:a.push({key:e,val:t}),i([...a])},page:n,setPage:(e,t)=>r({...n,[e]:t}),allDeployments:u}},mi=(e,t)=>{var n,r;const[a,i]=(0,o.useState)({pageSize:10,pageNo:1}),[s,l]=(0,o.useState)([]),{data:c,error:u}=(0,kt.ZP)("useServeApplications",(async()=>{const e=await ui();if(e)return e.data}),{refreshInterval:jt.Q}),d=e?null===c||void 0===c||null===(n=c.applications)||void 0===n?void 0:n["-"!==e?e:""]:void 0,p=t?null===d||void 0===d?void 0:d.deployments[t]:void 0;return{loading:!c&&!u,application:d,deployment:p,filteredReplicas:(null!==(r=null===p||void 0===p?void 0:p.replicas)&&void 0!==r?r:[]).filter((e=>s.every((t=>{var n;return!t.val||e[t.key]&&(null!==(n=e[t.key])&&void 0!==n?n:"").includes(t.val)})))),changeFilter:(e,t)=>{const n=s.find((t=>t.key===e));n?n.val=t:s.push({key:e,val:t}),l([...s])},page:a,setPage:(e,t)=>i({...a,[e]:t}),error:u}},gi=(e,t,n)=>{var r;const{data:o,error:a}=(0,kt.ZP)("useServeApplications",(async()=>{const e=await ui();if(e)return e.data}),{refreshInterval:jt.Q}),i=e?null===o||void 0===o||null===(r=o.applications)||void 0===r?void 0:r["-"!==e?e:""]:void 0,s=t?null===i||void 0===i?void 0:i.deployments[t]:void 0,l=null===s||void 0===s?void 0:s.replicas.find((e=>{let{replica_id:t}=e;return t===n}));return{loading:!o&&!a,application:i,deployment:s,replica:l,error:a}},vi=e=>{let{className:t,sx:n}=e;const{serveDeployments:r}=fi(),o=Ma().orderBy(r,["application.last_deployed_time_s","name"],["desc","asc"]).slice(0,6).map((e=>{var n;return{title:e.name,subtitle:(null===(n=e.application.deployed_app_config)||void 0===n?void 0:n.import_path)||e.application.name||e.application.route_prefix,link:e.application.name&&e.name?"/serve/applications/".concat(encodeURIComponent(e.application.name),"/").concat(encodeURIComponent(e.name)):void 0,className:t,icon:(0,s.jsx)(ci,{sx:{marginRight:1},deployment:e,small:!0})}}));return(0,s.jsx)(oi,{headerTitle:"Serve Deployments",className:t,sx:n,items:o,emptyListText:"No Deployments yet...",footerText:"View all deployments",footerLink:"/serve"})},bi={overviewCard:e=>({flex:"1 0 448px",maxWidth:"100%",[e.breakpoints.up("md")]:{maxWidth:"calc((100% - ".concat(e.spacing(3)," * 2) / 3)")}}),autoscalerCard:{backgroundColor:"white",paddingX:3,paddingY:2}},yi=()=>{const{clusterStatus:e}=Ao();return(0,s.jsxs)(O.Z,{sx:{padding:3,backgroundColor:"white"},children:[(0,s.jsx)(at,{pageInfo:{title:"Overview",id:"overview",path:"/overview"}}),(0,s.jsxs)(O.Z,{sx:e=>({display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:4,gap:3,[e.breakpoints.up("md")]:{flexWrap:"nowrap"}}),children:[(0,s.jsx)(ri,{sx:bi.overviewCard}),(0,s.jsx)(li,{sx:bi.overviewCard}),(0,s.jsx)(vi,{sx:bi.overviewCard})]}),(0,s.jsx)(de,{sx:{marginTop:4},title:"Cluster status and autoscaler",startExpanded:!0,children:(0,s.jsxs)(O.Z,{sx:e=>({display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:4,gap:3,[e.breakpoints.up("md")]:{flexWrap:"nowrap"}}),children:[(0,s.jsx)(jo,{sx:bi.overviewCard}),(0,s.jsx)(So,{sx:[bi.overviewCard,bi.autoscalerCard],children:(0,s.jsx)(Rr,{clusterStatus:e})}),(0,s.jsx)(So,{sx:[bi.overviewCard,bi.autoscalerCard],children:(0,s.jsx)(Mr,{clusterStatus:e})})]})}),(0,s.jsx)(de,{sx:{marginTop:4},title:"Events",startExpanded:!0,children:(0,s.jsx)(ni,{})})]})},xi=[{title:"QPS per replica",pathParams:"theme=light&panelId=2"},{title:"Error QPS per replica",pathParams:"&theme=light&panelId=3"},{title:"P90 latency per replica",pathParams:"&theme=light&panelId=5"}],wi=e=>{var t;let{deploymentName:n,replicaId:r,className:a,sx:i}=e;const{grafanaHost:l,grafanaOrgId:c,prometheusHealth:u,dashboardUids:d,dashboardDatasource:p,currentTimeZone:f}=(0,o.useContext)(vs),h=null!==(t=null===d||void 0===d?void 0:d.serveDeployment)&&void 0!==t?t:"rayServeDashboard",[m,g]=(0,o.useState)(ho.FIVE_SECONDS),[v,b]=(0,o.useState)(mo.FIVE_MINS),[y,x]=(0,o.useState)(null),[[w,_],S]=(0,o.useState)([null,null]);(0,o.useEffect)((()=>{x(go[m])}),[m]),(0,o.useEffect)((()=>{S([vo[v],"now"])}),[v]);const k=null!==w?"&from=".concat(w):"",j=null!==_?"&to=".concat(_):"",Z="".concat(k).concat(j),E=y?"&refresh=".concat(y):"",C=_i(n,r);return void 0!==l&&u&&C?(0,s.jsx)(de,{className:a,sx:i,title:"Metrics",startExpanded:!0,children:(0,s.jsxs)("div",{children:[(0,s.jsxs)(O.Z,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",padding:1,zIndex:1,height:36},children:[(0,s.jsx)(kn.Z,{href:C,target:"_blank",rel:"noopener noreferrer",endIcon:(0,s.jsx)(se,{}),children:"View in Grafana"}),(0,s.jsx)(st.Z,{sx:{marginLeft:2,width:80},select:!0,size:"small",value:m,onChange:e=>{let{target:{value:t}}=e;g(t)},variant:"standard",InputProps:{startAdornment:(0,s.jsx)(lt.Z,{position:"start",children:(0,s.jsx)(io,{style:{fontSize:25,paddingBottom:5}})})},children:Object.entries(ho).map((e=>{let[t,n]=e;return(0,s.jsx)($r.Z,{value:n,children:n},t)}))}),(0,s.jsx)(Ye.b,{children:"Auto-refresh interval"}),(0,s.jsx)(st.Z,{sx:{marginLeft:2,width:140},select:!0,size:"small",value:v,onChange:e=>{let{target:{value:t}}=e;b(t)},variant:"standard",InputProps:{startAdornment:(0,s.jsx)(lt.Z,{position:"start",children:(0,s.jsx)(so,{style:{fontSize:22,paddingBottom:5}})})},children:Object.entries(mo).map((e=>{let[t,n]=e;return(0,s.jsx)($r.Z,{value:n,children:n},t)}))}),(0,s.jsx)(Ye.b,{children:"Time range picker"})]}),(0,s.jsx)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:3,marginTop:2},children:xi.map((e=>{let{title:t,pathParams:o}=e;const a="/d-solo/".concat(h,"?orgId=").concat(c,"&").concat(o)+"".concat(E,"&timezone=").concat(f).concat(Z,"&var-Deployment=").concat(encodeURIComponent(n),"&var-Replica=").concat(encodeURIComponent(r),"&var-datasource=").concat(p);return(0,s.jsx)(ve.Z,{sx:e=>({width:"100%",height:400,overflow:"hidden",[e.breakpoints.up("md")]:{width:"calc((100% - ".concat(e.spacing(3)," * 2) / 3)")}}),variant:"outlined",children:(0,s.jsx)(O.Z,{component:"iframe",title:t,sx:{width:"100%",height:"100%"},src:"".concat(l).concat(a),frameBorder:"0"},t)},o)}))})]})}):null},_i=(e,t)=>{var n;const{grafanaHost:r,grafanaOrgId:a,prometheusHealth:i,dashboardUids:s,dashboardDatasource:l}=(0,o.useContext)(vs),c=null!==(n=null===s||void 0===s?void 0:s.serveDeployment)&&void 0!==n?n:"rayServeDashboard",u=t?"&var-Replica=".concat(encodeURIComponent(t)):"";return void 0!==r&&i?"".concat(r,"/d/").concat(c,"?orgId=").concat(a,"&var-Deployment=").concat(encodeURIComponent(e)).concat(u,"&var-datasource=").concat(l):null},Si=e=>{let{deployment:t,application:{last_deployed_time_s:n,name:r},showExpandColumn:a=!1}=e;const{name:i,status:l,message:c,deployment_config:u,replicas:d}=t,p=_i(i);return(0,s.jsx)(o.Fragment,{children:(0,s.jsxs)(dt.Z,{children:[a&&(0,s.jsx)(pt.Z,{}),(0,s.jsx)(pt.Z,{align:"center",sx:{fontWeight:a?500:400},children:(0,s.jsx)(Ve.Z,{component:A.rU,to:"/serve/applications/".concat(encodeURIComponent(r),"/").concat(encodeURIComponent(i)),children:i})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(tt.b,{type:"serveDeployment",status:l})}),(0,s.jsx)(pt.Z,{align:"center",children:c?(0,s.jsx)(T.Z,{sx:{maxWidth:400,display:"inline-flex"},title:"Message details",code:c}):"-"}),(0,s.jsxs)(pt.Z,{align:"center",children:[" ",(0,s.jsx)(Ve.Z,{component:A.rU,to:"/serve/applications/".concat(encodeURIComponent(r),"/").concat(encodeURIComponent(i)),children:d.length})]}),(0,s.jsxs)(pt.Z,{align:"center",children:[(0,s.jsx)(T.b,{title:"Deployment config for ".concat(i),code:u,buttonText:"View config"}),(0,s.jsx)("br",{}),(0,s.jsx)(Ve.Z,{component:A.rU,to:"/serve/applications/".concat(encodeURIComponent(r),"/").concat(encodeURIComponent(i)),children:"Logs"}),p&&(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)("br",{}),(0,s.jsx)(Ve.Z,{href:p,target:"_blank",rel:"noreferrer",children:"Metrics"})]})]}),(0,s.jsx)(pt.Z,{align:"center",children:"-"}),(0,s.jsx)(pt.Z,{align:"center",children:(0,he.M9)(1e3*n)}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(fe.c,{startTime:1e3*n})})]})})},ki=e=>{let{replica:t,deployment:n}=e;const{replica_id:r,state:a,start_time_s:i}=t,{name:l}=n,c=_i(l,r);return(0,s.jsxs)(dt.Z,{children:[(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(Ve.Z,{component:A.rU,to:"".concat(encodeURIComponent(r)),children:r})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(tt.b,{type:"serveReplica",status:a})}),(0,s.jsxs)(pt.Z,{align:"center",children:[(0,s.jsx)(Ve.Z,{component:A.rU,to:"".concat(encodeURIComponent(r)),children:"Log"}),c&&(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)("br",{}),(0,s.jsx)(Ve.Z,{href:c,target:"_blank",rel:"noreferrer",children:"Metrics"})]})]}),(0,s.jsx)(pt.Z,{align:"center",children:(0,he.M9)(1e3*i)}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(fe.c,{startTime:1e3*i})})]})},ji=[{label:"Deployment name"},{label:"Status"},{label:"Status message",width:"30%"},{label:"Num replicas"},{label:"Actions"},{label:"Route prefix"},{label:"Last deployed at"},{label:"Duration (since last deploy)"}],Zi=()=>{var e;const{applicationName:t}=(0,P.UO)(),{application:n,filteredDeployments:r,page:a,setPage:i,changeFilter:l,allDeployments:c}=hi(t);if(!n)return(0,s.jsxs)(R.Z,{color:"error",children:['Application with name "',t,'" not found.']});const u=n.name?n.name:"-",{items:d,constrainedPage:p,maxPage:f}=(0,vt.NR)(r,a.pageNo,a.pageSize);return(0,s.jsxs)(O.Z,{sx:{padding:3},children:[(0,s.jsx)(et,{metadataList:[{label:"Name",content:{value:u}},{label:"Route prefix",content:{value:n.route_prefix}},{label:"Status",content:(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(tt.b,{type:"serveApplication",status:n.status})," ",n.message&&(0,s.jsx)(T.b,{title:"Status details",code:n.message,buttonText:"View details"})]})},{label:"Deployments",content:{value:"".concat(Object.keys(n.deployments).length)}},{label:"Replicas",content:{value:Object.values(n.deployments).map((e=>{let{replicas:t}=e;return t.length})).reduce(((e,t)=>e+t),0).toString()}},{label:"Application config",content:n.deployed_app_config?(0,s.jsx)(T.b,{title:n.name?"Application config for ".concat(n.name):"Application config",code:n.deployed_app_config}):(0,s.jsx)(R.Z,{children:"-"})},{label:"Last deployed at",content:{value:(0,he.M9)(1e3*n.last_deployed_time_s)}},{label:"Duration (since last deploy)",content:(0,s.jsx)(fe.c,{startTime:1e3*n.last_deployed_time_s})},{label:"Import path",content:{value:(null===n||void 0===n||null===(e=n.deployed_app_config)||void 0===e?void 0:e.import_path)||"-"}}]}),(0,s.jsx)(de,{title:"Deployments",startExpanded:!0,children:(0,s.jsxs)(fr.Z,{children:[(0,s.jsxs)("div",{style:{flex:1,display:"flex",alignItems:"center"},children:[(0,s.jsx)(ht.Z,{style:{margin:8,width:120},options:Array.from(new Set(c.map((e=>e.name)))),onInputChange:(e,t)=>{l("name","-"!==t.trim()?t.trim():"")},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Name"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:120},options:Array.from(new Set(c.map((e=>e.status)))),onInputChange:(e,t)=>{l("status",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"Status"})}),(0,s.jsx)(st.Z,{style:{margin:8,width:120},label:"Page Size",size:"small",defaultValue:10,InputProps:{onChange:e=>{let{target:{value:t}}=e;i("pageSize",Math.min(Number(t),500)||10)}}})]}),(0,s.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,s.jsx)(mt.Z,{count:f,page:p,onChange:(e,t)=>i("pageNo",t)})}),(0,s.jsxs)(ct.Z,{children:[(0,s.jsx)(ut.Z,{children:(0,s.jsx)(dt.Z,{children:ji.map((e=>{let{label:t,helpInfo:n,width:r}=e;return(0,s.jsx)(pt.Z,{align:"center",style:r?{width:r}:void 0,children:(0,s.jsxs)(O.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:[t,n&&(0,s.jsx)(Ye.b,{sx:{marginLeft:1},children:n})]})},t)}))})}),(0,s.jsx)(ft.Z,{children:d.map((e=>(0,s.jsx)(Si,{deployment:e,application:n,showExpandColumn:!1},e.name)))})]})]})})]})},Ei=()=>{const{applicationName:e}=(0,P.UO)(),{loading:t,application:n}=hi(e);if(t)return(0,s.jsx)(He,{loading:!0});if(!n)return(0,s.jsxs)(R.Z,{color:"error",children:['Application with name "',e,'" not found.']});const r=n.name?n.name:"-";return(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(at,{pageInfo:{id:"serveApplicationDetail",title:r,pageTitle:"".concat(r," | Serve Application"),path:"/serve/applications/".concat(encodeURIComponent(r))}}),(0,s.jsx)(P.j3,{})]})},Ci="serve-entity-deployments",Ni=()=>{const{applicationName:e,deploymentName:t,replicaId:n}=(0,P.UO)(),{application:r,deployment:o,replica:a}=gi(e,t,n);if(!a||!o||!r)return(0,s.jsxs)(R.Z,{color:"error",children:[e," / ",t," / ",n," not found."]});const{replica_id:i,state:l,actor_id:c,actor_name:u,node_id:d,node_ip:p,pid:f,start_time_s:h}=a;return(0,s.jsxs)(O.Z,{sx:{padding:3},children:[(0,s.jsx)(et,{metadataList:[{label:"ID",content:{value:i,copyableValue:i}},{label:"State",content:(0,s.jsx)(tt.b,{type:"serveReplica",status:l})},{label:"Actor ID",content:{value:c||"-",copyableValue:c||void 0,link:c?(0,me.h8)(c):void 0}},{label:"Actor name",content:{value:u,copyableValue:u}},{label:"Node ID",content:{value:d||"-",copyableValue:d||void 0,link:d?(0,me.ip)(d):void 0}},{label:"Node IP",content:{value:p||"-",copyableValue:p||void 0}},{label:"PID",content:{value:f||"-",copyableValue:f||void 0}},{label:"Deployment config",content:(0,s.jsx)(T.b,{title:"Deployment config for ".concat(o.name),code:o.deployment_config})},{label:"Started at",content:{value:(0,he.M9)(1e3*h)}},{label:"Duration",content:(0,s.jsx)(fe.c,{startTime:1e3*h})}]}),(0,s.jsx)(de,{title:"Logs",startExpanded:!0,children:(0,s.jsx)(be,{noTopPadding:!0,children:(0,s.jsx)(Ii,{replica:a})})}),(0,s.jsx)(wi,{sx:{marginTop:4},deploymentName:o.name,replicaId:a.replica_id}),(0,s.jsx)(de,{sx:{marginTop:4},title:"Tasks History",startExpanded:!0,children:(0,s.jsx)(Ct,{actorId:a.actor_id?a.actor_id:void 0})})]})},Ii=e=>{let{replica:{log_file_path:t,node_id:n,actor_id:r}}=e;const o=[...t?[{title:"Serve logger",nodeId:n,filename:t.startsWith("/")?t.substring(1):t}]:[],{title:"stderr",actorId:r,suffix:"err"},{title:"stdout",actorId:r,suffix:"out"}];return(0,s.jsx)(Qn,{tabs:o,contextKey:Ci})};var Ai=n(1826);const Pi=()=>{const{proxyId:e}=(0,P.UO)(),{proxy:t,loading:n}=(e=>{var t;const{data:n,error:r,isLoading:o}=(0,kt.ZP)("useServeApplications",(async()=>{const e=await ui();if(e)return e.data}),{refreshInterval:jt.Q});return{loading:o,proxy:e?null===n||void 0===n||null===(t=n.proxies)||void 0===t?void 0:t[e]:void 0,error:r}})(e);return n?(0,s.jsx)(He,{loading:!0}):t?(0,s.jsxs)(O.Z,{sx:{padding:3},children:[(0,s.jsx)(at,{pageInfo:t.node_id?{id:"serveProxy",title:"ProxyActor:".concat(t.node_id),pageTitle:"".concat(t.node_id," | Serve ProxyActor"),path:"/serve/proxies/".concat(encodeURIComponent(t.node_id))}:{id:"serveProxy",title:"ProxyActor",path:void 0}}),(0,s.jsx)(Ri,{actor:{type:"proxy",detail:t}})]}):(0,s.jsxs)(R.Z,{color:"error",children:['ProxyActor with id "',e,'" not found.']})},Oi=()=>{const{controller:e,loading:t}=(()=>{const{data:e,error:t,isLoading:n}=(0,kt.ZP)("useServeApplications",(async()=>{const e=await ui();if(e)return e.data}),{refreshInterval:jt.Q});return{loading:n,controller:null===e||void 0===e?void 0:e.controller_info,error:t}})();return t?(0,s.jsx)(He,{loading:!0}):e?(0,s.jsxs)(O.Z,{sx:{padding:3},children:[(0,s.jsx)(at,{pageInfo:{id:"serveController",title:"Serve Controller",path:"/serve/controller"}}),(0,s.jsx)(Ri,{actor:{type:"controller",detail:e}})]}):(0,s.jsx)(R.Z,{color:"error",children:"Serve controller not found."})},Ti=e=>e===Ai.b.ALIVE?di.MA.HEALTHY:e===Ai.b.DEAD?di.MA.UNHEALTHY:di.MA.STARTING,Ri=e=>{let{actor:t}=e;const n="proxy"===t.type?"ProxyActor:".concat(t.detail.actor_id):"Serve Controller",{data:r}=ir(t.detail.actor_id);return(0,s.jsxs)("div",{children:[(0,s.jsx)(et,{metadataList:[{label:"Name",content:{value:n}},{label:"Status",content:"proxy"===t.type?(0,s.jsx)(tt.b,{type:"serveProxy",status:t.detail.status}):r?(0,s.jsx)(tt.b,{type:"serveController",status:Ti(r.state)}):{value:"-"}},{label:"Actor ID",content:t.detail.actor_id?{value:t.detail.actor_id,copyableValue:t.detail.actor_id,link:t.detail.actor_id?(0,me.h8)(t.detail.actor_id):void 0}:{value:"-"}},{label:"Actor name",content:{value:t.detail.actor_name?t.detail.actor_name:"-"}},{label:"Worker ID",content:t.detail.worker_id?{value:t.detail.worker_id,copyableValue:t.detail.worker_id}:{value:"-"}},{label:"Node ID",content:t.detail.node_id?{value:t.detail.node_id,copyableValue:t.detail.node_id,link:t.detail.node_id?(0,me.ip)(t.detail.node_id):void 0}:{value:"-"}},{label:"Node IP",content:{value:t.detail.node_ip?t.detail.node_ip:"-"}}]}),r&&t.detail.log_file_path&&(0,s.jsx)(de,{title:"Logs",startExpanded:!0,children:(0,s.jsx)(be,{noTopPadding:!0,children:(0,s.jsx)(Di,{type:t.type,actor:r,systemLogFilePath:t.detail.log_file_path})})})]})},Mi="serve-entity-controllers",Li="serve-entity-proxies",Di=e=>{let{type:t,actor:{actorId:n,pid:r,address:{workerId:o,nodeId:a}},systemLogFilePath:i}=e;const l=[{title:"controller"===t?"Controller logs":"proxy logs",nodeId:a,filename:i.startsWith("/")?i.substring(1):i}],c="controller"===t?Mi:Li;return(0,s.jsx)(Qn,{tabs:l,contextKey:c})},zi=e=>{var t,n,r,a,i;let{controller:l,proxies:c,deployments:u,showDeploymentName:d=!1}=e;const[p,f]=(0,A.lr)(),h=void 0!==l||void 0!==c,m=h?l?"controller":"proxies":"deployments",g=p.get("entityGroup")||m,v=p.get("proxyId")||(null===c||void 0===c||null===(t=c[0])||void 0===t?void 0:t.actor_id)||void 0,b=null===c||void 0===c?void 0:c.find((e=>{let{actor_id:t}=e;return t===v})),y=u.flatMap((e=>{let{name:t,replicas:n}=e;return n.map((e=>({...e,name:d?"".concat(t,"#").concat(e.replica_id):e.replica_id})))})),x=p.get("replicaId")||(null===(n=y[0])||void 0===n?void 0:n.replica_id)||void 0;(0,o.useEffect)((()=>{let e=!1;!p.get("entityGroup")&&h&&(p.set("entityGroup",m),e=!0),!p.get("proxyId")&&v&&(p.set("proxyId",v),e=!0),!p.get("replicaId")&&x&&(p.set("replicaId",x),e=!0),e&&f(p,{replace:!0})}),[p,f,h,m,v,x]);const w=y.find((e=>{let{replica_id:t}=e;return t===x}));(0,o.useEffect)((()=>{let e=!1;v&&!b&&(p.delete("proxyId"),e=!0),x&&!w&&(p.delete("replicaId"),e=!0),e&&f(p,{replace:!0})}),[p,f,b,v,w,x]);const _="controller"===g&&l?[{title:"Controller logs",nodeId:l.node_id,filename:(null!==(r=l.log_file_path)&&void 0!==r&&r.startsWith("/")?l.log_file_path.substring(1):l.log_file_path)||void 0}]:"proxies"===g&&b?[{title:"HTTP Proxy logs",nodeId:b.node_id,filename:(null!==(a=b.log_file_path)&&void 0!==a&&a.startsWith("/")?b.log_file_path.substring(1):b.log_file_path)||void 0}]:"deployments"===g&&w?[{title:"Serve logger",nodeId:w.node_id,filename:(null!==(i=w.log_file_path)&&void 0!==i&&i.startsWith("/")?w.log_file_path.substring(1):w.log_file_path)||void 0},{title:"stderr",actorId:w.actor_id,suffix:"err"},{title:"stdout",actorId:w.actor_id,suffix:"out"}]:[],S="controller"===g?Mi:"proxies"===g?Li:Ci;return(0,s.jsxs)("div",{children:[(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"row",alignItems:"center",gap:2,marginTop:4,children:[h&&(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"column",gap:1,children:[(0,s.jsx)(R.Z,{children:"View logs from"}),(0,s.jsxs)(st.Z,{select:!0,variant:"outlined",size:"small",style:{minWidth:120},value:g,"data-testid":"entity-group-select",SelectProps:{renderValue:e=>Ma().capitalize(e)},onChange:e=>{let{target:{value:t}}=e;f((e=>(e.set("entityGroup",t),e)),{replace:!0})},children:[(0,s.jsx)($r.Z,{value:"controller",children:(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"column",gap:.5,children:[(0,s.jsx)("span",{children:"Controller"}),(0,s.jsx)(R.Z,{variant:"caption",sx:{color:e=>e.palette.grey[600]},children:"Logs for app initialization, dependency installation, and autoscaling."})]})}),(0,s.jsx)($r.Z,{value:"proxies",children:(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"column",gap:.5,children:[(0,s.jsx)("span",{children:"Proxies"}),(0,s.jsx)(R.Z,{variant:"caption",sx:{color:e=>e.palette.grey[600]},children:"Logs for proxy initialization and HTTP handling."})]})}),(0,s.jsx)($r.Z,{value:"deployments",children:(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"column",gap:.5,children:[(0,s.jsx)("span",{children:"Deployments"}),(0,s.jsx)(R.Z,{variant:"caption",sx:{color:e=>e.palette.grey[600]},children:"Application output and logs."})]})})]})]}),"proxies"===g&&(null===c||void 0===c?void 0:c.length)&&(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"column",gap:1,children:[(0,s.jsx)(R.Z,{children:"HTTP Proxy"}),(0,s.jsx)(st.Z,{select:!0,variant:"outlined",size:"small",style:{minWidth:240},value:v,"data-testid":"proxies-select",onChange:e=>{let{target:{value:t}}=e;f((e=>(e.set("proxyId",t),e)),{replace:!0})},children:c.map((e=>{let{actor_id:t}=e;return(0,s.jsxs)($r.Z,{value:t||void 0,children:["HTTPProxyActor:",t]},t)}))})]}),"deployments"===g&&u.length&&(0,s.jsxs)(O.Z,{display:"flex",flexDirection:"column",gap:1,children:[(0,s.jsx)(R.Z,{children:"Deployment replica"}),(0,s.jsx)(st.Z,{select:!0,variant:"outlined",size:"small",style:{minWidth:240},value:x,"data-testid":"replicas-select",onChange:e=>{let{target:{value:t}}=e;f((e=>(e.set("replicaId",t),e)),{replace:!0})},children:y.map((e=>{let{replica_id:t,name:n}=e;return(0,s.jsx)($r.Z,{value:t,children:n},t)}))})]})]}),(0,s.jsx)(O.Z,{marginTop:2,children:(0,s.jsx)(be,{noTopPadding:!0,children:(0,s.jsx)(Qn,{tabs:_,contextKey:S})})})]})},Fi=[{label:"Replica ID"},{label:"Status"},{label:"Actions"},{label:"Started at"},{label:"Duration"}],Bi=()=>{const{applicationName:e,deploymentName:t}=(0,P.UO)(),{application:n,deployment:r,filteredReplicas:a,page:i,setPage:l,changeFilter:c}=mi(e,t);if(!n)return(0,s.jsxs)(R.Z,{color:"error",children:['Application with name "',e,'" not found.']});if(!r)return(0,s.jsxs)(R.Z,{color:"error",children:['Deployment with name "',t,'" not found.']});const{items:u,constrainedPage:d,maxPage:p}=(0,vt.NR)(a,i.pageNo,i.pageSize);return(0,s.jsxs)(O.Z,{sx:{padding:3},children:[(0,s.jsx)(et,{metadataList:[{label:"Status",content:(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(tt.b,{type:"serveDeployment",status:r.status})," ",r.message&&(0,s.jsx)(T.b,{title:"Status details",code:r.message,buttonText:"View details"})]})},{label:"Name",content:{value:r.name}},{label:"Replicas",content:{value:"".concat(Object.keys(r.replicas).length)}},{label:"Deployment config",content:r.deployment_config?(0,s.jsx)(T.b,{title:r.name?"Deployment config for ".concat(r.name):"Deployment config",code:r.deployment_config}):(0,s.jsx)(R.Z,{children:"-"})},{label:"Last deployed at",content:{value:(0,he.M9)(1e3*n.last_deployed_time_s)}},{label:"Duration (since last deploy)",content:(0,s.jsx)(fe.c,{startTime:1e3*n.last_deployed_time_s})}]}),(0,s.jsx)(de,{title:"Replicas",startExpanded:!0,children:(0,s.jsxs)(fr.Z,{children:[(0,s.jsxs)("div",{style:{flex:1,display:"flex",alignItems:"center"},children:[(0,s.jsx)(ht.Z,{style:{margin:8,width:120},options:Array.from(new Set(r.replicas.map((e=>e.replica_id)))),onInputChange:(e,t)=>{c("replica_id","-"!==t.trim()?t.trim():"")},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"ID"})}),(0,s.jsx)(ht.Z,{style:{margin:8,width:120},options:Array.from(new Set(r.replicas.map((e=>e.state)))),onInputChange:(e,t)=>{c("state",t.trim())},renderInput:e=>(0,s.jsx)(st.Z,{...e,label:"State"})}),(0,s.jsx)(st.Z,{style:{margin:8,width:120},label:"Page Size",size:"small",defaultValue:10,InputProps:{onChange:e=>{let{target:{value:t}}=e;l("pageSize",Math.min(Number(t),500)||10)}}})]}),(0,s.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,s.jsx)(mt.Z,{count:p,page:d,onChange:(e,t)=>l("pageNo",t)})}),(0,s.jsxs)(ct.Z,{children:[(0,s.jsx)(ut.Z,{children:(0,s.jsx)(dt.Z,{children:Fi.map((e=>{let{label:t,helpInfo:n,width:r}=e;return(0,s.jsx)(pt.Z,{align:"center",style:r?{width:r}:void 0,children:(0,s.jsxs)(O.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:[t,n&&(0,s.jsx)(Ye.b,{sx:{marginLeft:1},children:n})]})},t)}))})}),(0,s.jsx)(ft.Z,{children:u.map((e=>(0,s.jsx)(ki,{deployment:r,replica:e},e.replica_id)))})]})]})}),(0,s.jsx)(de,{title:"Logs",startExpanded:!0,sx:{marginTop:4},children:(0,s.jsx)(zi,{deployments:[r]})})]})},Ui=()=>{const{applicationName:e,deploymentName:t}=(0,P.UO)(),{application:n,deployment:r,loading:a,error:i}=mi(e,t);if(a)return(0,s.jsx)(He,{loading:!0});if(i)return(0,s.jsx)(R.Z,{color:"error",children:i.message});if(!n)return(0,s.jsxs)(R.Z,{color:"error",children:['Application with name "',e,'" not found.']});if(!r)return(0,s.jsxs)(R.Z,{color:"error",children:['Deployment with name "',t,'" not found.']});const l=n.name?n.name:"-";return(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(at,{pageInfo:{id:"serveDeploymentDetail",title:r.name,pageTitle:"".concat(r.name," | Serve Deployment"),path:"/serve/applications/".concat(encodeURIComponent(l),"/").concat(encodeURIComponent(r.name))}}),(0,s.jsx)(P.j3,{})]})},Wi=e=>{let{application:t,startExpanded:n=!0}=e;const[r,a]=(0,o.useState)(n),{name:i,message:l,status:c,route_prefix:u,last_deployed_time_s:d,deployments:p,deployed_app_config:f}=t,h=Object.values(p);return(0,s.jsxs)(o.Fragment,{children:[(0,s.jsxs)(dt.Z,{children:[(0,s.jsx)(pt.Z,{children:(0,s.jsx)(Ge.Z,{size:"small",onClick:()=>{a(!r)},children:r?(0,s.jsx)(O.Z,{component:ee,sx:{color:e=>e.palette.text.secondary,fontSize:"1.5em",verticalAlign:"middle"}}):(0,s.jsx)(O.Z,{component:ne,sx:{color:e=>e.palette.text.secondary,fontSize:"1.5em",verticalAlign:"middle"}})})}),(0,s.jsx)(pt.Z,{align:"center",sx:{fontWeight:500},children:(0,s.jsx)(Ve.Z,{component:A.rU,to:"applications/".concat(i?encodeURIComponent(i):"-"),children:i||"-"})}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(tt.b,{type:"serveApplication",status:c})}),(0,s.jsx)(pt.Z,{align:"center",children:l?(0,s.jsx)(T.Z,{title:"Message details",code:l}):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:"-"}),(0,s.jsx)(pt.Z,{align:"center",children:f?(0,s.jsx)(T.b,{title:i?"Application config for ".concat(i):"Application config",code:f,buttonText:"View config"}):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:u}),(0,s.jsx)(pt.Z,{align:"center",children:(0,he.M9)(1e3*d)}),(0,s.jsx)(pt.Z,{align:"center",children:(0,s.jsx)(fe.c,{startTime:1e3*d})})]}),r&&h.map((e=>(0,s.jsx)(Si,{deployment:e,application:t,showExpandColumn:!0},"".concat(t.name,"-").concat(e.name))))]})},Hi=[{title:"QPS per application",pathParams:"theme=light&panelId=7"},{title:"Error QPS per application",pathParams:"theme=light&panelId=8"},{title:"P90 latency per application",pathParams:"theme=light&panelId=15"}],$i=[{title:"Ongoing HTTP Requests",pathParams:"theme=light&panelId=20"},{title:"Ongoing gRPC Requests",pathParams:"theme=light&panelId=21"},{title:"Scheduling Tasks",pathParams:"theme=light&panelId=22"},{title:"Scheduling Tasks in Backoff",pathParams:"theme=light&panelId=23"},{title:"Controller Control Loop Duration",pathParams:"theme=light&panelId=24"},{title:"Number of Control Loops",pathParams:"theme=light&panelId=25"}],Gi=e=>{var t;let{className:n,metricsConfig:r,sx:a}=e;const{grafanaHost:i,grafanaOrgId:l,prometheusHealth:c,dashboardUids:u,dashboardDatasource:d,currentTimeZone:p}=(0,o.useContext)(vs),f=null!==(t=null===u||void 0===u?void 0:u.serve)&&void 0!==t?t:"rayServeDashboard",[h,m]=(0,o.useState)(ho.FIVE_SECONDS),[g,v]=(0,o.useState)(mo.FIVE_MINS),[b,y]=(0,o.useState)(null),[[x,w],_]=(0,o.useState)([null,null]);(0,o.useEffect)((()=>{y(go[h])}),[h]),(0,o.useEffect)((()=>{_([vo[g],"now"])}),[g]);const S=null!==x?"&from=".concat(x):"",k=null!==w?"&to=".concat(w):"",j="".concat(S).concat(k),Z=b?"&refresh=".concat(b):"";return void 0!==i&&c?(0,s.jsx)(de,{className:n,sx:a,title:"Metrics",startExpanded:!0,children:(0,s.jsxs)("div",{children:[(0,s.jsxs)(O.Z,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",padding:1,zIndex:1,height:36},children:[(0,s.jsx)(kn.Z,{href:"".concat(i,"/d/").concat(f,"?orgId=").concat(l,"&var-datasource=").concat(d),target:"_blank",rel:"noopener noreferrer",endIcon:(0,s.jsx)(se,{}),children:"View in Grafana"}),(0,s.jsx)(st.Z,{sx:{marginLeft:2,width:80},select:!0,size:"small",value:h,onChange:e=>{let{target:{value:t}}=e;m(t)},variant:"standard",InputProps:{startAdornment:(0,s.jsx)(lt.Z,{position:"start",children:(0,s.jsx)(io,{style:{fontSize:25,paddingBottom:5}})})},children:Object.entries(ho).map((e=>{let[t,n]=e;return(0,s.jsx)($r.Z,{value:n,children:n},t)}))}),(0,s.jsx)(Ye.b,{children:"Auto-refresh interval"}),(0,s.jsx)(st.Z,{sx:{marginLeft:2,width:140},select:!0,size:"small",value:g,onChange:e=>{let{target:{value:t}}=e;v(t)},variant:"standard",InputProps:{startAdornment:(0,s.jsx)(lt.Z,{position:"start",children:(0,s.jsx)(so,{style:{fontSize:22,paddingBottom:5}})})},children:Object.entries(mo).map((e=>{let[t,n]=e;return(0,s.jsx)($r.Z,{value:n,children:n},t)}))}),(0,s.jsx)(Ye.b,{children:"Time range picker"})]}),(0,s.jsx)(O.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:3,marginTop:2},children:r.map((e=>{let{title:t,pathParams:n}=e;const r="/d-solo/".concat(f,"?orgId=").concat(l,"&").concat(n)+"".concat(Z,"&timezone=").concat(p).concat(j,"&var-datasource=").concat(d);return(0,s.jsx)(ve.Z,{sx:e=>({width:"100%",height:400,overflow:"hidden",[e.breakpoints.up("md")]:{width:"calc((100% - ".concat(e.spacing(3)," * 2) / 3)")}}),variant:"outlined",elevation:0,children:(0,s.jsx)(O.Z,{component:"iframe",title:t,sx:{width:"100%",height:"100%"},src:"".concat(i).concat(r),frameBorder:"0"},t)},n)}))})]})}):null},Vi=e=>{let{proxy:t}=e;const{status:n}=t;return(0,s.jsx)(Ki,{actor:t,type:"proxy",status:(0,s.jsx)(tt.b,{type:"serveProxy",status:n})})},qi=e=>{let{controller:t}=e;const{data:n}=ir(t.actor_id),r=null===n||void 0===n?void 0:n.state;return(0,s.jsx)(Ki,{actor:t,type:"controller",status:r?(0,s.jsx)(tt.b,{type:"serveController",status:Ti(r)}):"-"})},Ki=e=>{let{actor:t,type:n,status:r}=e;const{node_id:o,actor_id:a}=t;return(0,s.jsxs)(dt.Z,{children:[(0,s.jsx)(pt.Z,{align:"center",children:"proxy"===n?(0,s.jsxs)(Ve.Z,{component:A.rU,to:"proxies/".concat(o),children:["HTTPProxyActor:",o]}):(0,s.jsx)(Ve.Z,{component:A.rU,to:"controller",children:"Serve Controller"})}),(0,s.jsx)(pt.Z,{align:"center",children:r}),(0,s.jsx)(pt.Z,{align:"center",children:"proxy"===n?(0,s.jsx)(Ve.Z,{component:A.rU,to:"proxies/".concat(o),children:"Log"}):(0,s.jsx)(Ve.Z,{component:A.rU,to:"controller",children:"Log"})}),(0,s.jsx)(pt.Z,{align:"center",children:o?(0,s.jsx)($e.Z,{title:o,arrow:!0,children:(0,s.jsx)(Ve.Z,{sx:{display:"inline-block",width:"50px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",verticalAlign:"bottom"},component:A.rU,to:"/cluster/nodes/".concat(o),children:o})}):"-"}),(0,s.jsx)(pt.Z,{align:"center",children:a?(0,s.jsx)($e.Z,{title:a,arrow:!0,children:(0,s.jsx)(Ve.Z,{sx:{display:"inline-block",width:"50px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",verticalAlign:"bottom"},component:A.rU,to:"/actors/".concat(a),children:a})}):"-"})]})},Yi=[{label:"Name"},{label:"Status"},{label:"Actions"},{label:"Node ID"},{label:"Actor ID"}],Qi=e=>{let{serveDetails:t,proxies:n,page:r,setPage:o}=e;const{items:a,constrainedPage:i,maxPage:l}=(0,vt.NR)(n,r.pageNo,r.pageSize);return(0,s.jsxs)("div",{children:[(0,s.jsx)(R.Z,{variant:"h3",sx:{marginBottom:2},children:"System"}),t.http_options&&(0,s.jsx)(et,{metadataList:[{label:"Host",content:{copyableValue:t.http_options.host,value:t.http_options.host}},{label:"HTTP Port",content:{copyableValue:"".concat(t.http_options.port),value:"".concat(t.http_options.port)}},{label:"gRPC Port",content:{copyableValue:"".concat(t.grpc_options.port),value:"".concat(t.grpc_options.port)}},{label:"Proxy location",content:{value:"".concat(t.proxy_location)}}]}),(0,s.jsxs)(fr.Z,{children:[(0,s.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,s.jsx)(mt.Z,{count:l,page:i,onChange:(e,t)=>o("pageNo",t)})}),(0,s.jsxs)(ct.Z,{children:[(0,s.jsx)(ut.Z,{children:(0,s.jsx)(dt.Z,{children:Yi.map((e=>{let{label:t,helpInfo:n,width:r}=e;return(0,s.jsx)(pt.Z,{align:"center",style:r?{width:r}:void 0,children:(0,s.jsxs)(O.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:[t,n&&(0,s.jsx)(Ye.b,{sx:{marginLeft:1},children:n})]})},t)}))})}),(0,s.jsxs)(ft.Z,{children:[(0,s.jsx)(qi,{controller:t.controller_info}),a.map((e=>(0,s.jsx)(Vi,{proxy:e},e.actor_id)))]})]})]})]})},Xi=e=>{let{serveDetails:t,proxies:n,allDeployments:r,allApplications:o}=e;const{data:a}=ir(t.controller_info.actor_id);return a?(0,s.jsx)("div",{children:(0,s.jsx)(et,{metadataList:[{label:"Controller status",content:(0,s.jsx)(tt.b,{type:"serveController",status:Ti(a.state)})},{label:"Proxy status",content:(0,s.jsx)(Ji,{elements:n,statusKey:"status",type:"serveProxy"})},{label:"Application status",content:(0,s.jsx)(Ji,{elements:o,statusKey:"status",type:"serveApplication"})}],footer:(0,s.jsx)(ko,{text:"View system status and configuration",to:"system"})})}):(0,s.jsx)(He,{loading:!0})},Ji=e=>{let{elements:t,statusKey:n,type:r}=e;const a=Ma().mapValues(Ma().groupBy(t,n),(e=>e.length));return(0,s.jsx)(O.Z,{display:"inline-flex",gap:1,flexWrap:"wrap",children:Ma().orderBy(Object.entries(a),(e=>{let[,t]=e;return t}),"desc").map((e=>{let[t,n]=e;return(0,s.jsx)(tt.b,{status:t,type:r,suffix:(0,s.jsxs)(o.Fragment,{children:["\xa0","x ".concat(n)]})},t)}))})},es=[{label:""},{label:"Name"},{label:"Status"},{label:"Status message",width:"30%"},{label:"Replicas"},{label:"Actions"},{label:"Route prefix"},{label:"Last deployed at"},{label:"Duration (since last deploy)"}],ts=()=>{const{serveDetails:e,error:t,page:n,setPage:r,proxies:a,serveApplications:i,serveDeployments:l}=fi();if(t)return(0,s.jsx)(R.Z,{color:"error",children:t.toString()});if(void 0===e)return(0,s.jsx)(He,{loading:!0});const{items:c,constrainedPage:u,maxPage:d}=(0,vt.NR)(i,n.pageNo,n.pageSize);return(0,s.jsxs)(O.Z,{sx:{padding:3},children:[void 0===e.http_options?(0,s.jsx)(ao,{sx:{marginBottom:2},severity:"warning",children:"Serve not started. Please deploy a serve application first."}):(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(Xi,{allDeployments:l,allApplications:i,proxies:a,serveDetails:e}),(0,s.jsx)(de,{title:"Applications / Deployments",startExpanded:!0,sx:{marginTop:4},children:(0,s.jsxs)(fr.Z,{children:[(0,s.jsx)(st.Z,{style:{margin:8,width:120},label:"Page Size",size:"small",defaultValue:10,InputProps:{onChange:e=>{let{target:{value:t}}=e;r("pageSize",Math.min(Number(t),500)||10)},endAdornment:(0,s.jsx)(lt.Z,{position:"end",children:"Per Page"})}}),(0,s.jsx)(mt.Z,{count:d,page:u,onChange:(e,t)=>r("pageNo",t)}),(0,s.jsxs)(ct.Z,{children:[(0,s.jsx)(ut.Z,{children:(0,s.jsx)(dt.Z,{children:es.map((e=>{let{label:t,helpInfo:n,width:r}=e;return(0,s.jsx)(pt.Z,{align:"center",style:r?{width:r}:void 0,children:(0,s.jsxs)(O.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:[t,n&&(0,s.jsx)(Ye.b,{sx:{marginLeft:1},children:n})]})},t)}))})}),(0,s.jsx)(ft.Z,{children:c.map((e=>(0,s.jsx)(Wi,{application:e,startExpanded:!0},"".concat(e.name))))})]})]})}),(0,s.jsx)(de,{title:"Logs",startExpanded:!0,sx:{marginTop:4},children:(0,s.jsx)(zi,{controller:e.controller_info,proxies:a,deployments:l,showDeploymentName:!0})})]}),(0,s.jsx)(Gi,{sx:{marginTop:4},metricsConfig:Hi})]})},ns=()=>(0,s.jsxs)(O.Z,{sx:{width:"100%",minHeight:800,background:"white"},children:[(0,s.jsx)(at,{pageInfo:{id:"serve",title:"Serve",path:"/serve"}}),(0,s.jsx)(P.j3,{})]}),rs=()=>(0,s.jsxs)(qo,{children:[(0,s.jsx)(Yo,{tabId:"system",title:"System",Icon:le}),(0,s.jsx)(Yo,{to:"",tabId:"applications",title:"Applications",Icon:$})]}),os=()=>{const{applicationName:e,deploymentName:t,replicaId:n}=(0,P.UO)(),{loading:r,application:o,deployment:a,replica:i,error:l}=gi(e,t,n);if(l)return(0,s.jsx)(R.Z,{color:"error",children:l.toString()});if(r)return(0,s.jsx)(He,{loading:!0});if(!i||!a||!o)return(0,s.jsxs)(R.Z,{color:"error",children:[e," / ",t," / ",n," not found."]});const c=o.name?o.name:"-",{replica_id:u}=i;return(0,s.jsxs)("div",{children:[(0,s.jsx)(at,{pageInfo:{id:"serveReplicaDetail",title:u,pageTitle:"".concat(u," | Serve Replica"),path:"/serve/applications/".concat(encodeURIComponent(c),"/").concat(encodeURIComponent(a.name),"/").concat(encodeURIComponent(u))}}),(0,s.jsx)(P.j3,{})]})},as=()=>{const{serveDetails:e,proxies:t,proxiesPage:n,setProxiesPage:r,error:o}=fi();return o?(0,s.jsx)(R.Z,{color:"error",children:o.toString()}):void 0===e?(0,s.jsx)(He,{loading:!0}):(0,s.jsxs)(O.Z,{sx:{padding:3},children:[(0,s.jsx)(at,{pageInfo:{title:"System",id:"serve-system",path:"system"}}),void 0===e.http_options?(0,s.jsx)(ao,{sx:{marginBottom:2},severity:"warning",children:"Serve not started. Please deploy a serve application first."}):(0,s.jsx)(Qi,{serveDetails:e,proxies:t,page:n,setPage:r}),(0,s.jsx)(Gi,{sx:{marginTop:4},metricsConfig:$i})]})},is=()=>(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(at,{pageInfo:{title:"System",id:"serve-system",path:"system"}}),(0,s.jsx)(P.j3,{})]}),ss=()=>{const{taskId:e}=(0,P.UO)(),{task:t,isLoading:n}=Et(e);return(0,s.jsxs)(O.Z,{sx:{padding:2,backgroundColor:"white"},children:[(0,s.jsx)(at,{pageInfo:t?{id:"task",title:t.task_id,pageTitle:"".concat(t.task_id," | Task"),path:"tasks/".concat(t.task_id)}:{id:"task",title:"Task",path:"tasks/".concat(e)}}),(0,s.jsx)(ls,{taskId:e,task:t,isLoading:n})]})},ls=e=>{let{taskId:t,task:n,isLoading:r}=e;if(r)return(0,s.jsx)(He,{loading:!0});if(!n)return(0,s.jsxs)(R.Z,{color:"error",children:['Task with ID "',t,'" not found.']});const{attempt_number:a,task_id:i,actor_id:l,end_time_ms:c,start_time_ms:u,node_id:d,placement_group_id:p,required_resources:f,state:h,type:m,worker_id:g,job_id:v,func_or_class_name:b,name:y,call_site:x,label_selector:w}=n,_="RUNNING"===n.state&&n.worker_id;return(0,s.jsxs)("div",{children:[(0,s.jsx)(et,{metadataList:[{label:"ID",content:{value:i,copyableValue:i}},{label:"Name",content:{value:y}},{label:"State",content:(0,s.jsx)(tt.b,{type:"task",status:h})},{label:"Job ID",content:{value:v,copyableValue:v}},{label:"Function or class name",content:{value:b}},{label:"Actor ID",content:l?{value:l,copyableValue:l,link:(0,me.h8)(l)}:{value:"-"}},{label:"Node ID",content:d?{value:d,copyableValue:d,link:(0,me.ip)(d)}:{value:"-"}},{label:"Worker ID",content:g?{value:g,copyableValue:g}:{value:"-"}},{label:"Type",content:{value:m}},{label:"Placement group ID",content:p?{value:p,copyableValue:p}:{value:"-"}},{label:"Required resources",content:Object.entries(f).length>0?(0,s.jsx)(O.Z,{display:"inline-block",children:(0,s.jsx)(T.Z,{title:"Required resources",code:JSON.stringify(f,void 0,2)})}):{value:"{}"}},{label:"Label Selector",content:(0,s.jsx)(O.Z,{display:"inline-block",children:Object.entries(w||{}).length>0?(0,s.jsx)(T.Z,{title:"Label selector",code:JSON.stringify(w,void 0,2)}):"{}"})},{label:"Started at",content:{value:u?(0,he.M9)(u):"-"}},{label:"Ended at",content:{value:c?(0,he.M9)(c):"-"}},{label:"Duration",content:u?(0,s.jsx)(fe.c,{startTime:u,endTime:c}):{value:"-"}},_?{label:"Actions",content:(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(ge.MJ,{taskId:i,attemptNumber:a,nodeId:d}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.x4,{taskId:i,attemptNumber:a,nodeId:d}),(0,s.jsx)("br",{}),(0,s.jsx)(ge.jf,{taskId:i,attemptNumber:a,nodeId:d})]})}:{label:"",content:void 0},{label:"Call site",content:(0,s.jsx)(O.Z,{display:"inline-block",children:(0,s.jsx)(T.b,{title:"Call site",code:x||'Call site not recorded. To enable, set environment variable "RAY_record_task_actor_creation_sites" to "true".'})})}]}),(0,s.jsx)(de,{title:"Logs",startExpanded:!0,children:(0,s.jsx)(be,{noTopPadding:!0,children:(0,s.jsx)(cs,{task:n})})})]})},cs=e=>{let{task:{task_id:t,error_message:n,error_type:r,worker_id:o,task_log_info:a,actor_id:i}}=e;const l=null!==r&&null!==n?"Error Type: ".concat(r,"\n\n").concat(n):void 0,c=null===a&&null!==i?"/actors/".concat(i):void 0,u=[...null!==o&&null!==a?[{title:"stderr",taskId:t,suffix:"err"},{title:"stdout",taskId:t,suffix:"out"}]:[],...null===a?[{title:"Logs",contents:'Logs of actor tasks are only available as part of the actor logs by default due to performance reason. Please click "Other logs" link above to access the actor logs. \nTo record actor task log by default, you could set the runtime env of the actor or start the cluster with RAY_ENABLE_RECORD_ACTOR_TASK_LOGGING=1 '}]:[],...l?[{title:"Error stack trace",contents:l}]:[]];return(0,s.jsx)(Qn,{tabs:u,otherLogsLink:c,contextKey:"tasks-page"})};var us=n(7851),ds=n(3771),ps=n(7291);const fs={typography:{fontSize:12,fontFamily:["Roboto","-apple-system","BlinkMacSystemFont",'"Segoe UI"','"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(","),h1:{fontSize:"1.5rem",fontWeight:500},h2:{fontSize:"1.25rem",fontWeight:500},h3:{fontSize:"1rem",fontWeight:500},h4:{fontSize:"1rem"},body1:{fontSize:"0.75rem"},body2:{fontSize:"14px",lineHeight:"20px"},caption:{fontSize:"0.75rem",lineHeight:"16px"}},components:{MuiAutocomplete:{defaultProps:{size:"small"}},MuiButton:{defaultProps:{size:"small"}},MuiCssBaseline:{styleOverrides:{"@global":{a:{color:"#036DCF"}}}},MuiTextField:{defaultProps:{size:"small"}},MuiTooltip:{styleOverrides:{tooltip:{fontSize:"0.75rem",fontWeight:400,boxShadow:"0px 3px 14px 2px rgba(3, 28, 74, 0.12)",padding:8},tooltipPlacementRight:{margin:"0 8px","@media (min-width: 600px)":{margin:"0 8px"}}}},MuiPaper:{styleOverrides:{outlined:{borderColor:"#D2DCE6",borderRadius:8}}}}},hs=(0,ps.Z)(fs,{palette:{primary:{main:"#036DCF"},secondary:us.Z,success:{main:"#43A047"},error:{main:"#D32F2F"},text:{primary:ba.Z[900],secondary:ba.Z[800],disabled:ba.Z[400],hint:ba.Z[300]},background:{paper:"#fff",default:ds.Z[50]}}});(0,ps.Z)(fs,{palette:{primary:{main:"#538DF9"},secondary:us.Z,success:{main:"#43A047"},error:{main:"#D32F2F"},text:{primary:ds.Z[50],secondary:ds.Z[100],disabled:ds.Z[200],hint:ds.Z[300]},background:{paper:ba.Z[800],default:ba.Z[900]}}});C().extend(I());const ms=o.lazy((()=>n.e(495).then(n.bind(n,6495)))),gs=o.lazy((()=>n.e(591).then(n.bind(n,2591)))),vs=o.createContext({nodeMap:{},nodeMapByIp:{},namespaceMap:{},metricsContextLoaded:!1,grafanaHost:void 0,grafanaOrgId:"1",dashboardUids:void 0,prometheusHealth:void 0,sessionName:void 0,dashboardDatasource:void 0,serverTimeZone:void 0,currentTimeZone:void 0}),bs=()=>{const[e,t]=(0,o.useState)(),[n,r]=(0,o.useState)({nodeMap:{},nodeMapByIp:{},namespaceMap:{},metricsContextLoaded:!1,grafanaHost:void 0,grafanaOrgId:"1",dashboardUids:void 0,prometheusHealth:void 0,sessionName:void 0,dashboardDatasource:void 0,serverTimeZone:void 0});return(0,o.useEffect)((()=>{ya().then((e=>{var t,n;if(null!==e&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&null!==(n=t.data)&&void 0!==n&&n.summary){const t={},n={};e.data.data.summary.forEach((e=>{let{hostname:r,raylet:o,ip:a}=e;t[r]=o.nodeId,n[a]=o.nodeId})),r((e=>({...e,nodeMap:t,nodeMapByIp:n,namespaceMap:{}})))}}))}),[]),(0,o.useEffect)((()=>{(async()=>{const{grafanaHost:e,grafanaOrgId:t,sessionName:n,prometheusHealth:o,dashboardUids:a,dashboardDatasource:i}=await Za();r((r=>({...r,metricsContextLoaded:!0,grafanaHost:e,grafanaOrgId:t,dashboardUids:a,sessionName:n,prometheusHealth:o,dashboardDatasource:i})))})()}),[]),(0,o.useEffect)((()=>{(async()=>{const e=localStorage.getItem("timezone");e&&t(e);const n=await(async()=>{try{const e=await(0,_t.U)("/timezone");if(e.data)return{offset:e.data.offset,value:e.data.value}}catch(e){}return null})(),o=e||(null===n||void 0===n?void 0:n.value)||Intl.DateTimeFormat().resolvedOptions().timeZone;t(o),r((e=>({...e,serverTimeZone:n})))})()}),[]),(0,s.jsx)(h,{injectFirst:!0,children:(0,s.jsx)(Z,{theme:hs,children:(0,s.jsx)(o.Suspense,{fallback:pr,children:(0,s.jsxs)(vs.Provider,{value:{...n,currentTimeZone:e},children:[(0,s.jsx)(u,{}),(0,s.jsx)(A.UT,{children:(0,s.jsxs)(P.Z5,{children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(P.Fg,{replace:!0,to:"/"}),path:"/new"}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(lo,{}),path:"/",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(P.Fg,{replace:!0,to:"overview"}),path:""}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(yi,{}),path:"overview"}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(Ha,{}),path:"cluster",children:[(0,s.jsxs)(P.AW,{element:(0,s.jsx)(qa,{}),path:"",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(Qo,{tabId:"info",children:(0,s.jsx)(Va,{})}),path:"info"}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(Qo,{tabId:"table",children:(0,s.jsx)($a,{})}),path:""})]}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(Qa,{}),path:"nodes/:id"})]}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(Ir,{}),path:"jobs",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(Ar,{}),path:""}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(Xo,{}),path:":id",children:[(0,s.jsxs)(P.AW,{element:(0,s.jsx)(Jo,{}),path:"",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(Qo,{tabId:"info",children:(0,s.jsx)(Oo,{})}),path:"info"}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(Qo,{tabId:"charts",children:(0,s.jsx)(Wo,{})}),path:""}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(Qo,{tabId:"actors",children:(0,s.jsx)(Ho,{})}),path:"actors"})]}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)($o,{children:(0,s.jsx)(lr,{})}),path:"actors/:actorId",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(cr,{}),path:""}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(ss,{}),path:"tasks/:taskId"})]}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(ss,{}),path:"tasks/:taskId"})]})]}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(ur,{}),path:"actors",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(ms,{}),path:""}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(lr,{}),path:":actorId",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(cr,{}),path:""}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(ss,{}),path:"tasks/:taskId"})]})]}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(xo,{}),path:"metrics"}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(ns,{}),path:"serve",children:[(0,s.jsxs)(P.AW,{element:(0,s.jsx)(rs,{}),path:"",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(Qo,{tabId:"system",children:(0,s.jsx)(as,{})}),path:"system"}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(Qo,{tabId:"deployments",children:(0,s.jsx)(ts,{})}),path:""})]}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(is,{}),path:"system",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(Oi,{}),path:"controller"}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(Pi,{}),path:"proxies/:proxyId"})]}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(Ei,{}),path:"applications/:applicationName",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(Zi,{}),path:""}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(Ui,{}),path:":deploymentName",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(Bi,{}),path:""}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(os,{}),path:":replicaId",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(Ni,{}),path:""}),(0,s.jsx)(P.AW,{path:"tasks/:taskId",element:(0,s.jsx)(ss,{})})]})]})]})]}),(0,s.jsxs)(P.AW,{element:(0,s.jsx)(ja,{}),path:"logs",children:[(0,s.jsx)(P.AW,{element:(0,s.jsx)(wa,{}),path:""}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(ka,{}),path:"viewer"})]})]}),(0,s.jsx)(P.AW,{element:(0,s.jsx)(gs,{}),path:"/cmd/:cmd/:ip/:pid"})]})})]})})})})}},7273:(e,t,n)=>{"use strict";n.d(t,{b:()=>xt,Z:()=>wt});var r=n(533),o=n(7462),a=n(3366),i=n(2791),s=n(9278),l=n(4419),c=n(6934),u=n(1402),d=n(5527),p=n(5878),f=n(1217);function h(e){return(0,f.ZP)("MuiCard",e)}(0,p.Z)("MuiCard",["root"]);var m=n(184);const g=["className","raised"],v=(0,c.ZP)(d.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),b=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiCard"}),{className:r,raised:i=!1}=n,c=(0,a.Z)(n,g),d=(0,o.Z)({},n,{raised:i}),p=(e=>{const{classes:t}=e;return(0,l.Z)({root:["root"]},h,t)})(d);return(0,m.jsx)(v,(0,o.Z)({className:(0,s.Z)(p.root,r),elevation:i?8:void 0,ref:t,ownerState:d},c))}));var y=n(890),x=n(697);function w(e){return"undefined"===typeof e||null===e}var _={isNothing:w,isObject:function(e){return"object"===typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:w(e)?[]:[e]},repeat:function(e,t){var n,r="";for(n=0;ns&&(t=r-s+(a=" ... ").length),n-r>s&&(n=r+s-(i=" ...").length),{str:a+e.slice(t,n).replace(/\t/g,"\u2192")+i,pos:r-t+a.length}}function E(e,t){return _.repeat(" ",t-e.length)+e}var C=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!==typeof t.indent&&(t.indent=1),"number"!==typeof t.linesBefore&&(t.linesBefore=3),"number"!==typeof t.linesAfter&&(t.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,o=[0],a=[],i=-1;n=r.exec(e.buffer);)a.push(n.index),o.push(n.index+n[0].length),e.position<=n.index&&i<0&&(i=o.length-2);i<0&&(i=o.length-1);var s,l,c="",u=Math.min(e.line+t.linesAfter,a.length).toString().length,d=t.maxLength-(t.indent+u+3);for(s=1;s<=t.linesBefore&&!(i-s<0);s++)l=Z(e.buffer,o[i-s],a[i-s],e.position-(o[i]-o[i-s]),d),c=_.repeat(" ",t.indent)+E((e.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=Z(e.buffer,o[i],a[i],e.position,d),c+=_.repeat(" ",t.indent)+E((e.line+1).toString(),u)+" | "+l.str+"\n",c+=_.repeat("-",t.indent+u+3+l.pos)+"^\n",s=1;s<=t.linesAfter&&!(i+s>=a.length);s++)l=Z(e.buffer,o[i+s],a[i+s],e.position-(o[i]-o[i+s]),d),c+=_.repeat(" ",t.indent)+E((e.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")},N=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],I=["scalar","sequence","mapping"];var A=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===N.indexOf(t))throw new j('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===I.indexOf(this.kind))throw new j('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function P(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)})),n[t]=e})),n}function O(e){return this.extend(e)}O.prototype.extend=function(e){var t=[],n=[];if(e instanceof A)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new j("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof A))throw new j("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new j("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new j("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof A))throw new j("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var r=Object.create(O.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=P(r,"implicit"),r.compiledExplicit=P(r,"explicit"),r.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),H=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var $=/^[-+]?[0-9]+e/;var G=new A("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!H.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||_.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(_.isNegativeZero(e))return"-0.0";return n=e.toString(10),$.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),V=D.extend({implicit:[z,F,W,G]}),q=V,K=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Y=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Q=new A("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==K.exec(e)||null!==Y.exec(e))},construct:function(e){var t,n,r,o,a,i,s,l,c=0,u=null;if(null===(t=K.exec(e))&&(t=Y.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,r,o));if(a=+t[4],i=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),l=new Date(Date.UTC(n,r,o,a,i,s,c)),u&&l.setTime(l.getTime()-u),l},instanceOf:Date,represent:function(e){return e.toISOString()}});var X=new A("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var ee=new A("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,o=e.length,a=J;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,a=J,i=0,s=[];for(t=0;t>16&255),s.push(i>>8&255),s.push(255&i)),i=i<<6|a.indexOf(r.charAt(t));return 0===(n=o%4*6)?(s.push(i>>16&255),s.push(i>>8&255),s.push(255&i)):18===n?(s.push(i>>10&255),s.push(i>>2&255)):12===n&&s.push(i>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,r="",o=0,a=e.length,i=J;for(t=0;t>18&63],r+=i[o>>12&63],r+=i[o>>6&63],r+=i[63&o]),o=(o<<8)+e[t];return 0===(n=a%3)?(r+=i[o>>18&63],r+=i[o>>12&63],r+=i[o>>6&63],r+=i[63&o]):2===n?(r+=i[o>>10&63],r+=i[o>>4&63],r+=i[o<<2&63],r+=i[64]):1===n&&(r+=i[o>>2&63],r+=i[o<<4&63],r+=i[64],r+=i[64]),r}}),te=Object.prototype.hasOwnProperty,ne=Object.prototype.toString;var re=new A("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,o,a,i=[],s=e;for(t=0,n=s.length;t>10),56320+(e-65536&1023))}for(var Se=new Array(256),ke=new Array(256),je=0;je<256;je++)Se[je]=we(je)?1:0,ke[je]=we(je);function Ze(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||le,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ee(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=C(n),new j(t,n)}function Ce(e,t){throw Ee(e,t)}function Ne(e,t){e.onWarning&&e.onWarning.call(null,Ee(e,t))}var Ie={YAML:function(e,t,n){var r,o,a;null!==e.version&&Ce(e,"duplication of %YAML directive"),1!==n.length&&Ce(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Ce(e,"ill-formed argument of the YAML directive"),o=parseInt(r[1],10),a=parseInt(r[2],10),1!==o&&Ce(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&Ne(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,o;2!==n.length&&Ce(e,"TAG directive accepts exactly two arguments"),r=n[0],o=n[1],fe.test(r)||Ce(e,"ill-formed tag handle (first argument) of the TAG directive"),ce.call(e.tagMap,r)&&Ce(e,'there is a previously declared suffix for "'+r+'" tag handle'),he.test(o)||Ce(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(a){Ce(e,"tag prefix is malformed: "+o)}e.tagMap[r]=o}};function Ae(e,t,n,r){var o,a,i,s;if(t1&&(e.result+=_.repeat("\n",t-1))}function De(e,t){var n,r,o=e.tag,a=e.anchor,i=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),r=e.input.charCodeAt(e.position);0!==r&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,Ce(e,"tab characters must not be used in indentation")),45===r)&&be(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,Re(e,!0,-1)&&e.lineIndent<=t)i.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,Be(e,t,3,!1,!0),i.push(e.result),Re(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)Ce(e,"bad indentation of a sequence entry");else if(e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndentt)&&(v&&(i=e.line,s=e.lineStart,l=e.position),Be(e,t,4,!0,o)&&(v?m=e.result:g=e.result),v||(Oe(e,p,f,h,m,g,i,s,l),h=m=g=null),Re(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)Ce(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?Ce(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Ce(e,"repeat of an indentation width identifier"):(u=t+o-1,c=!0)}if(ve(a)){do{a=e.input.charCodeAt(++e.position)}while(ve(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!ge(a)&&0!==a)}for(;0!==a;){for(Te(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!c||e.lineIndentu&&(u=e.lineIndent),ge(a))d++;else{if(e.lineIndent0){for(o=i,a=0;o>0;o--)(i=xe(s=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+i:Ce(e,"expected hexadecimal character");e.result+=_e(a),e.position++}else Ce(e,"unknown escape sequence");n=r=e.position}else ge(s)?(Ae(e,n,r,!0),Le(e,Re(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Me(e)?Ce(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}Ce(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?g=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!be(r)&&!ye(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Ce(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),ce.call(e.anchorMap,n)||Ce(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Re(e,!0,-1),!0}(e)?function(e,t,n){var r,o,a,i,s,l,c,u,d=e.kind,p=e.result;if(be(u=e.input.charCodeAt(e.position))||ye(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(be(r=e.input.charCodeAt(e.position+1))||n&&ye(r)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,i=!1;0!==u;){if(58===u){if(be(r=e.input.charCodeAt(e.position+1))||n&&ye(r))break}else if(35===u){if(be(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Me(e)||n&&ye(u))break;if(ge(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,Re(e,!1,-1),e.lineIndent>=t){i=!0,u=e.input.charCodeAt(e.position);continue}e.position=a,e.line=s,e.lineStart=l,e.lineIndent=c;break}}i&&(Ae(e,o,a,!1),Le(e,e.line-s),o=a=e.position,i=!1),ve(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Ae(e,o,a,!1),!!e.result||(e.kind=d,e.result=p,!1)}(e,p,1===n)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,null===e.tag&&null===e.anchor||Ce(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(g=s&&De(e,f))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&Ce(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l"),null!==e.result&&d.kind!==e.kind&&Ce(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):Ce(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function Ue(e){var t,n,r,o,a=e.position,i=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(o=e.input.charCodeAt(e.position))&&(Re(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(i=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!be(o);)o=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&Ce(e,"directive name must not be less than one character in length");0!==o;){for(;ve(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!ge(o));break}if(ge(o))break;for(t=e.position;0!==o&&!be(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==o&&Te(e),ce.call(Ie,n)?Ie[n](e,n,r):Ne(e,'unknown document directive "'+n+'"')}Re(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Re(e,!0,-1)):i&&Ce(e,"directives end mark is expected"),Be(e,e.lineIndent-1,4,!1,!0),Re(e,!0,-1),e.checkLineBreaks&&de.test(e.input.slice(a,e.position))&&Ne(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Me(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Re(e,!0,-1)):e.position=55296&&r<=56319&&t+1=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function it(e){return/^\n* /.test(e)}function st(e,t,n,r,o,a,i,s){var l,c,u=0,d=null,p=!1,f=!1,h=-1!==r,m=-1,g=nt(c=at(e,0))&&c!==Ve&&!tt(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&function(e){return!tt(e)&&58!==e}(at(e,e.length-1));if(t||i)for(l=0;l=65536?l+=2:l++){if(!nt(u=at(e,l)))return 5;g=g&&ot(u,d,s),d=u}else{for(l=0;l=65536?l+=2:l++){if(10===(u=at(e,l)))p=!0,h&&(f=f||l-m-1>r&&" "!==e[m+1],m=l);else if(!nt(u))return 5;g=g&&ot(u,d,s),d=u}f=f||h&&l-m-1>r&&" "!==e[m+1]}return p||f?n>9&&it(e)?5:i?2===a?5:2:f?4:3:!g||i||o(e)?2===a?5:2:1}function lt(e,t,n,r,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Ke.indexOf(t)||Ye.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),i=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=r||e.flowLevel>-1&&n>=e.flowLevel;switch(st(t,s,e.indent,i,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+ct(t,e.indent)+ut(Je(function(e,t){var n,r,o=/(\n+)([^\n]*)/g,a=function(){var n=e.indexOf("\n");return n=-1!==n?n:e.length,o.lastIndex=n,dt(e.slice(0,n),t)}(),i="\n"===e[0]||" "===e[0];for(;r=o.exec(e);){var s=r[1],l=r[2];n=" "===l[0],a+=s+(i||n||""===l?"":"\n")+dt(l,t),i=n}return a}(t,i),a));case 5:return'"'+function(e){for(var t,n="",r=0,o=0;o=65536?o+=2:o++)r=at(e,o),!(t=qe[r])&&nt(r)?(n+=e[o],r>=65536&&(n+=e[o+1])):n+=t||Qe(r);return n}(t)+'"';default:throw new j("impossible error: invalid scalar style")}}()}function ct(e,t){var n=it(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function ut(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function dt(e,t){if(""===e||" "===e[0])return e;for(var n,r,o=/ [^ ]/g,a=0,i=0,s=0,l="";n=o.exec(e);)(s=n.index)-a>t&&(r=i>a?i:s,l+="\n"+e.slice(a,r),a=r+1),i=s;return l+="\n",e.length-a>t&&i>a?l+=e.slice(a,i)+"\n"+e.slice(i+1):l+=e.slice(a),l.slice(1)}function pt(e,t,n,r){var o,a,i,s="",l=e.tag;for(o=0,a=n.length;o tag resolver accepts not "'+l+'" style');r=s.represent[l](t,l)}e.dump=r}return!0}return!1}function ht(e,t,n,r,o,a,i){e.tag=null,e.dump=n,ft(e,n,!1)||ft(e,n,!0);var s,l=$e.call(e.dump),c=r;r&&(r=e.flowLevel<0||e.flowLevel>t);var u,d,p="[object Object]"===l||"[object Array]"===l;if(p&&(d=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||d||2!==e.indent&&t>0)&&(o=!1),d&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(p&&d&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===l)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var o,a,i,s,l,c,u="",d=e.tag,p=Object.keys(n);if(!0===e.sortKeys)p.sort();else if("function"===typeof e.sortKeys)p.sort(e.sortKeys);else if(e.sortKeys)throw new j("sortKeys must be a boolean or a function");for(o=0,a=p.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,l&&(c+=et(e,t)),ht(e,t+1,s,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=e.dump));e.tag=d,e.dump=u||"{}"}(e,t,e.dump,o),d&&(e.dump="&ref_"+u+e.dump)):(!function(e,t,n){var r,o,a,i,s,l="",c=e.tag,u=Object.keys(n);for(r=0,o=u.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ht(e,t,i,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===l)r&&0!==e.dump.length?(e.noArrayIndent&&!i&&t>0?pt(e,t-1,e.dump,o):pt(e,t,e.dump,o),d&&(e.dump="&ref_"+u+e.dump)):(!function(e,t,n){var r,o,a,i="",s=e.tag;for(r=0,o=n.length;r",e.dump=s+" "+e.dump)}return!0}function mt(e,t){var n,r,o=[],a=[];for(gt(e,o,a),n=0,r=a.length;n{let{title:t,buttonText:n="View",code:o}=e;const[a,s]=(0,i.useState)(!1);return(0,m.jsxs)(i.Fragment,{children:[(0,m.jsx)(r.Z,{sx:{whiteSpace:"nowrap"},component:"button",onClick:()=>{s(!0)},children:n}),a&&(0,m.jsx)(yt.Z,{title:t,handleClose:()=>{s(!1)},children:(0,m.jsx)(b,{variant:"outlined",children:(0,m.jsx)(y.Z,{sx:{whiteSpace:"pre",fontFamily:"SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace",padding:2,overflow:"scroll",maxHeight:600,textWrap:"wrap"},children:"string"===typeof o?o:bt.dump(o,{indent:2})})})})]})},wt=e=>{let{code:t,buttonText:n,className:r,sx:o,...a}=e;const i="string"===typeof t?t:bt.dump(t,{indent:2,sortKeys:!0}),s=null!==n&&void 0!==n?n:"Expand";return(0,m.jsxs)(x.Z,{className:r,sx:[{display:"flex",flexWrap:"nowrap",flexDirection:"row",gap:1},...Array.isArray(o)?o:[o]],children:[(0,m.jsx)(x.Z,{component:"span",sx:{display:"block",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:i}),(0,m.jsx)(xt,{code:i,buttonText:s,...a})]})}},1685:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var r=n(6934),o=n(890);const a=(0,r.ZP)(o.Z)((e=>{let{theme:t}=e;return{paddingRight:t.spacing(1)}}))},6364:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(9823),o=n(5289),a=n(3400),i=n(890),s=n(2791),l=n(184);class c extends s.Component{render(){const{handleClose:e,title:t}=this.props;return(0,l.jsxs)(o.Z,{fullWidth:!0,maxWidth:"md",onClose:e,open:!0,scroll:"body",PaperProps:{sx:{padding:3}},children:[(0,l.jsx)(a.Z,{sx:e=>({position:"absolute",right:e.spacing(1.5),top:e.spacing(1.5),zIndex:1}),onClick:e,size:"large",children:(0,l.jsx)(r.Z,{})}),(0,l.jsx)(i.Z,{sx:e=>({borderBottomColor:e.palette.divider,borderBottomStyle:"solid",borderBottomWidth:1,fontSize:"1.5rem",lineHeight:1,marginBottom:3,paddingBottom:3}),children:t}),this.props.children]})}}const u=c},7052:(e,t,n)=>{"use strict";n.d(t,{c:()=>c,q:()=>l});var r=n(890),o=n(7892),a=n.n(o),i=n(2791),s=n(184);const l=e=>{let{startTime:t,endTime:n}=e;const r=n||new Date;return a()(r).diff(a()(t))},c=e=>{let{startTime:t,endTime:n}=e;const[,o]=(0,i.useState)(0),c=a().duration(l({startTime:t,endTime:n}));let u,d=1e3;return c.asSeconds()<1?u=c.milliseconds()+"ms":c.asMinutes()<1?u=c.format("s[s]")+" "+c.milliseconds()+"ms":c.asHours()<1?u=c.format("m[m] s[s]"):c.asDays()<1?(u=c.format("H[h] m[m]"),d=6e4):c.asMonths()<1?(u=c.format("D[d] H[h]"),d=6e4):c.asYears()<1?(u=c.format("M[M] D[d]"),d=36e5):(u=c.format("Y[y] M[M] D[d]"),d=36e5),(0,i.useEffect)((()=>{if(!n){const e=setInterval((()=>{o((e=>e+1))}),d);return()=>{clearInterval(e)}}}),[n,d]),(0,s.jsx)(r.Z,{children:u})}},4520:(e,t,n)=>{"use strict";n.d(t,{Sl:()=>D,IL:()=>L,d3:()=>F,MJ:()=>R,x4:()=>M,jf:()=>B});var r=n(533),o=n(5289),a=n(7462),i=n(3366),s=n(2791),l=n(9278),c=n(4419),u=n(890),d=n(6934),p=n(1402),f=n(5878),h=n(1217);function m(e){return(0,h.ZP)("MuiDialogTitle",e)}const g=(0,f.Z)("MuiDialogTitle",["root"]);var v=n(5090),b=n(184);const y=["className","id"],x=(0,d.ZP)(u.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),w=s.forwardRef((function(e,t){const n=(0,p.Z)({props:e,name:"MuiDialogTitle"}),{className:r,id:o}=n,u=(0,i.Z)(n,y),d=n,f=(e=>{const{classes:t}=e;return(0,c.Z)({root:["root"]},m,t)})(d),{titleId:h=o}=s.useContext(v.Z);return(0,b.jsx)(x,(0,a.Z)({component:"h2",className:(0,l.Z)(f.root,r),ownerState:d,ref:t,variant:"h6",id:null!=o?o:h},u))}));function _(e){return(0,h.ZP)("MuiDialogContent",e)}(0,f.Z)("MuiDialogContent",["root","dividers"]);const S=["className","dividers"],k=(0,d.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.Z)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat((t.vars||t).palette.divider),borderBottom:"1px solid ".concat((t.vars||t).palette.divider)}:{[".".concat(g.root," + &")]:{paddingTop:0}})})),j=s.forwardRef((function(e,t){const n=(0,p.Z)({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1}=n,s=(0,i.Z)(n,S),u=(0,a.Z)({},n,{dividers:o}),d=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,c.Z)(r,_,t)})(u);return(0,b.jsx)(k,(0,a.Z)({className:(0,l.Z)(d.root,r),ownerState:u,ref:t},s))}));var Z=n(4925),E=n(8406),C=n(4387),N=n(9431),I=n(2114),A=n(4454),P=n(697),O=n(4518),T=n(5282);const R=e=>{let{taskId:t,attemptNumber:n,nodeId:o}=e;return t?(0,b.jsx)(r.Z,{href:"task/cpu_profile?task_id=".concat(t,"&attempt_number=").concat(n,"&node_id=").concat(o),target:"_blank",title:"Profile the Python worker for 5 seconds (default) and display a CPU flame graph.",rel:"noreferrer",children:"CPU\xa0Flame\xa0Graph"}):null},M=e=>{let{taskId:t,attemptNumber:n,nodeId:o}=e;return t?(0,b.jsx)(r.Z,{href:"task/traceback?task_id=".concat(t,"&attempt_number=").concat(n,"&node_id=").concat(o),target:"_blank",title:"Sample the current Python stack trace for this worker.",rel:"noreferrer",children:"Stack\xa0Trace"}):null},L=e=>{let{pid:t,ip:n,type:o=""}=e;return t&&n&&"undefined"!==typeof t&&"undefined"!==typeof n?(0,b.jsxs)(r.Z,{href:"worker/traceback?pid=".concat(t,"&ip=").concat(n,"&native=0"),target:"_blank",title:"Sample the current Python stack trace for this worker.",rel:"noreferrer",children:["Stack\xa0Trace",o?" (".concat(o,")"):""]}):(0,b.jsx)("div",{})},D=e=>{let{pid:t,ip:n,type:o=""}=e;return t&&n?(0,b.jsxs)(r.Z,{href:"worker/cpu_profile?pid=".concat(t,"&ip=").concat(n,"&duration=5&native=0"),target:"_blank",title:"Profile the Python worker for 5 seconds (default) and display a CPU flame graph.",rel:"noreferrer",children:["CPU\xa0Flame\xa0Graph",o?" (".concat(o,")"):""]}):(0,b.jsx)("div",{})},z=e=>{let{profilerUrl:t,type:n}=e;const[a,i]=(0,s.useState)(5),[l,c]=(0,s.useState)(!0),[d,p]=(0,s.useState)(!1),[f,h]=(0,s.useState)(!1),[m,g]=(0,s.useState)(!1),[v,y]=(0,s.useState)("flamegraph"),x=()=>{g(!1)};return(0,b.jsxs)("div",{children:[(0,b.jsxs)(r.Z,{onClick:()=>{g(!0)},"aria-label":"Memory Profiling",sx:{cursor:"pointer"},children:["Memory\xa0Profiling",n?" (".concat(n,")"):""]}),(0,b.jsxs)(o.Z,{open:m,onClose:x,children:[(0,b.jsx)(w,{children:"Memory Profiling Config"}),(0,b.jsxs)(j,{children:[(0,b.jsx)(Z.Z,{id:"format-label",children:"Format"}),(0,b.jsxs)(E.Z,{labelId:"format-label",id:"format",value:v,"aria-label":v,onChange:e=>y(e.target.value),fullWidth:!0,style:{marginBottom:"12px"},children:[(0,b.jsx)(C.Z,{value:"flamegraph",children:"Flamegraph"}),(0,b.jsx)(C.Z,{value:"table",children:"Table"})]}),(0,b.jsx)(N.Z,{label:"Duration (seconds)",type:"number",value:null!==a?a:"",onChange:e=>i(parseInt(e.target.value,10)),required:!0}),(0,b.jsx)("br",{}),(0,b.jsx)(I.Z,{control:(0,b.jsx)(A.Z,{checked:l,onChange:e=>c(e.target.checked)}),label:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,b.jsx)("span",{style:{marginRight:"4px"},children:"Leaks"}),(0,b.jsx)(T.b,{children:(0,b.jsx)(u.Z,{children:"Enable memory leaks, instead of peak memory usage. Refer to Memray documentation for more details."})})]})}),(0,b.jsx)("br",{}),(0,b.jsx)(I.Z,{control:(0,b.jsx)(A.Z,{checked:d,onChange:e=>p(e.target.checked)}),label:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,b.jsx)("span",{style:{marginRight:"4px"},children:"Native"}),(0,b.jsx)(T.b,{children:(0,b.jsx)(u.Z,{children:"Track native (C/C++) stack frames. Refer to Memray documentation for more details."})})]})}),(0,b.jsx)("br",{}),(0,b.jsx)(I.Z,{control:(0,b.jsx)(A.Z,{checked:f,onChange:e=>h(e.target.checked)}),label:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,b.jsx)("span",{style:{marginRight:"4px"},children:"Python Allocator Tracing"}),(0,b.jsx)(T.b,{children:(0,b.jsx)(u.Z,{children:"Record allocations made by the pymalloc allocator. Refer to Memray documentation for more details."})})]})})]}),(0,b.jsxs)(P.Z,{sx:{padding:"12px",display:"flex",justifyContent:"flex-end"},children:[(0,b.jsx)(O.Z,{onClick:x,variant:"text",sx:{textTransform:"capitalize",color:"#5F6469"},children:"Cancel"}),(0,b.jsx)(O.Z,{color:"primary",variant:"text",onClick:x,style:{textTransform:"capitalize"},children:(0,b.jsx)(r.Z,{href:"".concat(t,"&format=").concat(v,"&duration=").concat(a)+"&leaks=".concat(l?"1":"0")+"&native=".concat(d?"1":"0")+"&trace_python_allocators=".concat(f?"1":"0"),rel:"noreferrer",target:"_blank",children:"Generate\xa0report"})})]})]})]})},F=e=>{let{pid:t,ip:n,type:r=""}=e;if(!t||!n)return(0,b.jsx)("div",{});const o="memory_profile?pid=".concat(t,"&ip=").concat(n);return(0,b.jsx)(z,{profilerUrl:o,type:r})},B=e=>{let{taskId:t,attemptNumber:n,nodeId:r}=e;if(!t)return null;const o="memory_profile?task_id=".concat(t,"&attempt_number=").concat(n,"&node_id=").concat(r);return(0,b.jsx)(z,{profilerUrl:o})}},791:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={idCol:{display:"block",width:"100%",whiteSpace:"nowrap"}}},6689:(e,t,n)=>{"use strict";n.d(t,{G:()=>o,Q:()=>r});const r=4e3,o=1e4},8260:(e,t,n)=>{"use strict";n.d(t,{M9:()=>u,Ql:()=>c});var r=n(7892),o=n.n(r),a=n(2712),i=n.n(a),s=n(3027),l=n.n(s);o().extend(l()),o().extend(i());const c=e=>{o().tz.setDefault(e)},u=e=>o().utc(e).tz().format("YYYY/MM/DD HH:mm:ss")},2515:(e,t,n)=>{"use strict";n.d(t,{dG:()=>c,h8:()=>i,ip:()=>l,y6:()=>s});var r=n(533),o=(n(2791),n(1087)),a=n(184);const i=e=>"/actors/".concat(e),s=e=>{let{actorId:t,to:n,children:s,className:l,sx:c}=e;return(0,a.jsx)(r.Z,{className:l,sx:c,component:o.rU,to:null!==n&&void 0!==n?n:i(t),children:null!==s&&void 0!==s?s:t})},l=e=>"/cluster/nodes/".concat(e),c=e=>{let{nodeId:t,to:n,children:i,className:s,sx:c}=e;return(0,a.jsx)(r.Z,{className:s,sx:c,component:o.rU,to:null!==n&&void 0!==n?n:l(t),children:null!==i&&void 0!==i?i:t})}},7630:(e,t,n)=>{"use strict";n.d(t,{A8:()=>a,NR:()=>i});var r=n(763),o=n.n(r);const a=e=>o().pickBy(e,((e,t)=>!t.startsWith("_"))),i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=Math.ceil(e.length/n),o=Math.min(r,Math.max(1,t)),a=(o-1)*n,i=o*n;return{items:e.slice(a,i),constrainedPage:o,maxPage:r}}},4502:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Y});var r=n(9907),o=n(890),a=n(697),i=n(9431),s=n(3466),l=n(9955),c=n(9836),u=n(6890),d=n(5855),p=n(3994),f=n(3382),h=n(68),m=n(533),g=n(5699),v=n(1258),b=n(7246),y=n(763),x=n.n(y),w=n(2791),_=n(1087),S=n(7273),k=n(7052),j=n(2515),Z=n(4520),E=n(791),C=n(7630),N=n(5529),I=n(9755),A=n(1826),P=n(1426),O=n(8683),T=n(5172),R=n(5397),M=n(3400),L=n(184);const D=e=>{let{text:t,maxWidth:n=100,wordBreak:r="break-word"}=e;const[o,i]=(0,w.useState)(!1),[s,l]=(0,w.useState)(!1),c=(0,w.useRef)(null);return(0,w.useEffect)((()=>{c.current&&l(c.current.scrollWidth>c.current.clientWidth)}),[t]),(0,L.jsx)(h.Z,{title:t,arrow:!0,children:(0,L.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:[(0,L.jsx)(a.Z,{ref:c,sx:{overflow:o?"auto":"hidden",width:"".concat(n,"px"),textOverflow:o?"clip":"ellipsis",whiteSpace:o?"normal":"nowrap",wordBreak:r},children:t}),(0,L.jsx)(M.Z,{"aria-label":"expand row",size:"small",onClick:()=>i(!o),sx:{display:s?"block":"none"},children:o?(0,L.jsx)(T.Z,{}):(0,L.jsx)(R.Z,{})})]})})};var z=n(348),F=n(4231),B=n(1434),U=n(6535),W=n(5282),H=n(4700);const $=1,G=2,V=3,q={[A.b.ALIVE]:$,[A.b.DEPENDENCIES_UNREADY]:G,[A.b.PENDING_CREATION]:G,[A.b.RESTARTING]:G,[A.b.DEAD]:V},K=e=>Object.values(A.b).includes(e),Y=e=>{let{actors:t={},workers:n=[],jobId:y=null,filterToActorId:A,onFilterChange:T,detailPathPrefix:R=""}=e;const[M,$]=(0,w.useState)(1),{changeFilter:G,filterFunc:V}=(0,O.L)({overrideFilters:void 0!==A?[{key:"actorId",val:A}]:void 0,onFilterChange:T}),[Y,Q]=(0,w.useState)(A),[X,J]=(0,w.useState)(10),ee="fake_uptime_attr",te="fake_gpu_attr",ne="fake_gram_attr",re=ee,{sorterFunc:oe,setOrderDesc:ae,setSortKey:ie,sorterKey:se,descVal:le}=(0,O.s)(re),ce=(0,w.useMemo)((()=>{const e=[ee,te,ne],n=Object.values(t||{}).filter(V);let r=n;return r=e.includes(se)?x().sortBy(n,(e=>{const t=le?1:-1;switch(se){case ee:const n=e.startTime,r=e.endTime;return-1*(n&&n>0?(0,k.q)({startTime:n,endTime:r}):Number.POSITIVE_INFINITY)*t;case te:return(0,N.wz)(e.pid,e.gpus)*t;case ne:return(0,I.XI)(e.pid,e.gpus)*t;default:return 0}})):n.sort(oe),x().sortBy(r,(e=>K(e.state)?q[e.state]:0))}),[t,se,oe,V,le]),{items:ue,constrainedPage:de,maxPage:pe}=(0,C.NR)(ce,M,null!==X&&void 0!==X?X:10),fe=[{label:""},{label:"ID"},{label:"Worker ID",helpInfo:(0,L.jsx)(o.Z,{children:"The ID of the worker process that hosts this actor."})},{label:"Class",helpInfo:(0,L.jsxs)(o.Z,{children:['The class name of the actor. For example, the below actor has a class name "Actor".',(0,L.jsx)("br",{}),(0,L.jsx)("br",{}),"@ray.remote",(0,L.jsx)("br",{}),"class Actor:",(0,L.jsx)("br",{}),"\u2003pass",(0,L.jsx)("br",{})]})},{label:"Name",helpInfo:(0,L.jsxs)(o.Z,{children:['The name of the actor given by the "name" argument. For example, this actor\'s name is "unique_name".',(0,L.jsx)("br",{}),(0,L.jsx)("br",{}),'Actor.options(name="unique_name").remote()']})},{label:"Repr",helpInfo:(0,L.jsxs)(o.Z,{children:['The repr name of the actor instance defined by __repr__. For example, this actor will have repr "Actor1"',(0,L.jsx)("br",{}),(0,L.jsx)("br",{}),"@ray.remote",(0,L.jsx)("br",{}),"class Actor:",(0,L.jsx)("br",{}),"\u2003def __repr__(self):",(0,L.jsx)("br",{}),'\u2003\u2003return "Actor1"',(0,L.jsx)("br",{})]})},{label:"State",helpInfo:(0,L.jsx)(o.Z,{children:'The state of the actor. States are documented as a "ActorState" in the "gcs.proto" file.'})},{label:"Actions",helpInfo:(0,L.jsxs)(o.Z,{children:["A list of actions performable on this actor.",(0,L.jsx)("br",{}),"- Log: view log messages of this actor. Only available if a node is alive.",(0,L.jsx)("br",{}),"- Stack Trace: Get a stacktrace of the alive actor.",(0,L.jsx)("br",{}),"- CPU Flame Graph: Get a flamegraph for the next 5 seconds of an alive actor."]})},{label:"Uptime"},{label:"Job ID"},{label:"PID"},{label:"IP"},{label:"Node ID"},{label:"CPU",helpInfo:(0,L.jsxs)(o.Z,{children:["Hardware CPU usage of this Actor (from Worker Process).",(0,L.jsx)("br",{}),(0,L.jsx)("br",{}),"Node's CPU usage is calculated against all CPU cores. Worker Process's CPU usage is calculated against 1 CPU core. As a result, the sum of CPU usage from all Worker Processes is not equal to the Node's CPU usage."]})},{label:"Memory",helpInfo:(0,L.jsxs)(o.Z,{children:["Actor's RAM usage (from Worker Process). ",(0,L.jsx)("br",{})]})},{label:"GPU",helpInfo:(0,L.jsxs)(o.Z,{children:["Usage of each GPU device. If no GPU usage is detected, here are the potential root causes:",(0,L.jsx)("br",{}),"1. non-GPU Ray image is used on this node. Switch to a GPU Ray image and try again. ",(0,L.jsx)("br",{}),"2. Non Nvidia or AMD GPUs are being used.",(0,L.jsx)("br",{}),"3. pynvml or pyamdsmi module raises an exception."]})},{label:"GRAM",helpInfo:(0,L.jsxs)(o.Z,{children:["Actor's GRAM usage (from Worker Process). ",(0,L.jsx)("br",{})]})},{label:"Restarted",helpInfo:(0,L.jsx)(o.Z,{children:"The total number of the count this actor has been restarted."})},{label:"Placement group ID",helpInfo:(0,L.jsxs)(o.Z,{children:["The ID of the placement group this actor is scheduled to.",(0,L.jsx)("br",{})]})},{label:"Required resources",helpInfo:(0,L.jsxs)(o.Z,{children:["The required Ray resources to start an actor.",(0,L.jsx)("br",{}),"For example, this actor has GPU:1 required resources.",(0,L.jsx)("br",{}),(0,L.jsx)("br",{}),"@ray.remote(num_gpus=1)",(0,L.jsx)("br",{}),"class Actor:",(0,L.jsx)("br",{}),"\u2003pass",(0,L.jsx)("br",{})]})},{label:"Label selector",helpInfo:(0,L.jsx)(o.Z,{children:"The label selector of the actor."})},{label:"Exit detail",helpInfo:(0,L.jsx)(o.Z,{children:"The detail of an actor exit. Only available when an actor is dead."})}];return(0,L.jsxs)(w.Fragment,{children:[(0,L.jsxs)(a.Z,{sx:{display:"flex",flex:1,alignItems:"center"},children:[(0,L.jsx)(g.Z,{style:{margin:8,width:120},options:Array.from(new Set(Object.values(t).map((e=>e.state)))),onInputChange:(e,t)=>{G("state",t.trim())},renderInput:e=>(0,L.jsx)(i.Z,{...e,label:"State"})}),(0,L.jsx)(g.Z,{style:{margin:8,width:150},defaultValue:void 0===A?y:void 0,options:Array.from(new Set(Object.values(t).map((e=>e.jobId)))),onInputChange:(e,t)=>{G("jobId",t.trim())},renderInput:e=>(0,L.jsx)(i.Z,{...e,label:"Job Id"})}),(0,L.jsx)(g.Z,{style:{margin:8,width:150},options:Array.from(new Set(Object.values(t).map((e=>{var t;return null===(t=e.address)||void 0===t?void 0:t.ipAddress})))),onInputChange:(e,t)=>{G("address.ipAddress",t.trim())},renderInput:e=>(0,L.jsx)(i.Z,{...e,label:"IP"})}),(0,L.jsx)(g.Z,{"data-testid":"nodeIdFilter",style:{margin:8,width:150},options:Array.from(new Set(Object.values(t).map((e=>{var t;return null===(t=e.address)||void 0===t?void 0:t.nodeId})))),onInputChange:(e,t)=>{G("address.nodeId",t.trim())},renderInput:e=>(0,L.jsx)(i.Z,{...e,label:"Node ID"})}),(0,L.jsx)(i.Z,{style:{margin:8,width:120},label:"PID",size:"small",InputProps:{onChange:e=>{let{target:{value:t}}=e;G("pid",t.trim())},endAdornment:(0,L.jsx)(s.Z,{position:"end",children:(0,L.jsx)(r.Z,{})})}})]}),(0,L.jsxs)(a.Z,{sx:{display:"flex",flex:1,alignItems:"center"},children:[(0,L.jsx)(i.Z,{style:{margin:8,width:120},label:"Name",size:"small",InputProps:{onChange:e=>{let{target:{value:t}}=e;G("name",t.trim())},endAdornment:(0,L.jsx)(s.Z,{position:"end",children:(0,L.jsx)(r.Z,{})})}}),(0,L.jsx)(i.Z,{style:{margin:8,width:120},label:"Worker ID",size:"small",InputProps:{onChange:e=>{let{target:{value:t}}=e;G("workerId",t.trim())},endAdornment:(0,L.jsx)(s.Z,{position:"end",children:(0,L.jsx)(r.Z,{})})}}),(0,L.jsx)(i.Z,{style:{margin:8,width:120},label:"Class",size:"small",InputProps:{onChange:e=>{let{target:{value:t}}=e;G("actorClass",t.trim())},endAdornment:(0,L.jsx)(s.Z,{position:"end",children:(0,L.jsx)(r.Z,{})})}}),(0,L.jsx)(i.Z,{style:{margin:8,width:120},label:"repr",size:"small",InputProps:{onChange:e=>{let{target:{value:t}}=e;G("reprName",t.trim())},endAdornment:(0,L.jsx)(s.Z,{position:"end",children:(0,L.jsx)(r.Z,{})})}}),(0,L.jsx)(i.Z,{value:null!==A&&void 0!==A?A:Y,style:{margin:8,width:120},label:"Actor ID",size:"small",InputProps:{onChange:e=>{let{target:{value:t}}=e;G("actorId",t.trim()),Q(t)},endAdornment:(0,L.jsx)(s.Z,{position:"end",children:(0,L.jsx)(r.Z,{})})}}),(0,L.jsx)(i.Z,{style:{margin:8,width:120},label:"Page Size",size:"small",value:X,InputProps:{onChange:e=>{let{target:{value:t}}=e;J(Math.min(Number(t),500)||void 0)},endAdornment:(0,L.jsx)(s.Z,{position:"end",children:"Per Page"})}}),(0,L.jsx)("div",{"data-testid":"sortByFilter",style:{margin:8},children:(0,L.jsx)(F.ul,{label:"Sort By",options:[[ee,"Uptime"],["processStats.memoryInfo.rss","Used Memory"],["mem[0]","Total Memory"],["processStats.cpuPercent","CPU"],[te,"GPU Utilization"],[ne,"GRAM Usage"]],onChange:e=>ie(e),showAllOption:!1,defaultValue:re})}),(0,L.jsxs)(a.Z,{sx:{marginLeft:1},children:["Reverse:",(0,L.jsx)(l.Z,{onChange:(e,t)=>ae(t)})]})]}),(0,L.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,L.jsx)("div",{children:(0,L.jsx)(b.Z,{page:de,onChange:(e,t)=>$(t),count:pe})}),(0,L.jsx)("div",{children:(0,L.jsx)(B.Z,{type:"actor",list:ce})})]}),(0,L.jsx)(a.Z,{sx:{overflowX:"scroll"},children:(0,L.jsxs)(c.Z,{children:[(0,L.jsx)(u.Z,{children:(0,L.jsx)(d.Z,{children:fe.map((e=>{let{label:t,helpInfo:n}=e;return(0,L.jsx)(p.Z,{align:"center",children:(0,L.jsxs)(a.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:[t,n&&(0,L.jsx)(W.b,{sx:{marginLeft:1},children:n})]})},t)}))})}),(0,L.jsx)(f.Z,{children:ue.map((e=>{var r;let{actorId:o,actorClass:i,reprName:s,jobId:l,placementGroupId:c,pid:u,address:d,state:f,name:g,numRestarts:b,startTime:y,endTime:x,exitDetail:C,requiredResources:A,gpus:O,processStats:T,mem:M,labelSelector:F}=e;return(0,L.jsxs)(H.V,{length:n.filter((e=>e.pid===u&&d.ipAddress===e.coreWorkerStats[0].ipAddress)).length,expandComponent:(0,L.jsx)(H.Z,{actorMap:{},workers:n.filter((e=>e.pid===u&&d.ipAddress===e.coreWorkerStats[0].ipAddress)),mini:!0}),children:[(0,L.jsx)(p.Z,{align:"center",children:(0,L.jsx)(h.Z,{title:o,arrow:!0,children:(0,L.jsx)(a.Z,{sx:E.Z.idCol,children:(0,L.jsx)(j.y6,{actorId:o,to:R?"".concat(R,"/").concat(o):o})})})}),(0,L.jsx)(p.Z,{align:"center",children:null!==(r=t[o])&&void 0!==r&&r.workerId?(0,L.jsx)(h.Z,{title:t[o].workerId,arrow:!0,children:(0,L.jsx)(a.Z,{sx:{maxWidth:"120px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t[o].workerId})}):"-"}),(0,L.jsx)(p.Z,{align:"center",children:i}),(0,L.jsx)(p.Z,{align:"center",children:g||"-"}),(0,L.jsx)(p.Z,{align:"center",children:s||"-"}),(0,L.jsx)(p.Z,{align:"center",children:(0,L.jsx)(U.b,{type:"actor",status:f})}),(0,L.jsx)(p.Z,{align:"center",children:(0,L.jsxs)(w.Fragment,{children:[(0,L.jsx)(j.y6,{actorId:o,to:R?"".concat(R,"/").concat(o):o,children:"Log"}),(0,L.jsx)("br",{}),(0,L.jsx)(Z.Sl,{pid:u,ip:null===d||void 0===d?void 0:d.ipAddress,type:""}),(0,L.jsx)("br",{}),(0,L.jsx)(Z.IL,{pid:u,ip:null===d||void 0===d?void 0:d.ipAddress,type:""}),(0,L.jsx)("br",{}),(0,L.jsx)(Z.d3,{pid:u,ip:null===d||void 0===d?void 0:d.ipAddress})]})}),(0,L.jsx)(p.Z,{align:"center",children:y&&y>0?(0,L.jsx)(k.c,{startTime:y,endTime:x}):"-"}),(0,L.jsx)(p.Z,{align:"center",children:l}),(0,L.jsx)(p.Z,{align:"center",children:u||"-"}),(0,L.jsx)(p.Z,{align:"center",children:null!==d&&void 0!==d&&d.ipAddress?null===d||void 0===d?void 0:d.ipAddress:"-"}),(0,L.jsx)(p.Z,{align:"center",children:null!==d&&void 0!==d&&d.nodeId?(0,L.jsx)(h.Z,{title:null===d||void 0===d?void 0:d.nodeId,arrow:!0,children:(0,L.jsx)(a.Z,{sx:E.Z.idCol,children:(0,L.jsx)(m.Z,{component:_.rU,to:(0,j.ip)(d.nodeId),children:null===d||void 0===d?void 0:d.nodeId})})}):"-"}),(0,L.jsx)(p.Z,{children:(0,L.jsx)(z.Z,{num:Number(null===T||void 0===T?void 0:T.cpuPercent),total:100,children:null===T||void 0===T?void 0:T.cpuPercent})}),(0,L.jsx)(p.Z,{children:M&&(0,L.jsxs)(z.Z,{num:null===T||void 0===T?void 0:T.memoryInfo.rss,total:M[0],children:[(0,P.r)(null===T||void 0===T?void 0:T.memoryInfo.rss),"/",(0,P.r)(M[0]),"(",((null===T||void 0===T?void 0:T.memoryInfo.rss)/M[0]*100).toFixed(1),"%)"]})}),(0,L.jsx)(p.Z,{children:(0,L.jsx)(N.HH,{workerPID:u,gpus:O})}),(0,L.jsx)(p.Z,{children:(0,L.jsx)(I.w,{workerPID:u,gpus:O})}),(0,L.jsx)(p.Z,{align:"center",style:{color:Number(b)>0?v.Z[500]:"inherit"},children:b}),(0,L.jsx)(p.Z,{align:"center",children:(0,L.jsx)(h.Z,{title:c||"-",arrow:!0,children:(0,L.jsx)(a.Z,{sx:E.Z.idCol,children:c||"-"})})}),(0,L.jsx)(p.Z,{align:"center",children:Object.entries(A||{}).length>0?(0,L.jsx)(S.Z,{sx:{maxWidth:200},title:"Required resources",code:JSON.stringify(A,void 0,2)}):"{}"}),(0,L.jsx)(p.Z,{align:"center",children:Object.entries(F||{}).length>0?(0,L.jsx)(S.Z,{sx:{maxWidth:200},title:"Label selector",code:JSON.stringify(F,void 0,2)}):"{}"}),(0,L.jsx)(p.Z,{align:"center",children:(0,L.jsx)(D,{text:C})})]},o)}))})]})})]})}},1035:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ke});var r=n(697),o=n(890),a=n(7892),i=n.n(a);const s=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],l=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],c=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],u=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],d=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();var p="[0-9](_*[0-9])*",f="\\.(".concat(p,")"),h="[0-9a-fA-F](_*[0-9a-fA-F])*",m={className:"number",variants:[{begin:"(\\b(".concat(p,")((").concat(f,")|\\.)?|(").concat(f,"))")+"[eE][+-]?(".concat(p,")[fFdD]?\\b")},{begin:"\\b(".concat(p,")((").concat(f,")[fFdD]?\\b|\\.([fFdD]\\b)?)")},{begin:"(".concat(f,")[fFdD]?\\b")},{begin:"\\b(".concat(p,")[fFdD]\\b")},{begin:"\\b0[xX]((".concat(h,")\\.?|(").concat(h,")?\\.(").concat(h,"))")+"[pP][+-]?(".concat(p,")[fFdD]?\\b")},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:"\\b0[xX](".concat(h,")[lL]?\\b")},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function g(e,t,n){return-1===n?"":e.replace(t,(r=>g(e,t,n-1)))}const v="[A-Za-z$_][0-9A-Za-z$_]*",b=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],y=["true","false","null","undefined","NaN","Infinity"],x=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],w=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],S=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],k=[].concat(_,x,w);var j="[0-9](_*[0-9])*",Z="\\.(".concat(j,")"),E="[0-9a-fA-F](_*[0-9a-fA-F])*",C={className:"number",variants:[{begin:"(\\b(".concat(j,")((").concat(Z,")|\\.)?|(").concat(Z,"))")+"[eE][+-]?(".concat(j,")[fFdD]?\\b")},{begin:"\\b(".concat(j,")((").concat(Z,")[fFdD]?\\b|\\.([fFdD]\\b)?)")},{begin:"(".concat(Z,")[fFdD]?\\b")},{begin:"\\b(".concat(j,")[fFdD]\\b")},{begin:"\\b0[xX]((".concat(E,")\\.?|(").concat(E,")?\\.(").concat(E,"))")+"[pP][+-]?(".concat(j,")[fFdD]?\\b")},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:"\\b0[xX](".concat(E,")[lL]?\\b")},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const N=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],I=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],A=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],P=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],O=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),T=A.concat(P);const R=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],M=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],L=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],D=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],z=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function F(e){return e?"string"===typeof e?e:e.source:null}function B(e){return U("(?=",e,")")}function U(){for(var e=arguments.length,t=new Array(e),n=0;nF(e))).join("");return r}function W(e){const t=e[e.length-1];return"object"===typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function H(){for(var e=arguments.length,t=new Array(e),n=0;nF(e))).join("|")+")";return o}const $=e=>U(/\b/,e,/\w$/.test(e)?/\b/:/\B/),G=["Protocol","Type"].map($),V=["init","self"].map($),q=["Any","Self"],K=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Y=["false","nil","true"],Q=["assignment","associativity","higherThan","left","lowerThan","none","right"],X=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],J=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],ee=H(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),te=H(ee,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),ne=U(ee,te,"*"),re=H(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),oe=H(re,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),ae=U(re,oe,"*"),ie=U(/[A-Z]/,oe,"*"),se=["autoclosure",U(/convention\(/,H("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",U(/objc\(/,ae,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],le=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];const ce="[A-Za-z$_][0-9A-Za-z$_]*",ue=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],de=["true","false","null","undefined","NaN","Infinity"],pe=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],fe=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],he=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],me=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ge=[].concat(he,pe,fe);const ve=n(566);var be=n(4707);const ye=Object.assign(xe(Error),{eval:xe(EvalError),range:xe(RangeError),reference:xe(ReferenceError),syntax:xe(SyntaxError),type:xe(TypeError),uri:xe(URIError)});function xe(e){return t.displayName=e.displayName||e.name,t;function t(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:{},r=n.prefix;if("string"!==typeof e)throw ye("Expected `string` for name, got `%s`",e);if(!ve.getLanguage(e))throw ye("Unknown language: `%s` is not registered",e);if("string"!==typeof t)throw ye("Expected `string` for value, got `%s`",t);null!==r&&void 0!==r||(r=_e),ve.configure({__emitter:ke,classPrefix:r});const o=ve.highlight(t,{language:e,ignoreIllegals:!0});if(ve.configure({}),o.errorRaised)throw o.errorRaised;return o._emitter.root.data.language=o.language,o._emitter.root.data.relevance=o.relevance,o._emitter.root}class ke{constructor(e){this.options=e,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){const n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:"element",tagName:"span",properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){const t={type:"element",tagName:"span",properties:{className:e.split(".").map(((e,t)=>t?e+"_".repeat(t):this.options.classPrefix+e))},children:[]};this.stack[this.stack.length-1].children.push(t),this.stack.push(t)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const je={highlight:Se,highlightAuto:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.subset||ve.listLanguages();let r=t.prefix,o=-1,a={type:"root",data:{language:null,relevance:0},children:[]};if(null!==r&&void 0!==r||(r=_e),"string"!==typeof e)throw ye("Expected `string` for value, got `%s`",e);for(;++oa.data.relevance&&(a=i)}return a},registerLanguage:function(e,t){ve.registerLanguage(e,t)},registered:function(e){return Boolean(ve.getLanguage(e))},listLanguages:function(){return ve.listLanguages()},registerAlias:function(e,t){if("string"===typeof e)ve.registerAliases(t,{languageName:e});else{let t;for(t in e)we.call(e,t)&&ve.registerAliases(e[t],{languageName:t})}}};je.registerLanguage("arduino",(function(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",a="(?!struct)(decltype\\(auto\\)|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",i={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},d=t.optional(o)+e.IDENT_RE+"\\s*\\(",p={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},f={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},h=[f,c,i,n,e.C_BLOCK_COMMENT_MODE,l,s],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:h.concat([{begin:/\(/,end:/\)/,keywords:p,contains:h.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,l,i,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,s,l,i]}]},i,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:p,illegal:"",keywords:p,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:p},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n})),je.registerLanguage("bash",(function(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},i={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(i);const s={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},l=e.SHEBANG({binary:"(".concat(["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|"),")"),relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[l,e.SHEBANG(),c,s,e.HASH_COMMENT_MODE,a,{match:/(\/[a-z._-]+)+/},i,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}})),je.registerLanguage("c",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",i={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},d=t.optional(o)+e.IDENT_RE+"\\s*\\(",p={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},f=[c,i,n,e.C_BLOCK_COMMENT_MODE,l,s],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},m={begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(u,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,l,i,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,s,l,i]}]},i,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:p,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:s,keywords:p}}})),je.registerLanguage("cpp",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",a="(?!struct)(decltype\\(auto\\)|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",i={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},d=t.optional(o)+e.IDENT_RE+"\\s*\\(",p={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},f={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},h=[f,c,i,n,e.C_BLOCK_COMMENT_MODE,l,s],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:h.concat([{begin:/\(/,end:/\)/,keywords:p,contains:h.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,l,i,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,s,l,i]}]},i,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:p,illegal:"",keywords:p,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:p},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),je.registerLanguage("csharp",(function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},o={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},a=e.inherit(o,{illegal:/\n/}),i={className:"subst",begin:/\{/,end:/\}/,keywords:t},s=e.inherit(i,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,s]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},i]},u=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]});i.contains=[c,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE],s.contains=[u,l,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const d={variants:[c,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},f=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",h={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},d,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,p,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,p,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+f+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,p],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[d,r,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},h]}})),je.registerLanguage("css",(function(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),r=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+c.join("|")+")"},{begin:":(:)?("+u.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...r,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...r,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:l.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...r,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+s.join("|")+")\\b"}]}})),je.registerLanguage("diff",(function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}})),je.registerLanguage("go",(function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:")?",/~~~/g,2),o={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},a={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},i={className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:o,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:o,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},m,a]}})),je.registerLanguage("javascript",(function(e){const t=e.regex,n=v,r="<>",o="",a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let o;">"===r&&(((e,t)=>{let{after:n}=t;const r="",L={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[C]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:i,exports:{PARAMS_CONTAINS:E,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,f,h,m,g,{match:/\$\d+/},u,I,{className:"attr",begin:n+t.lookahead(":"),relevance:0},L,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:E}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},A,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[C,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},T,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[C]},P,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},N,R,{match:/\$[(.]/}]}})),je.registerLanguage("json",(function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),je.registerLanguage("kotlin",(function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},a={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,r]}]};r.contains.push(a);const i={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},s={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"string"}),"self"]}]},l=C,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=u;return d.variants[1].contains=[u],u.variants[1].contains=[d],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,i,s,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[u,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,i,s,a,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},i,s]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}})),je.registerLanguage("less",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=T,r="([\\w-]+|@\\{[\\w-]+\\})",o=[],a=[],i=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},s=function(e,t,n){return{className:e,begin:t,relevance:n}},l={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:I.join(" ")},c={begin:"\\(",end:"\\)",contains:a,keywords:l,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i("'"),i('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,c,s("variable","@@?[\\w-]+",10),s("variable","@\\{[\\w-]+\\}"),s("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const u=a.concat({begin:/\{/,end:/\}/,contains:o}),d={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},p={begin:r+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+O.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:l,returnEnd:!0,contains:a,relevance:0}},h={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:u}},m={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:r,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,s("keyword","all\\b"),s("variable","@\\{[\\w-]+\\}"),{begin:"\\b("+N.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,s("selector-tag",r,0),s("selector-id","#"+r),s("selector-class","\\."+r,0),s("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+A.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+P.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:"!important"},t.FUNCTION_DISPATCH]},g={begin:"[\\w-]+:(:)?"+"(".concat(n.join("|"),")"),returnBegin:!0,contains:[m]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,h,g,p,m,d,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),je.registerLanguage("lua",(function(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",n,{contains:[r],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}})),je.registerLanguage("makefile",(function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},r={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},o={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},a=e.inherit(r,{contains:[]}),i=e.inherit(o,{contains:[]});r.contains.push(i),o.contains.push(a);let s=[t,n];return[r,o,a,i].forEach((e=>{e.contains=e.contains.concat(s)})),s=s.concat(r,o),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:s},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:s}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},r,o,{className:"quote",begin:"^>\\s+",contains:s,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),je.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),je.registerLanguage("perl",(function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"].join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},a={begin:/->\{/,end:/\}/},i={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},s=[e.BACKSLASH_ESCAPE,o,i],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=function(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\\1";const a="\\1"===o?o:t.concat(o,r);return t.concat(t.concat("(?:",e,")"),r,/(?:\\.|[^\\\/])*?/,a,/(?:\\.|[^\\\/])*?/,o,n)},u=(e,r,o)=>t.concat(t.concat("(?:",e,")"),r,/(?:\\.|[^\\\/])*?/,o,n),d=[i,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:s,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",t.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:u("(?:m|qr)?",/\//,/\//)},{begin:u("m|qr",t.either(...l,{capture:!0}),/\1/)},{begin:u("m|qr",/\(/,/\)/)},{begin:u("m|qr",/\[/,/\]/)},{begin:u("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=d,a.contains=d,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:d}})),je.registerLanguage("php",(function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a={scope:"variable",match:"\\$+"+r},i={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},s=e.inherit(e.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(i)}),s,{begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(i),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},u={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},d=["false","null","true"],p=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],f=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],h={keyword:p,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(d),built_in:f},m=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(l,"+"),t.concat("(?!",m(f).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},v=t.concat(r,"\\b(?!\\()"),b={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),v],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),v],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},y={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},x={relevance:0,begin:/\(/,end:/\)/,keywords:h,contains:[y,a,b,e.C_BLOCK_COMMENT_MODE,c,u,g]},w={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",m(p).join("\\b|"),"|",m(f).join("\\b|"),"\\b)"),r,t.concat(l,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[x]};x.contains.push(w);const _=[y,b,e.C_BLOCK_COMMENT_MODE,c,u,g];return{case_insensitive:!1,keywords:h,contains:[{begin:t.concat(/#\[\s*/,o),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:d,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:d,keyword:["new","array"]},contains:["self",..._]},..._,{scope:"meta",match:o}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},a,w,b,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:h,contains:["self",a,b,e.C_BLOCK_COMMENT_MODE,c,u]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,u]}})),je.registerLanguage("php-template",(function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}})),je.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),je.registerLanguage("python",(function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},a={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},s={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",u="(\\b(".concat(c,"))?\\.(").concat(c,")|\\b(").concat(c,")\\."),d="\\b|".concat(r.join("|")),p={className:"number",relevance:0,variants:[{begin:"(\\b(".concat(c,")|(").concat(u,"))[eE][+-]?(").concat(c,")[jJ]?(?=").concat(d,")")},{begin:"(".concat(u,")[jJ]?")},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=".concat(d,")")},{begin:"\\b0[bB](_?[01])+[lL]?(?=".concat(d,")")},{begin:"\\b0[oO](_?[0-7])+[lL]?(?=".concat(d,")")},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=".concat(d,")")},{begin:"\\b(".concat(c,")[jJ](?=").concat(d,")")}]},f={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},h={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",a,p,l,e.HASH_COMMENT_MODE]}]};return i.contains=[l,p,a],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[a,p,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,f,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[p,h,l]}]}})),je.registerLanguage("python-repl",(function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}})),je.registerLanguage("r",(function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),je.registerLanguage("ruby",(function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},i={className:"doctag",begin:"@[A-Za-z]+"},s={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[i]}),e.COMMENT("^=begin","^=end",{contains:[i],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:a},u={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},d="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:"\\b(".concat("[1-9](_?[0-9])*|0",")(\\.(").concat(d,"))?([eE][+-]?(").concat(d,")|r)?i?\\b")},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},f={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},h=[u,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:a},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[f]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(s,l),relevance:0}].concat(s,l);c.contains=h,f.contains=h;const m=[{begin:/^\s*=>/,starts:{end:"$",contains:h}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:a,contains:h}}];return l.unshift(s),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(m).concat(l).concat(h)}})),je.registerLanguage("rust",(function(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",o=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],a=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:a,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:o},illegal:""},n]}})),je.registerLanguage("scss",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=D,r=L,o="@[a-z-]+",a={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+R.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+z.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:M.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}})),je.registerLanguage("shell",(function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),je.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],a=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],i=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],s=a,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!a.includes(e))),c={begin:t.concat(/\b/,t.either(...s),/\s*\(/),relevance:0,keywords:{built_in:s}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e){let{exceptions:t,when:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?"".concat(e,"|0"):e))}(l,{when:e=>e.length<3}),literal:r,type:o,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...i),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(i),literal:r,type:o}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),je.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,H(...G,...V)],className:{2:"keyword"}},a={match:U(/\./,H(...K)),relevance:0},i=K.filter((e=>"string"===typeof e)).concat(["_|0"]),s={variants:[{className:"keyword",match:H(...K.filter((e=>"string"!==typeof e)).concat(q).map($),...V)}]},l={$pattern:H(/\b\w+/,/#\w+/),keyword:i.concat(X),literal:Y},c=[o,a,s],u=[{match:U(/\./,H(...J)),relevance:0},{className:"built_in",match:U(/\b/,H(...J),/(?=\()/)}],d={match:/->/,relevance:0},p=[d,{className:"operator",relevance:0,variants:[{match:ne},{match:"\\.(\\.|".concat(te,")+")}]}],f="([0-9]_*)+",h="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:"\\b(".concat(f,")(\\.(").concat(f,"))?")+"([eE][+-]?(".concat(f,"))?\\b")},{match:"\\b0x(".concat(h,")(\\.(").concat(h,"))?")+"([pP][+-]?(".concat(f,"))?\\b")},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{className:"subst",variants:[{match:U(/\\/,e,/[0\\tnr"']/)},{match:U(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{className:"subst",match:U(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{className:"subst",label:"interpol",begin:U(/\\/,e,/\(/),end:/\)/}},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{begin:U(e,/"""/),end:U(/"""/,e),contains:[g(e),v(e),b(e)]}},x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{begin:U(e,/"/),end:U(/"/,e),contains:[g(e),b(e)]}},w={className:"string",variants:[y(),y("#"),y("##"),y("###"),x(),x("#"),x("##"),x("###")]},_={match:U(/`/,ae,/`/)},S=[_,{className:"variable",match:/\$\d+/},{className:"variable",match:"\\$".concat(oe,"+")}],k=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:le,contains:[...p,m,w]}]}},{className:"keyword",match:U(/@/,H(...se))},{className:"meta",match:U(/@/,ae)}],j={match:B(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:U(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,oe,"+")},{className:"type",match:ie,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:U(/\s+&\s+/,B(ie)),relevance:0}]},Z={begin://,keywords:l,contains:[...r,...c,...k,d,j]};j.contains.push(Z);const E={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:U(ae,/\s*:/),keywords:"_|0",relevance:0},...r,...c,...u,...p,m,w,...S,...k,j]},C={begin://,contains:[...r,j]},N={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:H(B(U(ae,/\s*:/)),B(U(ae,/\s+/,ae,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:ae}]},...r,...c,...p,m,w,...k,j,E],endsParent:!0,illegal:/["']/},I={match:[/func/,/\s+/,H(_.match,ae,ne)],className:{1:"keyword",3:"title.function"},contains:[C,N,t],illegal:[/\[/,/%/]},A={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[C,N,t],illegal:/\[|%/},P={match:[/operator/,/\s+/,ne],className:{1:"keyword",3:"title"}},O={begin:[/precedencegroup/,/\s+/,ie],className:{1:"keyword",3:"title"},contains:[j],keywords:[...Q,...Y],end:/}/};for(const T of w.variants){const e=T.contains.find((e=>"interpol"===e.label));e.keywords=l;const t=[...c,...u,...p,m,w,...S];e.contains=[...t,{begin:/\(/,end:/\)/,contains:["self",...t]}]}return{name:"Swift",keywords:l,contains:[...r,I,A,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},P,O,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},...c,...u,...p,m,w,...S,...k,j,E]}})),je.registerLanguage("typescript",(function(e){const t=function(e){const t=e.regex,n=ce,r="<>",o="",a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let o;">"===r&&(((e,t)=>{let{after:n}=t;const r="",N={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[x]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:i,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,f,h,m,g,{match:/\$\d+/},u,_,{className:"attr",begin:n+t.lookahead(":"),relevance:0},N,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},S,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[x,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[x]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},w,E,{match:/\$[(.]/}]}}(e),n=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],r={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:n},contains:[t.exports.CLASS_REFERENCE]},a={$pattern:ce,keyword:ue.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:de,built_in:ge.concat(n),"variable.language":me},i={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},s=(e,t,n)=>{const r=e.contains.findIndex((e=>e.label===t));if(-1===r)throw new Error("can not find mode to replace");e.contains.splice(r,1,n)};return Object.assign(t.keywords,a),t.exports.PARAMS_CONTAINS.push(i),t.contains=t.contains.concat([i,r,o]),s(t,"shebang",e.SHEBANG()),s(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),t.contains.find((e=>"func.def"===e.label)).relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),t})),je.registerLanguage("vbnet",(function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,r=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,i={className:"literal",variants:[{begin:t.concat(/# */,t.either(r,n),/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(r,n),/ +/,t.either(o,a),/ *#/)}]},s=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},s,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[l]}]}})),je.registerLanguage("wasm",(function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}})),je.registerLanguage("xml",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(o,{begin:/\(/,end:/\)/}),i=e.inherit(e.APOS_STRING_MODE,{className:"string"}),s=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[o,s,i,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[o,a,s,i]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[s]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),je.registerLanguage("yaml",(function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},o=e.inherit(r,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),a={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},i={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},s={begin:/\{/,end:/\}/,contains:[i],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[i],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},a,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},s,l,r],u=[...c];return u.pop(),u.push(o),i.contains=u,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}));var Ze=n(2791),Ee=n(7462),Ce=n(7326),Ne=n(1721),Ie=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function Ae(e,t){if(e.length!==t.length)return!1;for(var n=0;n=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var Me=null;function Le(e){if(void 0===e&&(e=!1),null===Me||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Me="positive-descending":(t.scrollLeft=1,Me=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Me}return Me}var De=function(e,t){return e};function ze(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,a=e.getOffsetForIndexAndAlignment,i=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,(0,Ce.Z)(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:(0,Ce.Z)(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"===typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Pe((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=Pe((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,a=r.props,i=a.direction,s=a.itemSize,l=a.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&i);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===i||"horizontal"===l,h="rtl"===i,m=f?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Pe((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,a=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,i=o;if("rtl"===t)switch(Le()){case"negative":i=-o;break;case"positive-descending":i=a-n-o}return i=Math.max(0,Math.min(i,a-n)),{isScrolling:!0,scrollDirection:e.scrollOffset0)for(var Z=S;Z<=k;Z++)j.push((0,Ze.createElement)(t,{data:u,key:p(Z,u),index:Z,isScrolling:v?y:void 0,style:this._getItemStyle(Z)}));var E=r(this.props,this._instanceProps);return(0,Ze.createElement)(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:(0,Ee.Z)({position:"relative",height:a,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},(0,Ze.createElement)(s||l||"div",{children:j,ref:i,style:{height:x?"100%":E,pointerEvents:y?"none":void 0,width:x?E:"100%"}}))},d._callPropsCallbacks=function(){if("function"===typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"===typeof this.props.onScroll){var a=this.state,i=a.scrollDirection,s=a.scrollOffset,l=a.scrollUpdateWasRequested;this._callOnScroll(i,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,a=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=i(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=o&&"backward"!==a?1:Math.max(1,n),p=o&&"forward"!==a?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(Ze.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Fe=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Be=ze({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r){var o=e.direction,a=e.height,i=e.itemCount,s=e.itemSize,l=e.layout,c=e.width,u="horizontal"===o||"horizontal"===l?c:a,d=Math.max(0,i*s-u),p=Math.min(d,t*s),f=Math.max(0,t*s-u+s);switch("smart"===n&&(n=r>=f-u&&r<=p+u?"auto":"center"),n){case"start":return p;case"end":return f;case"center":var h=Math.round(f+(p-f)/2);return hd+Math.floor(u/2)?d:h;default:return r>=f&&r<=p?r:rMath.random().toString(16).slice(-8),Ge=/(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)\s+([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/,Ve=function(e,t){let{type:n,tagName:r,properties:o,children:a,value:i=""}=e,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";switch(n){case"element":return Ze.createElement(r,{className:o.className[0],key:"".concat(t,"line").concat($e())},a.map(((e,n)=>Ve(e,"".concat(t,"-").concat(n),s))));case"text":if(s&&i.includes(s)){const e=[],t=i.split(s);let n=t.shift();if(!n)return Ze.createElement("span",{className:"find-kws"},s);for(;"string"===typeof n;)""!==n?e.push(n):e.push(Ze.createElement("span",{className:"find-kws"},s)),n=t.shift(),n&&e.push(Ze.createElement("span",{className:"find-kws"},s));return e}return i;default:return[]}},qe=e=>{let{formattedLogLine:t,message:n,onClose:a}=e;return(0,He.jsx)(Ue.Z,{title:"Log line details",handleClose:a,children:(0,He.jsx)(r.Z,{sx:{display:"flex",flexDirection:"row",gap:4,alignItems:"stretch"},children:(0,He.jsxs)(r.Z,{sx:{width:"100%"},children:[null!==t&&(0,He.jsxs)(Ze.Fragment,{children:[(0,He.jsx)(o.Z,{variant:"h5",sx:{marginBottom:2},children:"Raw log line"}),(0,He.jsx)(r.Z,{sx:e=>({padding:1,bgcolor:"#EEEEEE",borderRadius:1,border:"1px solid ".concat(e.palette.divider),marginBottom:2}),children:(0,He.jsx)(o.Z,{component:"pre",variant:"body2",sx:{whiteSpace:"pre",overflow:"auto",height:"300px"},"data-testid":"raw-log-line",children:t})})]}),(0,He.jsx)(o.Z,{variant:"h5",sx:{marginBottom:2},children:"Formatted message"}),(0,He.jsx)(r.Z,{sx:e=>({padding:1,bgcolor:"#EEEEEE",borderRadius:1,border:"1px solid ".concat(e.palette.divider)}),children:(0,He.jsx)(o.Z,{component:"pre",variant:"body2",sx:{whiteSpace:"pre",overflow:"auto",height:"300px"},"data-testid":"raw-log-line",children:n})})]})})})},Ke=e=>{let{content:t,width:n="100%",height:o,fontSize:a=12,theme:s="light",keywords:l="",language:c="dos",focusLine:u=1,style:d={},listRef:p,onScrollBottom:f,revert:h=!1,startTime:m,endTime:g}=e;const[v,b]=(0,Ze.useState)([]),y=v.length,x=(0,Ze.useRef)(),w=(0,Ze.useRef)(null),_=(0,Ze.useRef)(null);p&&(p.current=_.current);const[S,k]=(0,Ze.useState)(),j=(0,Ze.useCallback)(((e,t)=>{k([e,t])}),[]);return(0,Ze.useEffect)((()=>{const e=t.split("\n");x.current&&clearTimeout(x.current),x.current=setTimeout((()=>{b(e.map(((e,t)=>({i:t,origin:e,time:((null===e||void 0===e?void 0:e.match(Ge))||[""])[0]}))).filter((e=>{let t=e.origin.includes(l);return e.time&&m&&!i()(e.time).isAfter(i()(m))&&(t=!1),e.time&&g&&!i()(e.time).isBefore(i()(g))&&(t=!1),t})).map((e=>({...e}))))}),500)}),[t,l,c,m,g]),(0,Ze.useEffect)((()=>{var e;w.current&&(null===(e=w.current)||void 0===e||e.scrollTo((u-1)*(a+6)))}),[u,a]),(0,Ze.useEffect)((()=>{let e=null;if(_.current){const t=t=>{const{target:n}=t;n&&n.scrollTop+n.clientHeight===n.scrollHeight&&f&&f(t),e=_.current};return _.current.addEventListener("scroll",t),()=>{e&&e.removeEventListener("scroll",t)}}}),[f]),(0,He.jsxs)("div",{children:[v&&v.length>We.Sp&&(0,He.jsxs)(r.Z,{component:"p",sx:{color:e=>e.palette.error.main},children:["[Truncation warning] This log has been truncated and only the latest"," ",We.Sp,' lines are displayed. Click "Download" button above to see the full log']}),(0,He.jsx)(Be,{height:o||600,width:n,ref:w,outerRef:_,className:"hljs-".concat(s),style:{fontSize:a,fontFamily:"menlo, monospace",...d},itemSize:a+6,itemCount:y,children:e=>{let{index:t,style:n}=e;const{i:o,origin:a}=v[h?v.length-1-t:t];let i=a,s=null;try{const e=JSON.parse(a);e.message&&(i=e.message,e.levelname&&(i="".concat(e.levelname," ").concat(i)),e.asctime&&(i="".concat(e.asctime,"\t").concat(i))),s=JSON.stringify(e,null,2)}catch(u){}return(0,He.jsxs)(r.Z,{style:n,sx:{overflowX:"visible",whiteSpace:"nowrap","&::before":{content:'"'.concat(o+1,'"'),marginRight:.5,width:6*"".concat(v.length).length+4,color:"#999",display:"inline-block"}},onClick:()=>{var e,t;0===(null!==(e=null===(t=window.getSelection())||void 0===t?void 0:t.toString().length)&&void 0!==e?e:0)&&j(s,i)},children:[je.highlight(c,i).children.map((e=>Ve(e,t.toString(),l))),(0,He.jsx)("br",{})]},"".concat(t,"list"))}}),S&&(0,He.jsx)(qe,{formattedLogLine:S[0],message:S[1],onClose:()=>{k(void 0)}})]})}},348:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(697),o=(n(2791),n(184));const a=e=>{const{num:t,total:n}=e,a=Math.round(t/n*100);return(0,o.jsxs)(r.Z,{sx:{background:"linear-gradient(45deg, #21CBF3ee 30%, #2196F3ee 90%)",border:"1px solid #ffffffbb",padding:"0 12px",height:18,lineHeight:"18px",position:"relative",boxSizing:"content-box",borderRadius:"4px",flexGrow:1},children:[(0,o.jsx)(r.Z,{sx:e=>({background:e.palette.background.paper,position:"absolute",right:0,height:18,transition:"0.5s width",borderRadius:"2px",borderTopLeftRadius:0,borderBottomLeftRadius:0,border:"2px solid transparent",boxSizing:"border-box",width:"".concat(Math.min(Math.max(0,100-a),100),"%")})}),(0,o.jsx)(r.Z,{sx:e=>({fontSize:12,zIndex:2,position:"relative",color:e.palette.text.primary,width:"100%",textAlign:"center",whiteSpace:"nowrap"}),children:e.children})]})}},4231:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>C,ul:()=>N,y6:()=>I});var r=n(9907),o=n(9431),a=n(3466),i=n(4387),s=n(5699),l=n(697),c=n(890),u=n(3366),d=n(7462),p=n(2791),f=n(9278),h=n(4419),m=n(4402),g=n(6934),v=n(1402),b=n(133),y=n(184);const x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],w=(0,g.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((e=>{let{theme:t,ownerState:n}=e;return(0,d.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,m.Fq)(t.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})}),(e=>{let{ownerState:t}=e;return(0,d.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,d.Z)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider)}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,d.Z)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider)}})}),(e=>{let{ownerState:t}=e;return(0,d.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})})),_=(0,g.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((e=>{let{theme:t,ownerState:n}=e;return(0,d.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})})),S=p.forwardRef((function(e,t){const n=(0,v.Z)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:a,component:i=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:p=("hr"!==i?"separator":void 0),textAlign:m="center",variant:g="fullWidth"}=n,S=(0,u.Z)(n,x),k=(0,d.Z)({},n,{absolute:r,component:i,flexItem:s,light:l,orientation:c,role:p,textAlign:m,variant:g}),j=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:a,orientation:i,textAlign:s,variant:l}=e,c={root:["root",t&&"absolute",l,a&&"light","vertical"===i&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===i&&"withChildrenVertical","right"===s&&"vertical"!==i&&"textAlignRight","left"===s&&"vertical"!==i&&"textAlignLeft"],wrapper:["wrapper","vertical"===i&&"wrapperVertical"]};return(0,h.Z)(c,b.V,r)})(k);return(0,y.jsx)(w,(0,d.Z)({as:i,className:(0,f.Z)(j.root,a),role:p,ref:t,ownerState:k},S,{children:o?(0,y.jsx)(_,{className:j.wrapper,ownerState:k,children:o}):null}))}));S.muiSkipListHighlight=!0;const k=S;var j=n(8260);const Z=e=>{try{const t=new Date,n=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"shortOffset"}),r=n.format(t).match(/GMT([+-]\d{1,2}(?::\d{2})?)?/);return r?r[0]:""}catch(t){return console.warn("Error getting UTC offset for ".concat(e,":"),t),""}},E=[{value:"Etc/GMT+12",group:"Pacific",country:"International Date Line West"},{value:"Pacific/Pago_Pago",group:"Pacific",country:"American Samoa"},{value:"Pacific/Midway",group:"Pacific",country:"Midway Island"},{value:"Pacific/Honolulu",group:"Pacific",country:"Hawaii"},{value:"America/Anchorage",group:"America",country:"Alaska"},{value:"America/Los_Angeles",group:"America",country:"Pacific Time (US & Canada)"},{value:"America/Tijuana",group:"America",country:"Tijuana"},{value:"America/Phoenix",group:"America",country:"Arizona"},{value:"America/Mazatlan",group:"America",country:"Mazatlan"},{value:"America/Denver",group:"America",country:"Mountain Time (US & Canada)"},{value:"America/Guatemala",group:"America",country:"Central America"},{value:"America/Chicago",group:"America",country:"Central Time (US & Canada)"},{value:"America/Chihuahua",group:"America",country:"Chihuahua"},{value:"America/Mexico_City",group:"America",country:"Mexico City"},{value:"America/Monterrey",group:"America",country:"Monterrey"},{value:"America/Regina",group:"America",country:"Saskatchewan"},{value:"America/Bogota",group:"America",country:"Bogota"},{value:"America/New_York",group:"America",country:"Eastern Time (US & Canada)"},{value:"America/Indiana/Indianapolis",group:"America",country:"Indiana (East)"},{value:"America/Lima",group:"America",country:"Lima"},{value:"America/Guayaquil",group:"America",country:"Quito"},{value:"America/Halifax",group:"America",country:"Atlantic Time (Canada)"},{value:"America/Caracas",group:"America",country:"Caracas"},{value:"America/Guyana",group:"America",country:"Georgetown"},{value:"America/La_Paz",group:"America",country:"La Paz"},{value:"America/Puerto_Rico",group:"America",country:"Puerto Rico"},{value:"America/Santiago",group:"America",country:"Santiago"},{value:"America/St_Johns",group:"America",country:"Newfoundland"},{value:"America/Sao_Paulo",group:"America",country:"Brasilia"},{value:"America/Argentina/Buenos_Aires",group:"America",country:"Buenos Aires"},{value:"America/Montevideo",group:"America",country:"Montevideo"},{value:"America/Godthab",group:"America",country:"Greenland"},{value:"Etc/GMT+2",group:"Atlantic",country:"Mid-Atlantic"},{value:"Atlantic/Azores",group:"Atlantic",country:"Azores"},{value:"Atlantic/Cape_Verde",group:"Atlantic",country:"Cape Verde Is."},{value:"Europe/London",group:"Europe",country:"Edinburgh"},{value:"Europe/Lisbon",group:"Europe",country:"Lisbon"},{value:"Europe/London",group:"Europe",country:"London"},{value:"Africa/Monrovia",group:"Africa",country:"Monrovia"},{value:"Europe/Amsterdam",group:"Europe",country:"Amsterdam"},{value:"Europe/Belgrade",group:"Europe",country:"Belgrade"},{value:"Europe/Berlin",group:"Europe",country:"Berlin"},{value:"Europe/Brussels",group:"Europe",country:"Brussels"},{value:"Europe/Budapest",group:"Europe",country:"Budapest"},{value:"Europe/Copenhagen",group:"Europe",country:"Copenhagen"},{value:"Europe/Madrid",group:"Europe",country:"Madrid"},{value:"Europe/Paris",group:"Europe",country:"Paris"},{value:"Europe/Prague",group:"Europe",country:"Prague"},{value:"Europe/Rome",group:"Europe",country:"Rome"},{value:"Europe/Sarajevo",group:"Europe",country:"Sarajevo"},{value:"Europe/Stockholm",group:"Europe",country:"Stockholm"},{value:"Europe/Vienna",group:"Europe",country:"Vienna"},{value:"Europe/Warsaw",group:"Europe",country:"Warsaw"},{value:"Africa/Lagos",group:"Africa",country:"West Central Africa"},{value:"Asia/Amman",group:"Asia",country:"Amman"},{value:"Europe/Athens",group:"Europe",country:"Athens"},{value:"Asia/Beirut",group:"Asia",country:"Beirut"},{value:"Europe/Bucharest",group:"Europe",country:"Bucharest"},{value:"Africa/Cairo",group:"Africa",country:"Cairo"},{value:"Africa/Harare",group:"Africa",country:"Harare"},{value:"Europe/Helsinki",group:"Europe",country:"Helsinki"},{value:"Europe/Istanbul",group:"Europe",country:"Istanbul"},{value:"Asia/Jerusalem",group:"Asia",country:"Jerusalem"},{value:"Europe/Kiev",group:"Europe",country:"Kyiv"},{value:"Europe/Minsk",group:"Europe",country:"Minsk"},{value:"Europe/Riga",group:"Europe",country:"Riga"},{value:"Europe/Sofia",group:"Europe",country:"Sofia"},{value:"Europe/Tallinn",group:"Europe",country:"Tallinn"},{value:"Europe/Vilnius",group:"Europe",country:"Vilnius"},{value:"Asia/Baghdad",group:"Asia",country:"Baghdad"},{value:"Asia/Kuwait",group:"Asia",country:"Kuwait"},{value:"Europe/Moscow",group:"Europe",country:"Moscow"},{value:"Africa/Nairobi",group:"Africa",country:"Nairobi"},{value:"Asia/Riyadh",group:"Asia",country:"Riyadh"},{value:"Asia/Tehran",group:"Asia",country:"Tehran"},{value:"Asia/Dubai",group:"Asia",country:"Abu Dhabi"},{value:"Asia/Baku",group:"Asia",country:"Baku"},{value:"Asia/Muscat",group:"Asia",country:"Muscat"},{value:"Asia/Tbilisi",group:"Asia",country:"Tbilisi"},{value:"Asia/Yerevan",group:"Asia",country:"Yerevan"},{value:"Asia/Kabul",group:"Asia",country:"Kabul"},{value:"Asia/Karachi",group:"Asia",country:"Islamabad"},{value:"Asia/Tashkent",group:"Asia",country:"Tashkent"},{value:"Asia/Kolkata",group:"Asia",country:"Chennai"},{value:"Asia/Kolkata",group:"Asia",country:"Kolkata"},{value:"Asia/Kolkata",group:"Asia",country:"Mumbai"},{value:"Asia/Kolkata",group:"Asia",country:"New Delhi"},{value:"Asia/Kathmandu",group:"Asia",country:"Kathmandu"},{value:"Asia/Almaty",group:"Asia",country:"Almaty"},{value:"Asia/Dhaka",group:"Asia",country:"Dhaka"},{value:"Asia/Yekaterinburg",group:"Asia",country:"Yekaterinburg"},{value:"Asia/Yangon",group:"Asia",country:"Yangon (Rangoon)"},{value:"Asia/Bangkok",group:"Asia",country:"Bangkok"},{value:"Asia/Jakarta",group:"Asia",country:"Jakarta"},{value:"Asia/Novosibirsk",group:"Asia",country:"Novosibirsk"},{value:"Asia/Shanghai",group:"Asia",country:"Beijing"},{value:"Asia/Chongqing",group:"Asia",country:"Chongqing"},{value:"Asia/Hong_Kong",group:"Asia",country:"Hong Kong"},{value:"Asia/Krasnoyarsk",group:"Asia",country:"Krasnoyarsk"},{value:"Asia/Kuala_Lumpur",group:"Asia",country:"Kuala Lumpur"},{value:"Australia/Perth",group:"Australia",country:"Perth"},{value:"Asia/Singapore",group:"Asia",country:"Singapore"},{value:"Asia/Taipei",group:"Asia",country:"Taipei"},{value:"Asia/Ulaanbaatar",group:"Asia",country:"Ulaan Bataar"},{value:"Asia/Urumqi",group:"Asia",country:"Urumqi"},{value:"Asia/Irkutsk",group:"Asia",country:"Irkutsk"},{value:"Asia/Tokyo",group:"Asia",country:"Osaka"},{value:"Asia/Tokyo",group:"Asia",country:"Sapporo"},{value:"Asia/Seoul",group:"Asia",country:"Seoul"},{value:"Asia/Tokyo",group:"Asia",country:"Tokyo"},{value:"Australia/Adelaide",group:"Australia",country:"Adelaide"},{value:"Australia/Darwin",group:"Australia",country:"Darwin"},{value:"Australia/Brisbane",group:"Australia",country:"Brisbane"},{value:"Australia/Sydney",group:"Australia",country:"Canberra"},{value:"Pacific/Guam",group:"Pacific",country:"Guam"},{value:"Australia/Hobart",group:"Australia",country:"Hobart"},{value:"Australia/Melbourne",group:"Australia",country:"Melbourne"},{value:"Pacific/Port_Moresby",group:"Pacific",country:"Port Moresby"},{value:"Australia/Sydney",group:"Australia",country:"Sydney"},{value:"Asia/Magadan",group:"Asia",country:"Magadan"},{value:"Pacific/Noumea",group:"Pacific",country:"New Caledonia"},{value:"Pacific/Guadalcanal",group:"Pacific",country:"Solomon Is."},{value:"Pacific/Auckland",group:"Pacific",country:"Auckland"},{value:"Pacific/Fiji",group:"Pacific",country:"Fiji"},{value:"Asia/Kamchatka",group:"Asia",country:"Kamchatka"},{value:"Pacific/Majuro",group:"Pacific",country:"Marshall Is."},{value:"Pacific/Auckland",group:"Pacific",country:"Wellington"},{value:"Pacific/Tongatapu",group:"Pacific",country:"Nuku'alofa"},{value:"Pacific/Apia",group:"Pacific",country:"Samoa"},{value:"Pacific/Fakaofo",group:"Pacific",country:"Tokelau Is."}].map((e=>({...e,utc:Z(e.value)}))),C=e=>{let{label:t,onChange:n,defaultValue:i}=e;return(0,y.jsx)(o.Z,{size:"small",label:t,InputProps:{onChange:e=>{let{target:{value:t}}=e;n&&n(t)},defaultValue:i,endAdornment:(0,y.jsx)(a.Z,{position:"end",children:(0,y.jsx)(r.Z,{})})}})},N=e=>{let{label:t,onChange:n,options:r,showAllOption:a,defaultValue:s}=e;return(0,y.jsxs)(o.Z,{size:"small",label:t,select:!0,SelectProps:{onChange:e=>{let{target:{value:t}}=e;n&&n(t)},style:{width:100}},defaultValue:s||"",children:[a?(0,y.jsx)(i.Z,{value:"",children:"All"}):null,r.map((e=>"string"===typeof e?(0,y.jsx)(i.Z,{value:e,children:e},e):(0,y.jsx)(i.Z,{value:e[0],children:e[1]},e[0])))]})},I=e=>{var t,n,r;let{serverTimeZone:a,currentTimeZone:i}=e;const[u,d]=(0,p.useState)("");(0,p.useEffect)((()=>{void 0!==i&&((0,j.Ql)(i),d(i))}),[i]);const f=E.map((e=>e)).sort(((e,t)=>e.group.localeCompare(t.group)));f.unshift({value:"Etc/UTC",utc:"GMT+00:00",group:"System",country:"Coordinated Universal Time"});const h=Intl.DateTimeFormat().resolvedOptions().timeZone,m=null===(t=E.find((e=>e.value===h)))||void 0===t?void 0:t.utc;m&&f.unshift({value:h,utc:m,group:"System",country:"Browser Time"});const g=(null===a||void 0===a?void 0:a.value)&&(null===(n=E.find((e=>e.value===a.value)))||void 0===n?void 0:n.utc);g&&f.unshift({value:a.value,utc:g,group:"System",country:"Dashboard Server Timezone"});const v=null===(r=E.find((e=>e.value===u)))||void 0===r?void 0:r.utc;return(0,y.jsx)(s.Z,{size:"small",onChange:(e,t)=>{var n;t&&(n=t.value,localStorage.setItem("timezone",n),window.location.reload())},options:f,getOptionLabel:e=>e.value,groupBy:e=>e.group,filterOptions:(e,t)=>{let{inputValue:n}=t;return e.filter((e=>e.value.includes(n)||e.utc.includes(n)||e.country.toLowerCase().includes(n.toLowerCase())||e.group.toLowerCase().includes(n.toLowerCase())))},renderOption:(e,t)=>(0,y.jsxs)(l.Z,{component:"li",...e,sx:{display:"flex",justifyContent:"space-between"},children:[(0,y.jsx)(c.Z,{component:"span",sx:{marginRight:1},children:t.country}),(0,y.jsx)(c.Z,{sx:{color:"#8C9196"},component:"span",children:t.value}),(0,y.jsx)(l.Z,{sx:{flexGrow:1}}),(0,y.jsx)(c.Z,{component:"span",sx:{marginLeft:1},children:t.utc})]}),renderInput:e=>(0,y.jsx)(o.Z,{...e,sx:{width:120,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#D2DCE6"}},placeholder:v}),renderGroup:e=>(0,y.jsxs)("li",{children:[(0,y.jsx)(c.Z,{sx:{color:"#5F6469",paddingX:2,paddingY:"6px"},children:e.group}),(0,y.jsx)(l.Z,{component:"ul",sx:{padding:0},children:e.children}),(0,y.jsx)(k,{sx:{marginX:2,marginY:1}})]}),slotProps:{paper:{style:{width:"400px"}},popper:{placement:"bottom-end",style:{width:"fit-content"}}}})}},1434:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(1889),o=(n(2791),n(6535)),a=n(184);const i=e=>{let{type:t,list:n}=e;const i={};return n.forEach((e=>{let{state:t}=e;i[t]=i[t]+1||1})),(0,a.jsxs)(r.ZP,{container:!0,spacing:2,alignItems:"center",children:[(0,a.jsx)(r.ZP,{item:!0,children:(0,a.jsx)(o.b,{status:"TOTAL",type:t,suffix:" x ".concat(n.length)})}),Object.entries(i).map((e=>{let[n,i]=e;return(0,a.jsx)(r.ZP,{item:!0,children:(0,a.jsx)(o.b,{status:n,type:t,suffix:" x ".concat(i)})},n)}))]})}},6535:(e,t,n)=>{"use strict";n.d(t,{b:()=>y});var r=n(697),o=n(7),a=n(2460),i=n(427),s=n(3771);const l={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"};n(2791);var c=n(2948),u=n(1826),d=n(7027);let p;!function(e){e.PENDING="PENDING",e.CREATED="CREATED",e.REMOVED="REMOVED",e.RESCHEDULING="RESCHEDULING"}(p||(p={}));var f=n(4602),h=n(184);const m="#DB6D00",g="#5F6469",v={node:{ALIVE:o.Z,DEAD:g},worker:{ALIVE:o.Z,DEAD:g},actor:{[u.b.ALIVE]:o.Z,[u.b.DEAD]:g,[u.b.DEPENDENCIES_UNREADY]:m,[u.b.PENDING_CREATION]:m,[u.b.RESTARTING]:m},task:{[c.hY.FAILED]:a.Z,[c.hY.FINISHED]:o.Z,[c.hY.RUNNING]:i.Z,[c.hY.SUBMITTED_TO_WORKER]:m,[c.hY.PENDING_NODE_ASSIGNMENT]:m,[c.hY.PENDING_ARGS_AVAIL]:m,[c.hY.UNKNOWN]:g},job:{[d.B.PENDING]:m,[d.B.RUNNING]:i.Z,[d.B.STOPPED]:g,[d.B.SUCCEEDED]:o.Z,[d.B.FAILED]:a.Z},placementGroup:{[p.PENDING]:m,[p.CREATED]:o.Z,[p.REMOVED]:g,[p.RESCHEDULING]:m},serveApplication:{[f.z5.NOT_STARTED]:g,[f.z5.DEPLOYING]:m,[f.z5.RUNNING]:o.Z,[f.z5.DEPLOY_FAILED]:a.Z,[f.z5.DELETING]:m,[f.z5.UNHEALTHY]:a.Z},serveDeployment:{[f.QZ.UPDATING]:m,[f.QZ.HEALTHY]:o.Z,[f.QZ.UNHEALTHY]:a.Z},serveReplica:{[f.V0.STARTING]:m,[f.V0.UPDATING]:m,[f.V0.RECOVERING]:m,[f.V0.RUNNING]:o.Z,[f.V0.STOPPING]:a.Z},serveProxy:{[f.MA.HEALTHY]:o.Z,[f.MA.UNHEALTHY]:a.Z,[f.MA.STARTING]:m,[f.MA.DRAINING]:s.Z},serveController:{[f.MA.HEALTHY]:o.Z,[f.MA.UNHEALTHY]:a.Z,[f.MA.STARTING]:m}},b={deps:i.Z,INFO:l,ERROR:a.Z},y=e=>{let{type:t,status:n,suffix:o,icon:a}=e,i=s.Z;b[t]?i=b[t]:"string"===typeof n&&v[t]&&v[t][n]&&(i=v[t][n]);const l="string"===typeof i?i:i[500],c={};return c.color=l,c.borderColor=l,i!==s.Z&&(c.backgroundColor="".concat(l,"20")),(0,h.jsxs)(r.Z,{component:"span",sx:{padding:"2px 8px",border:"solid 1px",borderRadius:"4px",fontSize:12,display:"inline-flex",alignItems:"center"},style:c,children:[a,(0,h.jsx)(r.Z,{component:"span",sx:void 0!==a?{marginLeft:"4px"}:{},children:n}),(0,h.jsx)(r.Z,{sx:{marginLeft:.5},children:o})]})}},359:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5527),o=n(697),a=(n(2791),n(184));const i=e=>{let{title:t,children:n}=e;return(0,a.jsxs)(r.Z,{sx:{padding:2,paddingTop:1.5,marginX:1,marginY:2},elevation:0,children:[t&&(0,a.jsx)(o.Z,{sx:e=>({fontSize:e.typography.fontSize+2,fontWeight:500,color:e.palette.text.secondary,marginBottom:1}),children:t}),(0,a.jsx)(o.Z,{children:n})]})}},5282:(e,t,n)=>{"use strict";n.d(t,{b:()=>s,m:()=>i});var r=n(5857),o=n(68),a=(n(2791),n(184));const i=e=>(0,a.jsx)(o.Z,{componentsProps:{tooltip:{sx:e=>({backgroundColor:e.palette.background.paper,border:"1px solid #dadde9",color:e.palette.text.primary,padding:1})}},...e}),s=e=>{let{children:t,className:n,sx:o}=e;return(0,a.jsx)(i,{className:n,title:t,children:(0,a.jsx)(r.Z,{fontSize:"small",sx:[{color:e=>e.palette.grey[500]},...Array.isArray(o)?o:[o]]})})}},4700:(e,t,n)=>{"use strict";n.d(t,{V:()=>C,Z:()=>I});var r=n(6189),o=n(184);const a=(0,r.Z)((0,o.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),i=(0,r.Z)((0,o.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight");var s=n(5855),l=n(3994),c=n(3400),u=n(9281),d=n(4518),p=n(9836),f=n(6890),h=n(3382),m=n(68),g=n(697),v=n(1889),b=n(2791),y=n(1087),x=n(7262),w=n(8260),_=n(1426);const S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:28;return(0,o.jsx)(m.Z,{title:e,children:(0,o.jsx)("span",{children:e.length>t?e.slice(0,t)+"...":e})})};var k=n(8683),j=n(4502),Z=n(348),E=n(4231);const C=e=>{let{children:t,expandComponent:n,length:r,stateKey:u="",...d}=e;const[p,f]=b.useState(!1);return(0,b.useEffect)((()=>{u.startsWith("ON")?f(!0):u.startsWith("OFF")&&f(!1)}),[u]),r<1?(0,o.jsxs)(s.Z,{...d,children:[(0,o.jsx)(l.Z,{padding:"checkbox"}),t]}):(0,o.jsxs)(b.Fragment,{children:[(0,o.jsxs)(s.Z,{...d,children:[(0,o.jsx)(l.Z,{padding:"checkbox",children:(0,o.jsxs)(c.Z,{style:{color:"inherit"},onClick:()=>f(!p),size:"large",children:[r,p?(0,o.jsx)(a,{}):(0,o.jsx)(i,{})]})}),t]}),p&&(0,o.jsx)(s.Z,{children:(0,o.jsx)(l.Z,{colSpan:24,children:n})})]})},N=e=>{let{actorMap:t,coreWorkerStats:n}=e;const r={};return(n||[]).filter((e=>t[e.actorId])).forEach((e=>{t[e.actorId]&&(r[e.actorId]={...t[e.actorId],workerId:e.workerId||"N/A"})})),Object.values(r).length?(0,o.jsx)(u.Z,{children:(0,o.jsx)(j.Z,{actors:r,detailPathPrefix:"/actors"})}):(0,o.jsx)("p",{children:"The Worker Haven't Had Related Actor Yet."})},I=e=>{let{workers:t=[],actorMap:n,mini:r}=e;const{changeFilter:a,filterFunc:i}=(0,k.L)(),[c,u]=(0,b.useState)(""),{nodeMapByIp:j}=(0,b.useContext)(x.k);return(0,o.jsxs)(b.Fragment,{children:[!r&&(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,o.jsx)(E.Mj,{label:"Pid",onChange:e=>a("pid",e)}),(0,o.jsx)(E.Mj,{label:"Worker ID",onChange:e=>a("coreWorkerStats.0.workerId",e)}),(0,o.jsx)(d.Z,{onClick:()=>u("ON".concat(Math.random())),children:"Expand All"}),(0,o.jsx)(d.Z,{onClick:()=>u("OFF".concat(Math.random())),children:"Collapse All"})]})," ",(0,o.jsxs)(p.Z,{children:[(0,o.jsx)(f.Z,{children:(0,o.jsx)(s.Z,{children:["","Pid","Worker ID","CPU","CPU Times","Memory","CMD Line","Create Time","Log","Ops","IP","Tasks","Objects"].map((e=>(0,o.jsx)(l.Z,{align:"center",children:e},e)))})}),(0,o.jsx)(h.Z,{children:t.filter(i).sort(((e,t)=>{const r=(e.coreWorkerStats||[]).filter((e=>n[e.actorId])).length||0;return((t.coreWorkerStats||[]).filter((e=>n[e.actorId])).length||0)-r})).map((e=>{var t,r,a,i,s,u,p,f,h,b,x;let{pid:k,cpuPercent:E,cpuTimes:I,memoryInfo:A,cmdline:P,createTime:O,coreWorkerStats:T=[],language:R}=e;return(0,o.jsxs)(C,{expandComponent:(0,o.jsx)(N,{actorMap:n,coreWorkerStats:T}),length:(T||[]).filter((e=>n[e.actorId])).length,stateKey:c,children:[(0,o.jsx)(l.Z,{align:"center",children:k}),(0,o.jsx)(l.Z,{align:"center",children:null!==(t=T[0])&&void 0!==t&&t.workerId?(0,o.jsx)(m.Z,{title:T[0].workerId,arrow:!0,children:(0,o.jsx)(g.Z,{sx:{maxWidth:"120px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:T[0].workerId})}):"N/A"}),(0,o.jsx)(l.Z,{align:"center",children:(0,o.jsxs)(Z.Z,{num:Number(E),total:100,children:[E,"%"]})}),(0,o.jsx)(l.Z,{align:"center",children:(0,o.jsx)("div",{style:{maxHeight:55,overflow:"auto"},children:Object.entries(I||{}).map((e=>{let[t,n]=e;return(0,o.jsxs)("div",{style:{margin:4},children:[t,":",n,"%"]})}))})}),(0,o.jsx)(l.Z,{align:"center",children:(0,o.jsx)("div",{style:{maxHeight:55,overflow:"auto"},children:Object.entries(A||{}).map((e=>{let[t,n]=e;return(0,o.jsxs)("div",{style:{margin:4},children:[t,":",(0,_.r)(n)]})}))})}),(0,o.jsx)(l.Z,{align:"center",style:{lineBreak:"anywhere"},children:P&&S(P.filter((e=>e)).join(" "))}),(0,o.jsx)(l.Z,{align:"center",children:(0,w.M9)(1e3*O)}),(0,o.jsx)(l.Z,{align:"center",children:(0,o.jsx)(v.ZP,{container:!0,spacing:2,children:T[0]&&(0,o.jsx)(v.ZP,{item:!0,children:(0,o.jsx)(y.rU,{target:"_blank",to:"/logs/?nodeId=".concat(encodeURIComponent(j[T[0].ipAddress]),"&fileName=").concat(T[0].jobId||"","-").concat(k),children:"Log"})})})}),(0,o.jsx)(l.Z,{align:"center",children:"JAVA"===R?(0,o.jsxs)("div",{children:[(0,o.jsx)(d.Z,{onClick:()=>{var e;window.open("#/cmd/jstack/".concat(null===(e=T[0])||void 0===e?void 0:e.ipAddress,"/").concat(k))},children:"jstack"})," ",(0,o.jsx)(d.Z,{onClick:()=>{var e;window.open("#/cmd/jmap/".concat(null===(e=T[0])||void 0===e?void 0:e.ipAddress,"/").concat(k))},children:"jmap"}),(0,o.jsx)(d.Z,{onClick:()=>{var e;window.open("#/cmd/jstat/".concat(null===(e=T[0])||void 0===e?void 0:e.ipAddress,"/").concat(k))},children:"jstat"})]}):"N/A"}),(0,o.jsx)(l.Z,{align:"center",children:j[null===(r=T[0])||void 0===r?void 0:r.ipAddress]?(0,o.jsx)(y.rU,{target:"_blank",to:"/cluster/nodes/".concat(j[null===(a=T[0])||void 0===a?void 0:a.ipAddress]),children:null===(i=T[0])||void 0===i?void 0:i.ipAddress}):null===(s=T[0])||void 0===s?void 0:s.ipAddress}),(0,o.jsxs)(l.Z,{align:"center",children:[(0,o.jsxs)("div",{children:["Pending tasks: ",null===(u=T[0])||void 0===u?void 0:u.numPendingTasks]}),(0,o.jsxs)("div",{children:["Executed tasks: ",null===(p=T[0])||void 0===p?void 0:p.numExecutedTasks]})]}),(0,o.jsxs)(l.Z,{align:"center",children:[(0,o.jsxs)("div",{children:["ObjectRefs in scope:"," ",null===(f=T[0])||void 0===f?void 0:f.numObjectRefsInScope]}),(0,o.jsxs)("div",{children:["Objects in local memory store:"," ",null===(h=T[0])||void 0===h?void 0:h.numLocalObjects]}),(0,o.jsxs)("div",{children:["Objects in plasma store: ",null===(b=T[0])||void 0===b?void 0:b.numInPlasma]}),(0,o.jsxs)("div",{children:["Object store Memory used (MiB):"," ",null===(x=T[0])||void 0===x?void 0:x.usedObjectStoreMemory]})]})]},k)}))})]})]})}},9903:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});n(2791);var r=n(4502),o=n(4887),a=n(6689),i=n(2374);var s=n(184);const l=e=>{let{jobId:t=null,detailPathPrefix:n="",...l}=e;const c=(()=>{const{data:e}=(0,o.ZP)("useActorList",(async()=>{var e,t;const n=await(0,i.b)();return null!==n&&void 0!==n&&null!==(e=n.data)&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&t.actors?n.data.data.actors:{}}),{refreshInterval:a.G});return e})(),u=c||{};return(0,s.jsx)("div",{children:(0,s.jsx)(r.Z,{actors:u,jobId:t,detailPathPrefix:n,...l})})}},2948:(e,t,n)=>{"use strict";n.d(t,{hY:()=>c,T:()=>f,$8:()=>b});n(763);var r=n(2791),o=n(4887),a=n(6689),i=(n(7630),n(6566));let s,l,c;!function(e){e.NIL="NIL",e.PENDING_ARGS_AVAIL="PENDING_ARGS_AVAIL",e.PENDING_NODE_ASSIGNMENT="PENDING_NODE_ASSIGNMENT",e.PENDING_OBJ_STORE_MEM_AVAIL="PENDING_OBJ_STORE_MEM_AVAIL",e.PENDING_ARGS_FETCH="PENDING_ARGS_FETCH",e.SUBMITTED_TO_WORKER="SUBMITTED_TO_WORKER",e.PENDING_ACTOR_TASK_ARGS_FETCH="PENDING_ACTOR_TASK_ARGS_FETCH",e.PENDING_ACTOR_TASK_ORDERING_OR_CONCURRENCY="PENDING_ACTOR_TASK_ORDERING_OR_CONCURRENCY",e.RUNNING="RUNNING",e.RUNNING_IN_RAY_GET="RUNNING_IN_RAY_GET",e.RUNNING_IN_RAY_WAIT="RUNNING_IN_RAY_WAIT",e.FINISHED="FINISHED",e.FAILED="FAILED"}(s||(s={})),function(e){e.NORMAL_TASK="NORMAL_TASK",e.ACTOR_CREATION_TASK="ACTOR_CREATION_TASK",e.ACTOR_TASK="ACTOR_TASK",e.DRIVER_TASK="DRIVER_TASK"}(l||(l={})),function(e){e.PENDING_ARGS_AVAIL="PENDING_ARGS_AVAIL",e.PENDING_NODE_ASSIGNMENT="PENDING_NODE_ASSIGNMENT",e.SUBMITTED_TO_WORKER="SUBMITTED_TO_WORKER",e.RUNNING="RUNNING",e.FINISHED="FINISHED",e.FAILED="FAILED",e.UNKNOWN="UNKNOWN"}(c||(c={}));const u={[s.PENDING_ARGS_AVAIL]:c.PENDING_ARGS_AVAIL,[s.PENDING_NODE_ASSIGNMENT]:c.PENDING_NODE_ASSIGNMENT,[s.PENDING_OBJ_STORE_MEM_AVAIL]:c.PENDING_NODE_ASSIGNMENT,[s.PENDING_ARGS_FETCH]:c.PENDING_NODE_ASSIGNMENT,[s.SUBMITTED_TO_WORKER]:c.SUBMITTED_TO_WORKER,[s.PENDING_ACTOR_TASK_ARGS_FETCH]:c.SUBMITTED_TO_WORKER,[s.PENDING_ACTOR_TASK_ORDERING_OR_CONCURRENCY]:c.SUBMITTED_TO_WORKER,[s.RUNNING]:c.RUNNING,[s.RUNNING_IN_RAY_GET]:c.RUNNING,[s.RUNNING_IN_RAY_WAIT]:c.RUNNING,[s.FINISHED]:c.FINISHED,[s.FAILED]:c.FAILED,[s.NIL]:c.UNKNOWN},d={[c.PENDING_ARGS_AVAIL]:"numPendingArgsAvail",[c.PENDING_NODE_ASSIGNMENT]:"numPendingNodeAssignment",[c.SUBMITTED_TO_WORKER]:"numSubmittedToWorker",[c.RUNNING]:"numRunning",[c.FINISHED]:"numFinished",[c.FAILED]:"numFailed",[c.UNKNOWN]:"numUnknown"},p=(e,t,n,r,s,l,c)=>(0,o.ZP)(e?["useJobProgressByTaskName",e]:null,(async e=>{let[t,o]=e;const a=await(0,i.s1)(o);if(n(a.data.msg),a.data.result){null===c||void 0===c||c((new Date).getTime());return{summary:m(a.data.data.result.result),totalTasks:a.data.data.result.num_filtered}}r(!0),s(!1)}),{refreshInterval:t&&!l?a.Q:0,revalidateOnFocus:!1}),f=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const[o,a]=(0,r.useState)("Loading progress..."),[i,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)(!0),[u,d]=(0,r.useState)(0),{data:f,isLoading:h}=p(e,l,a,s,c,n,d),m=(null!==(t=null===f||void 0===f?void 0:f.summary)&&void 0!==t?t:[]).reduce(((e,t)=>(Object.entries(t.progress).forEach((t=>{var n;let[r,o]=t;const a=r;e[a]=(null!==(n=e[a])&&void 0!==n?n:0)+o})),e)),{}),g=!!e;return{progress:m,totalTasks:null===f||void 0===f?void 0:f.totalTasks,isLoading:h,msg:o,error:i,driverExists:g,latestFetchTimestamp:u}},h=e=>{const t={};return Object.entries(e).forEach((e=>{var n,r;let[o,a]=e;const i=null!==(n=d[u[o]])&&void 0!==n?n:"numUnknown";t[i]=(null!==(r=t[i])&&void 0!==r?r:0)+a})),t},m=e=>{const t=e.node_id_to_summary.cluster.summary;return Object.entries(t).map((e=>{let[t,n]=e;return{name:t,progress:h(n.state_counts)}}))},g=function(e){var t;let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=h(e.state_counts),o=Object.values(r).reduce(((e,t)=>e+t),0);if(n||o-(null!==(t=r.numFinished)&&void 0!==t?t:0)!==0)return{name:e.name,key:e.key,progress:r,children:e.children.map((e=>g(e,n))).filter((e=>void 0!==e)),type:e.type,link:e.link}},v=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.node_id_to_summary.cluster.summary,r=n.map((e=>g(e,t))).filter((e=>void 0!==e)),o=n.reduce(((e,t)=>{const n=h(t.state_counts);return Object.entries(n).forEach((t=>{var n;let[r,o]=t;const a=r;e[a]=(null!==(n=e[a])&&void 0!==n?n:0)+o})),e}),{});return{progressGroups:r,total:o}},b=function(e){var t,n;let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const[c,u]=(0,r.useState)("Loading progress..."),[d,p]=(0,r.useState)(!1),[f,h]=(0,r.useState)(!0),[m,g]=(0,r.useState)(0),{data:b,isLoading:y}=(0,o.ZP)(e?["useJobProgressByLineageAndName",e,l]:null,(async e=>{let[t,n,r]=e;const o=await(0,i.Hz)(n);if(u(o.data.msg),o.data.result){g((new Date).getTime());return{summary:v(o.data.data.result.result,r),totalTasks:o.data.data.result.num_filtered}}p(!0),h(!1)}),{refreshInterval:f&&!s?a.Q:0,revalidateOnFocus:!1});return{progressGroups:null===b||void 0===b||null===(t=b.summary)||void 0===t?void 0:t.progressGroups,total:null===b||void 0===b||null===(n=b.summary)||void 0===n?void 0:n.total,totalTasks:null===b||void 0===b?void 0:b.totalTasks,isLoading:y,msg:c,error:d,latestFetchTimestamp:m}}},5529:(e,t,n)=>{"use strict";n.d(t,{LC:()=>u,HH:()=>d,wz:()=>p});var r=n(68),o=n(697),a=n(890),i=(n(2791),n(1685)),s=n(184);const l=e=>{let{percent:t,text:n}=e;const r=Math.max(Math.min(t,100),0),i=[0,255,0],l=i,c=((e,t,n)=>{let[r,o,a]=e,[i,s,l]=t;return[r*(1-n)+i*n,o*(1-n)+s*n,a*(1-n)+l*n]})(i,[255,0,0],r/100),u="\n linear-gradient(\n to right,\n rgba(".concat(l.join(","),", ").concat(.2,") 0%,\n rgba(").concat(c.join(","),", ").concat(.2,") ").concat(r,"%,\n transparent ").concat(r,"%\n )\n ");return(0,s.jsx)(o.Z,{component:"span",sx:{borderColor:e=>e.palette.divider,borderStyle:"solid",borderWidth:1,display:"flex",flexGrow:1},children:(0,s.jsx)(o.Z,{component:"span",sx:{paddingLeft:1,paddingRight:1,background:u,flexGrow:1},children:(0,s.jsx)(a.Z,{align:"center",children:n})})})},c=e=>{let{gpu:t,slot:n}=e;return(0,s.jsx)(r.Z,{title:t.name,children:(0,s.jsxs)(o.Z,{sx:{display:"flex",minWidth:120},children:[(0,s.jsxs)(i.E,{variant:"body1",children:["[",n,"]:"]}),void 0!==t.utilizationGpu?(0,s.jsx)(l,{percent:t.utilizationGpu,text:"".concat(t.utilizationGpu.toFixed(1),"%")}):(0,s.jsx)(a.Z,{color:"textSecondary",component:"span",variant:"inherit",children:"N/A"})]})})},u=e=>{let{node:t}=e;return(0,s.jsx)(o.Z,{sx:{minWidth:120},children:void 0!==t.gpus&&0!==t.gpus.length?t.gpus.map(((e,t)=>(0,s.jsx)(c,{gpu:e,slot:e.index},e.uuid))):(0,s.jsx)(a.Z,{color:"textSecondary",component:"span",variant:"inherit",children:"N/A"})})},d=e=>{let{workerPID:t,gpus:n}=e;const r=(null!==n&&void 0!==n?n:[]).map(((e,n)=>{var r;if(null===(r=e.processesPids)||void 0===r?void 0:r.find((e=>e.pid===t)))return(0,s.jsx)(c,{gpu:e,slot:e.index},e.uuid)})).filter((e=>void 0!==e));return 0===r.length?(0,s.jsx)(a.Z,{color:"textSecondary",component:"span",variant:"inherit",children:"N/A"}):(0,s.jsx)(o.Z,{sx:{minWidth:120},children:r})},p=(e,t)=>(null!==t&&void 0!==t?t:[]).map(((t,n)=>{var r;return(null===(r=t.processesPids)||void 0===r?void 0:r.find((t=>t.pid===e)))&&t.utilizationGpu||0})).filter((e=>void 0!==e)).reduce(((e,t)=>e+t),0)},9755:(e,t,n)=>{"use strict";n.d(t,{CZ:()=>c,XI:()=>d,w:()=>u});var r=n(890),o=n(697),a=n(68),i=(n(2791),n(1685)),s=n(348),l=n(184);const c=e=>{var t;let{node:n}=e;const o=(null!==(t=n.gpus)&&void 0!==t?t:[]).map(((e,t)=>{const n={key:e.uuid,gpuName:e.name,utilization:e.memoryUsed,total:e.memoryTotal,slot:e.index};return(0,l.jsx)(p,{...n})}));return(0,l.jsx)("div",{style:{minWidth:60},children:0===o.length?(0,l.jsx)(r.Z,{color:"textSecondary",component:"span",variant:"inherit",children:"N/A"}):(0,l.jsx)("div",{style:{minWidth:120},children:o})})},u=e=>{let{workerPID:t,gpus:n}=e;const o=(null!==n&&void 0!==n?n:[]).map(((e,n)=>{var r;const o=null===(r=e.processesPids)||void 0===r?void 0:r.find((e=>t&&e.pid===t));if(!o)return;const a={key:e.uuid,gpuName:e.name,total:e.memoryTotal,utilization:o.gpuMemoryUsage,slot:e.index};return(0,l.jsx)(p,{...a})})).filter((e=>void 0!==e));return 0===o.length?(0,l.jsx)(r.Z,{color:"textSecondary",component:"span",variant:"inherit",children:"N/A"}):(0,l.jsx)("div",{style:{minWidth:120},children:o})},d=(e,t)=>(null!==t&&void 0!==t?t:[]).map(((t,n)=>{var r;const o=null===(r=t.processesPids)||void 0===r?void 0:r.find((t=>e&&t.pid===e));return o?o.gpuMemoryUsage:0})).filter((e=>void 0!==e)).reduce(((e,t)=>e+t),0),p=e=>{let{gpuName:t,slot:n,utilization:r,total:c}=e;const u=((e,t)=>"".concat(e,"MiB/").concat(t,"MiB"))(r,c);return(0,l.jsx)(o.Z,{display:"flex",flexWrap:"nowrap",style:{minWidth:120},children:(0,l.jsx)(a.Z,{title:t,children:(0,l.jsxs)(o.Z,{display:"flex",flexWrap:"nowrap",flexGrow:1,children:[(0,l.jsxs)(i.E,{variant:"body1",children:["[",n,"]:"," "]}),(0,l.jsx)(s.Z,{num:r,total:c,children:u})]})})})}},2374:(e,t,n)=>{"use strict";n.d(t,{I:()=>a,b:()=>o});var r=n(476);const o=()=>(0,r.U)("logical/actors"),a=e=>(0,r.U)("logical/actors/".concat(e))},6566:(e,t,n)=>{"use strict";n.d(t,{Go:()=>o,Hz:()=>s,iK:()=>a,s1:()=>i});var r=n(476);const o=()=>(0,r.U)("api/jobs/"),a=e=>(0,r.U)("api/jobs/".concat(e)),i=e=>(0,r.U)("api/v0/tasks/summarize?filter_keys=job_id&filter_predicates=%3D&filter_values=".concat(e)),s=e=>(0,r.U)("api/v0/tasks/summarize?filter_keys=job_id&filter_predicates=%3D&filter_values=".concat(e,"&summary_by=lineage"))},4938:(e,t,n)=>{"use strict";n.d(t,{Fc:()=>a,Q$:()=>i,Sp:()=>o,n2:()=>s});var r=n(476);const o=5e4,a=e=>{let{nodeId:t,filename:n,taskId:r,actorId:a,suffix:i,maxLines:s=o}=e;if(null===t||null===a||null===r||null===n)return null;const l=[...void 0!==t?["node_id=".concat(encodeURIComponent(t))]:[],...void 0!==n?["filename=".concat(encodeURIComponent(n))]:[],...void 0!==r?["task_id=".concat(encodeURIComponent(r))]:[],...void 0!==a?["actor_id=".concat(encodeURIComponent(a))]:[],...void 0!==i?["suffix=".concat(encodeURIComponent(i))]:[],"lines=".concat(s)];return"api/v0/logs/file?".concat(l.join("&"))},i=async e=>{const t=a({...e});if(null===t)return;const n=await(0,r.U)(t);return 200===n.status&&0===n.data.length?"":n.data},s=e=>{let{glob:t,...n}=e;const o="nodeId"in n?n.nodeId:void 0,a="nodeIp"in n?n.nodeIp:void 0,i=[...void 0!==o?["node_id=".concat(encodeURIComponent(o))]:[],...void 0!==a?["node_ip=".concat(encodeURIComponent(a))]:[],...void 0!==t?["glob=".concat(encodeURIComponent(t))]:[]],s="api/v0/logs?".concat(i.join("&"));return(0,r.U)(s)}},476:(e,t,n)=>{"use strict";n.d(t,{U:()=>a});var r=n(4569),o=n.n(r);const a=(e,t)=>o().get((e=>e.startsWith("/")?e.slice(1):e)(e),t)},1826:(e,t,n)=>{"use strict";let r;n.d(t,{b:()=>r}),function(e){e.DEPENDENCIES_UNREADY="DEPENDENCIES_UNREADY",e.PENDING_CREATION="PENDING_CREATION",e.ALIVE="ALIVE",e.RESTARTING="RESTARTING",e.DEAD="DEAD"}(r||(r={}))},7027:(e,t,n)=>{"use strict";let r;n.d(t,{B:()=>r}),function(e){e.PENDING="PENDING",e.RUNNING="RUNNING",e.STOPPED="STOPPED",e.SUCCEEDED="SUCCEEDED",e.FAILED="FAILED"}(r||(r={}))},4602:(e,t,n)=>{"use strict";let r,o,a,i,s;n.d(t,{MA:()=>s,QZ:()=>o,V0:()=>a,z5:()=>r}),function(e){e.NOT_STARTED="NOT_STARTED",e.DEPLOYING="DEPLOYING",e.RUNNING="RUNNING",e.DEPLOY_FAILED="DEPLOY_FAILED",e.DELETING="DELETING",e.UNHEALTHY="UNHEALTHY"}(r||(r={})),function(e){e.UPDATING="UPDATING",e.HEALTHY="HEALTHY",e.UNHEALTHY="UNHEALTHY",e.DEPLOY_FAILED="DEPLOY_FAILED",e.UPSCALING="UPSCALING",e.DOWNSCALING="DOWNSCALING"}(o||(o={})),function(e){e.STARTING="STARTING",e.UPDATING="UPDATING",e.RECOVERING="RECOVERING",e.RUNNING="RUNNING",e.STOPPING="STOPPING"}(a||(a={})),function(e){e.Disabled="Disabled",e.NoServer="NoServer",e.HeadOnly="HeadOnly",e.EveryNode="EveryNode",e.FixedNumber="FixedNumber"}(i||(i={})),function(e){e.STARTING="STARTING",e.HEALTHY="HEALTHY",e.UNHEALTHY="UNHEALTHY",e.DRAINING="DRAINING"}(s||(s={}))},1426:(e,t,n)=>{"use strict";n.d(t,{r:()=>r});const r=e=>e<1024?"".concat(e.toFixed(4),"B"):e<1048576?"".concat((e/1024).toFixed(2),"KB"):e<1024**3?"".concat((e/1048576).toFixed(2),"MB"):e<1024**4?"".concat((e/1024**3).toFixed(2),"GB"):e<1024**5?"".concat((e/1024**4).toFixed(2),"TB"):e<1024**6?"".concat((e/1024**5).toFixed(2),"PB"):""},8683:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,s:()=>i});var r=n(763),o=n(2791);const a=function(){let{overrideFilters:e,onFilterChange:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,a]=(0,o.useState)([]),i=void 0!==e?e:n,s=(e,r)=>{const o=n.find((t=>t.key===e));o?o.val=r:n.push({key:e,val:r}),a([...n]),null===t||void 0===t||t()},l=e=>i.every((t=>{const n=(0,r.get)(e,t.key,"");return!t.val||n&&n.toString().includes(t.val)}));return{changeFilter:s,filterFunc:l}},i=e=>{const[t,n]=(0,o.useState)({key:e||"",desc:!1});return{sorterFunc:(e,n)=>{if(!t.key)return 0;let[o,a]=[e,n];return t.desc&&([a,o]=[e,n]),(0,r.get)(a,t.key)?(0,r.get)(o,t.key)?(0,r.get)(a,t.key)>(0,r.get)(o,t.key)?1:-1:1:-1},setSortKey:e=>n({...t,key:e}),setOrderDesc:e=>n({...t,desc:e}),sorterKey:t.key,descVal:t.desc}}},3361:(e,t,n)=>{"use strict";n.d(t,{Z:()=>oe});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?u(x,--b):0,g--,10===y&&(g=1,m--),y}function k(){return y=b2||C(y)>3?"":" "}function O(e,t){for(;--t&&k()&&!(y<48||y>102||y>57&&y<65||y>70&&y<97););return E(e,Z()+(t<6&&32==j()&&32==k()))}function T(e){for(;k();)switch(y){case e:return b;case 34:case 39:34!==e&&39!==e&&T(y);break;case 40:41===e&&T(e);break;case 92:k()}return b}function R(e,t){for(;k()&&e+y!==57&&(e+y!==84||47!==j()););return"/*"+E(t,b-1)+"*"+a(47===e?e:k())}function M(e){for(;!C(j());)k();return E(e,b)}var L="-ms-",D="-moz-",z="-webkit-",F="comm",B="rule",U="decl",W="@keyframes";function H(e,t){for(var n="",r=f(e),o=0;o0&&p(D)-v&&h(y>32?Y(D+";",r,n,v-1):Y(l(D," ","")+";",r,n,v-2),f);break;case 59:D+=";";default:if(h(L=q(D,t,n,m,g,o,d,N,I=[],T=[],v),i),123===C)if(0===g)V(D,t,L,L,I,i,v,d,T);else switch(99===b&&110===u(D,3)?100:b){case 100:case 108:case 109:case 115:V(e,L,L,r&&h(q(e,L,L,0,0,o,d,N,o,I=[],v),T),o,T,v,d,r?I:T);break;default:V(D,L,L,L,[""],T,0,d,T)}}m=g=y=0,w=E=1,N=D="",v=s;break;case 58:v=1+p(D),y=x;default:if(w<1)if(123==C)--w;else if(125==C&&0==w++&&125==S())continue;switch(D+=a(C),C*w){case 38:E=g>0?1:(D+="\f",-1);break;case 44:d[m++]=(p(D)-1)*E,E=1;break;case 64:45===j()&&(D+=A(k())),b=j(),g=v=p(N=D+=M(Z())),C++;break;case 45:45===x&&2==p(D)&&(w=0)}}return i}function q(e,t,n,r,a,i,c,u,p,h,m){for(var g=a-1,v=0===a?i:[""],b=f(v),y=0,x=0,_=0;y0?v[S]+" "+k:l(k,/&\f/g,v[S])))&&(p[_++]=j);return w(e,t,n,0===a?B:u,p,h,m)}function K(e,t,n){return w(e,t,n,F,a(y),d(e,2,-2),0)}function Y(e,t,n,r){return w(e,t,n,U,d(e,0,r),d(e,r+1,-1),r)}var Q=function(e,t,n){for(var r=0,o=0;r=o,o=j(),38===r&&12===o&&(t[n]=1),!C(o);)k();return E(e,b)},X=function(e,t){return I(function(e,t){var n=-1,r=44;do{switch(C(r)){case 0:38===r&&12===j()&&(t[n]=1),e[n]+=Q(b-1,t,n);break;case 2:e[n]+=A(r);break;case 4:if(44===r){e[++n]=58===j()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=a(r)}}while(r=k());return e}(N(e),t))},J=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(n))&&!r){J.set(e,!0);for(var o=[],a=X(t,o),i=n.props,s=0,l=0;s6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,p(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":-webkit-")+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===u(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+"-ms-$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return z+e+L+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return z+e+L+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return z+e+L+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return z+e+L+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case U:e.return=ne(e.value,e.length);break;case W:return H([_(e,{value:l(e.value,"@","@-webkit-")})],r);case B:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([_(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([_(e,{props:[l(t,/:(plac\w+)/,":-webkit-input-$1")]}),_(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),_(e,{props:[l(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}],oe=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||re;var a,i,s={},l=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{Z:()=>r})},2564:(e,t,n)=>{"use strict";n.d(t,{C:()=>s,T:()=>c,i:()=>a,w:()=>l});var r=n(2791),o=n(3361),a=(n(1849),n(2561),!0),i=r.createContext("undefined"!==typeof HTMLElement?(0,o.Z)({key:"css"}):null);var s=i.Provider,l=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(i);return e(t,o,n)}))};a||(l=function(e){return function(t){var n=(0,r.useContext)(i);return null===n?(n=(0,o.Z)({key:"css"}),r.createElement(i.Provider,{value:n},e(t,n))):e(t,n)}});var c=r.createContext({})},2554:(e,t,n)=>{"use strict";n.d(t,{F4:()=>u,iv:()=>c,xB:()=>l});var r=n(2564),o=n(2791),a=n(5438),i=n(2561),s=n(1849),l=(n(3361),n(2110),(0,r.w)((function(e,t){var n=e.styles,l=(0,s.O)([n],void 0,o.useContext(r.T));if(!r.i){for(var c,u=l.name,d=l.styles,p=l.next;void 0!==p;)u+=" "+p.name,d+=p.styles,p=p.next;var f=!0===t.compat,h=t.insert("",{name:u,styles:d},t.sheet,f);return f?null:o.createElement("style",((c={})["data-emotion"]=t.key+"-global "+u,c.dangerouslySetInnerHTML={__html:h},c.nonce=t.sheet.nonce,c))}var m=o.useRef();return(0,i.j)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,o=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(r=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),m.current=[n,r],function(){n.flush()}}),[t]),(0,i.j)((function(){var e=m.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,a.My)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}}),[t,l.name]),null})));function c(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";n.d(t,{O:()=>h});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(9797),a=/[A-Z]|^ms/g,i=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!==typeof e},c=(0,o.Z)((function(e){return s(e)?e:e.replace(a,"-$&").toLowerCase()})),u=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(i,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===r[e]||s(e)||"number"!==typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)p={name:r.name,styles:r.styles,next:p},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:p}}},2561:(e,t,n)=>{"use strict";var r;n.d(t,{L:()=>i,j:()=>s});var o=n(2791),a=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,i=a||function(e){return e()},s=a||o.useLayoutEffect},5438:(e,t,n)=>{"use strict";n.d(t,{My:()=>a,fp:()=>r,hC:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},a=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}},6174:(e,t,n)=>{"use strict";n.d(t,{h:()=>c});var r=n(2791),o=n(4164),a=n(6117),i=n(2876),s=n(2971),l=n(184);const c=r.forwardRef((function(e,t){const{children:n,container:c,disablePortal:u=!1}=e,[d,p]=r.useState(null),f=(0,a.Z)(r.isValidElement(n)?n.ref:null,t);if((0,i.Z)((()=>{u||p(function(e){return"function"===typeof e?e():e}(c)||document.body)}),[c,u]),(0,i.Z)((()=>{if(d&&!u)return(0,s.Z)(t,d),()=>{(0,s.Z)(t,null)}}),[t,d,u]),u){if(r.isValidElement(n)){const e={ref:f};return r.cloneElement(n,e)}return(0,l.jsx)(r.Fragment,{children:n})}return(0,l.jsx)(r.Fragment,{children:d?o.createPortal(n,d):d})}))},183:(e,t,n)=>{"use strict";n.d(t,{$:()=>a});var r=n(7462),o=n(6897);function a(e,t,n){return void 0===e||(0,o.X)(e)?t:(0,r.Z)({},t,{ownerState:(0,r.Z)({},t.ownerState,n)})}},2086:(e,t,n)=>{"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}n.d(t,{_:()=>r})},6897:(e,t,n)=>{"use strict";function r(e){return"string"===typeof e}n.d(t,{X:()=>r})},3572:(e,t,n)=>{"use strict";n.d(t,{y:()=>p});var r=n(7462),o=n(3366),a=n(6117),i=n(183);function s(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}const d=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function p(e){var t;const{elementType:n,externalSlotProps:s,ownerState:p,skipResolvingSlotProps:f=!1}=e,h=(0,o.Z)(e,d),m=f?{}:function(e,t,n){return"function"===typeof e?e(t,n):e}(s,p),{props:g,internalRef:v}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:o,externalForwardedProps:a,className:i}=e;if(!t){const e=l(null==n?void 0:n.className,i,null==a?void 0:a.className,null==o?void 0:o.className),t=(0,r.Z)({},null==n?void 0:n.style,null==a?void 0:a.style,null==o?void 0:o.style),s=(0,r.Z)({},n,a,o);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}const s=(0,c._)((0,r.Z)({},a,o)),d=u(o),p=u(a),f=t(s),h=l(null==f?void 0:f.className,null==n?void 0:n.className,i,null==a?void 0:a.className,null==o?void 0:o.className),m=(0,r.Z)({},null==f?void 0:f.style,null==n?void 0:n.style,null==a?void 0:a.style,null==o?void 0:o.style),g=(0,r.Z)({},f,n,p,d);return h.length>0&&(g.className=h),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:f.ref}}((0,r.Z)({},h,{externalSlotProps:m})),b=(0,a.Z)(v,null==m?void 0:m.ref,null==(t=e.additionalProps)?void 0:t.ref);return(0,i.$)(n,(0,r.Z)({},g,{ref:b}),p)}},9823:(e,t,n)=>{"use strict";var r=n(4836);t.Z=void 0;var o=r(n(5649)),a=n(184);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},5857:(e,t,n)=>{"use strict";var r=n(4836);t.Z=void 0;var o=r(n(5649)),a=n(184);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline")},5172:(e,t,n)=>{"use strict";var r=n(4836);t.Z=void 0;var o=r(n(5649)),a=n(184);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown")},5397:(e,t,n)=>{"use strict";var r=n(4836);t.Z=void 0;var o=r(n(5649)),a=n(184);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight")},9907:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(6189),o=n(184);const a=(0,r.Z)((0,o.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined")},5649:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(4421)},5699:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ae});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(8252),c=n(8637);const u=e=>{const t=a.useRef({});return a.useEffect((()=>{t.current=e})),t.current};var d=n(7054),p=n(2971);function f(e){return"undefined"!==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function h(e,t){for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:{};const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:a,trim:i=!1}=e;return(e,s)=>{let{inputValue:l,getOptionLabel:c}=s,u=i?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=f(u));const d=u?e.filter((e=>{let r=(a||c)(e);return n&&(r=r.toLowerCase()),t&&(r=f(r)),"start"===o?0===r.indexOf(u):r.indexOf(u)>-1})):e;return"number"===typeof r?d.slice(0,r):d}}(),g=e=>{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))};function v(e){const{unstable_isActiveElementInListbox:t=g,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:s=!1,blurOnSelect:f=!1,clearOnBlur:v=!e.freeSolo,clearOnEscape:b=!1,componentName:y="useAutocomplete",defaultValue:x=(e.multiple?[]:null),disableClearable:w=!1,disableCloseOnSelect:_=!1,disabled:S,disabledItemsFocusable:k=!1,disableListWrap:j=!1,filterOptions:Z=m,filterSelectedOptions:E=!1,freeSolo:C=!1,getOptionDisabled:N,getOptionKey:I,getOptionLabel:A=(e=>{var t;return null!=(t=e.label)?t:e}),groupBy:P,handleHomeEndKeys:O=!e.freeSolo,id:T,includeInputInList:R=!1,inputValue:M,isOptionEqualToValue:L=((e,t)=>e===t),multiple:D=!1,onChange:z,onClose:F,onHighlightChange:B,onInputChange:U,onOpen:W,open:H,openOnFocus:$=!1,options:G,readOnly:V=!1,selectOnFocus:q=!e.freeSolo,value:K}=e,Y=(0,l.Z)(T);let Q=A;Q=e=>{const t=A(e);return"string"!==typeof t?String(t):t};const X=a.useRef(!1),J=a.useRef(!0),ee=a.useRef(null),te=a.useRef(null),[ne,re]=a.useState(null),[oe,ae]=a.useState(-1),ie=i?0:-1,se=a.useRef(ie),[le,ce]=(0,c.Z)({controlled:K,default:x,name:y}),[ue,de]=(0,c.Z)({controlled:M,default:"",name:y,state:"inputValue"}),[pe,fe]=a.useState(!1),he=a.useCallback(((e,t)=>{if(!(D?le.length!E||!(D?le:[le]).some((t=>null!==t&&L(e,t))))),{inputValue:ye&&ve?"":ue,getOptionLabel:Q}):[],_e=u({filteredOptions:we,value:le,inputValue:ue});a.useEffect((()=>{const e=le!==_e.value;pe&&!e||C&&!e||he(null,le)}),[le,he,pe,_e.value,C]);const Se=me&&we.length>0&&!V;const ke=(0,d.Z)((e=>{-1===e?ee.current.focus():ne.querySelector('[data-tag-index="'.concat(e,'"]')).focus()}));a.useEffect((()=>{D&&oe>le.length-1&&(ae(-1),ke(-1))}),[le,D,oe,ke]);const je=(0,d.Z)((e=>{let{event:t,index:r,reason:o="auto"}=e;if(se.current=r,-1===r?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant","".concat(Y,"-option-").concat(r)),B&&B(t,-1===r?null:we[r],o),!te.current)return;const a=te.current.querySelector('[role="option"].'.concat(n,"-focused"));a&&(a.classList.remove("".concat(n,"-focused")),a.classList.remove("".concat(n,"-focusVisible")));let i=te.current;if("listbox"!==te.current.getAttribute("role")&&(i=te.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===r)return void(i.scrollTop=0);const s=te.current.querySelector('[data-option-index="'.concat(r,'"]'));if(s&&(s.classList.add("".concat(n,"-focused")),"keyboard"===o&&s.classList.add("".concat(n,"-focusVisible")),i.scrollHeight>i.clientHeight&&"mouse"!==o&&"touch"!==o)){const e=s,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(P?1.3:0){let{event:t,diff:n,direction:o="next",reason:a="auto"}=e;if(!xe)return;const i=function(e,t){if(!te.current||e<0||e>=we.length)return-1;let n=e;for(;;){const r=te.current.querySelector('[data-option-index="'.concat(n,'"]')),o=!k&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!o)return n;if(n="next"===t?(n+1)%we.length:(n-1+we.length)%we.length,n===e)return-1}}((()=>{const e=we.length-1;if("reset"===n)return ie;if("start"===n)return 0;if("end"===n)return e;const t=se.current+n;return t<0?-1===t&&R?-1:j&&-1!==se.current||Math.abs(n)>1?0:e:t>e?t===e+1&&R?-1:j||Math.abs(n)>1?e:0:t})(),o);if(je({index:i,reason:a,event:t}),r&&"reset"!==n)if(-1===i)ee.current.value=ue;else{const e=Q(we[i]);ee.current.value=e;0===e.toLowerCase().indexOf(ue.toLowerCase())&&ue.length>0&&ee.current.setSelectionRange(ue.length,e.length)}})),Ee=a.useCallback((()=>{if(!xe)return;if((()=>{if(-1!==se.current&&_e.filteredOptions&&_e.filteredOptions.length!==we.length&&_e.inputValue===ue&&(D?le.length===_e.value.length&&_e.value.every(((e,t)=>Q(le[t])===Q(e))):(e=_e.value,t=le,(e?Q(e):"")===(t?Q(t):"")))){const e=_e.filteredOptions[se.current];if(e&&we.some((t=>Q(t)===Q(e))))return!0}var e,t;return!1})())return;const e=D?le[0]:le;if(0!==we.length&&null!=e){if(te.current)if(null==e)se.current>=we.length-1?je({index:we.length-1}):je({index:se.current});else{const t=we[se.current];if(D&&t&&-1!==h(le,(e=>L(t,e))))return;const n=h(we,(t=>L(t,e)));-1===n?Ze({diff:"reset"}):je({index:n})}}else Ze({diff:"reset"})}),[we.length,!D&&le,E,Ze,je,xe,ue,D]),Ce=(0,d.Z)((e=>{(0,p.Z)(te,e),e&&Ee()}));a.useEffect((()=>{Ee()}),[Ee]);const Ne=e=>{me||(ge(!0),be(!0),W&&W(e))},Ie=(e,t)=>{me&&(ge(!1),F&&F(e,t))},Ae=(e,t,n,r)=>{if(D){if(le.length===t.length&&le.every(((e,n)=>e===t[n])))return}else if(le===t)return;z&&z(e,t,n,r),ce(t)},Pe=a.useRef(!1),Oe=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"selectOption",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",o=n,a=t;if(D){a=Array.isArray(le)?le.slice():[];const e=h(a,(e=>L(t,e)));-1===e?a.push(t):"freeSolo"!==r&&(a.splice(e,1),o="removeOption")}he(e,a),Ae(e,a,o,{option:t}),_||e&&(e.ctrlKey||e.metaKey)||Ie(e,o),(!0===f||"touch"===f&&Pe.current||"mouse"===f&&!Pe.current)&&ee.current.blur()};const Te=(e,t)=>{if(!D)return;""===ue&&Ie(e,"toggleInput");let n=oe;-1===oe?""===ue&&"previous"===t&&(n=le.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===le.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===le.length||"previous"===t&&-1===n)return-1;const e=ne.querySelector('[data-tag-index="'.concat(n,'"]'));if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),ae(n),ke(n)},Re=e=>{X.current=!0,de(""),U&&U(e,"","clear"),Ae(e,D?[]:null,"clear")},Me=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==oe&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(ae(-1),ke(-1)),229!==t.which))switch(t.key){case"Home":xe&&O&&(t.preventDefault(),Ze({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":xe&&O&&(t.preventDefault(),Ze({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Ze({diff:-5,direction:"previous",reason:"keyboard",event:t}),Ne(t);break;case"PageDown":t.preventDefault(),Ze({diff:5,direction:"next",reason:"keyboard",event:t}),Ne(t);break;case"ArrowDown":t.preventDefault(),Ze({diff:1,direction:"next",reason:"keyboard",event:t}),Ne(t);break;case"ArrowUp":t.preventDefault(),Ze({diff:-1,direction:"previous",reason:"keyboard",event:t}),Ne(t);break;case"ArrowLeft":Te(t,"previous");break;case"ArrowRight":Te(t,"next");break;case"Enter":if(-1!==se.current&&xe){const e=we[se.current],n=!!N&&N(e);if(t.preventDefault(),n)return;Oe(t,e,"selectOption"),r&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else C&&""!==ue&&!1===ye&&(D&&t.preventDefault(),Oe(t,ue,"createOption","freeSolo"));break;case"Escape":xe?(t.preventDefault(),t.stopPropagation(),Ie(t,"escape")):b&&(""!==ue||D&&le.length>0)&&(t.preventDefault(),t.stopPropagation(),Re(t));break;case"Backspace":if(D&&!V&&""===ue&&le.length>0){const e=-1===oe?le.length-1:oe,n=le.slice();n.splice(e,1),Ae(t,n,"removeOption",{option:le[e]})}break;case"Delete":if(D&&!V&&""===ue&&le.length>0&&-1!==oe){const e=oe,n=le.slice();n.splice(e,1),Ae(t,n,"removeOption",{option:le[e]})}}},Le=e=>{fe(!0),$&&!X.current&&Ne(e)},De=e=>{t(te)?ee.current.focus():(fe(!1),J.current=!0,X.current=!1,s&&-1!==se.current&&xe?Oe(e,we[se.current],"blur"):s&&C&&""!==ue?Oe(e,ue,"blur","freeSolo"):v&&he(e,le),Ie(e,"blur"))},ze=e=>{const t=e.target.value;ue!==t&&(de(t),be(!1),U&&U(e,t,"input")),""===t?w||D||Ae(e,null,"clear"):Ne(e)},Fe=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));se.current!==t&&je({event:e,index:t,reason:"mouse"})},Be=e=>{je({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Pe.current=!0},Ue=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Oe(e,we[t],"selectOption"),Pe.current=!1},We=e=>t=>{const n=le.slice();n.splice(e,1),Ae(t,n,"removeOption",{option:le[e]})},He=e=>{me?Ie(e,"toggleInput"):Ne(e)},$e=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==Y&&e.preventDefault()},Ge=e=>{e.currentTarget.contains(e.target)&&(ee.current.focus(),q&&J.current&&ee.current.selectionEnd-ee.current.selectionStart===0&&ee.current.select(),J.current=!1)},Ve=e=>{S||""!==ue&&me||He(e)};let qe=C&&ue.length>0;qe=qe||(D?le.length>0:null!==le);let Ke=we;if(P){new Map;Ke=we.reduce(((e,t,n)=>{const r=P(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e}),[])}return S&&pe&&De(),{getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.Z)({"aria-owns":Se?"".concat(Y,"-listbox"):null},e,{onKeyDown:Me(e),onMouseDown:$e,onClick:Ge})},getInputLabelProps:()=>({id:"".concat(Y,"-label"),htmlFor:Y}),getInputProps:()=>({id:Y,value:ue,onBlur:De,onFocus:Le,onChange:ze,onMouseDown:Ve,"aria-activedescendant":xe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Se?"".concat(Y,"-listbox"):void 0,"aria-expanded":Se,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:S}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Re}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:He}),getTagProps:e=>{let{index:t}=e;return(0,o.Z)({key:t,"data-tag-index":t,tabIndex:-1},!V&&{onDelete:We(t)})},getListboxProps:()=>({role:"listbox",id:"".concat(Y,"-listbox"),"aria-labelledby":"".concat(Y,"-label"),ref:Ce,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:e=>{let{index:t,option:n}=e;var r;const o=(D?le:[le]).some((e=>null!=e&&L(n,e))),a=!!N&&N(n);return{key:null!=(r=null==I?void 0:I(n))?r:Q(n),tabIndex:-1,role:"option",id:"".concat(Y,"-option-").concat(t),onMouseMove:Fe,onClick:Ue,onTouchStart:Be,"data-option-index":t,"aria-disabled":a,"aria-selected":o}},id:Y,inputValue:ue,value:le,dirty:qe,expanded:xe&&ne,popupOpen:xe,focused:pe||-1!==oe,anchorEl:ne,setAnchorEl:re,focusedTag:oe,groupedOptions:Ke}}var b=n(4402),y=n(5396),x=n(6934),w=n(1402),_=n(4036),S=n(5878),k=n(1217);function j(e){return(0,k.ZP)("MuiListSubheader",e)}(0,S.Z)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var Z=n(184);const E=["className","color","component","disableGutters","disableSticky","inset"],C=(0,x.ZP)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,_.Z)(n.color))],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},"primary"===n.color&&{color:(t.vars||t).palette.primary.main},"inherit"===n.color&&{color:"inherit"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.inset&&{paddingLeft:72},!n.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})})),N=a.forwardRef((function(e,t){const n=(0,w.Z)({props:e,name:"MuiListSubheader"}),{className:a,color:l="default",component:c="li",disableGutters:u=!1,disableSticky:d=!1,inset:p=!1}=n,f=(0,r.Z)(n,E),h=(0,o.Z)({},n,{color:l,component:c,disableGutters:u,disableSticky:d,inset:p}),m=(e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:a}=e,i={root:["root","default"!==n&&"color".concat((0,_.Z)(n)),!r&&"gutters",o&&"inset",!a&&"sticky"]};return(0,s.Z)(i,j,t)})(h);return(0,Z.jsx)(C,(0,o.Z)({as:c,className:(0,i.Z)(m.root,a),ref:t,ownerState:h},f))}));N.muiSkipListHighlight=!0;const I=N;var A=n(5527),P=n(3400),O=n(1918),T=n(6779),R=n(5891),M=n(6059),L=n(6285),D=n(8799),z=n(9059);function F(e){return(0,k.ZP)("MuiAutocomplete",e)}const B=(0,S.Z)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var U,W,H=n(2071);const $=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],G=["ref"],V=["key"],q=(0,x.ZP)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:a,inputFocused:i,size:s}=n;return[{["& .".concat(B.tag)]:t.tag},{["& .".concat(B.tag)]:t["tagSize".concat((0,_.Z)(s))]},{["& .".concat(B.inputRoot)]:t.inputRoot},{["& .".concat(B.input)]:t.input},{["& .".concat(B.input)]:i&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,o&&t.hasClearIcon]}})((e=>{let{ownerState:t}=e;return(0,o.Z)({["&.".concat(B.focused," .").concat(B.clearIndicator)]:{visibility:"visible"},"@media (pointer: fine)":{["&:hover .".concat(B.clearIndicator)]:{visibility:"visible"}}},t.fullWidth&&{width:"100%"},{["& .".concat(B.tag)]:(0,o.Z)({margin:3,maxWidth:"calc(100% - 6px)"},"small"===t.size&&{margin:2,maxWidth:"calc(100% - 4px)"}),["& .".concat(B.inputRoot)]:{flexWrap:"wrap",[".".concat(B.hasPopupIcon,"&, .").concat(B.hasClearIcon,"&")]:{paddingRight:30},[".".concat(B.hasPopupIcon,".").concat(B.hasClearIcon,"&")]:{paddingRight:56},["& .".concat(B.input)]:{width:0,minWidth:30}},["& .".concat(T.Z.root)]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},["& .".concat(T.Z.root,".").concat(R.Z.sizeSmall)]:{["& .".concat(T.Z.input)]:{padding:"2px 4px 3px 0"}},["& .".concat(M.Z.root)]:{padding:9,[".".concat(B.hasPopupIcon,"&, .").concat(B.hasClearIcon,"&")]:{paddingRight:39},[".".concat(B.hasPopupIcon,".").concat(B.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(B.input)]:{padding:"7.5px 4px 7.5px 5px"},["& .".concat(B.endAdornment)]:{right:9}},["& .".concat(M.Z.root,".").concat(R.Z.sizeSmall)]:{paddingTop:6,paddingBottom:6,paddingLeft:6,["& .".concat(B.input)]:{padding:"2.5px 4px 2.5px 8px"}},["& .".concat(L.Z.root)]:{paddingTop:19,paddingLeft:8,[".".concat(B.hasPopupIcon,"&, .").concat(B.hasClearIcon,"&")]:{paddingRight:39},[".".concat(B.hasPopupIcon,".").concat(B.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(L.Z.input)]:{padding:"7px 4px"},["& .".concat(B.endAdornment)]:{right:9}},["& .".concat(L.Z.root,".").concat(R.Z.sizeSmall)]:{paddingBottom:1,["& .".concat(L.Z.input)]:{padding:"2.5px 4px"}},["& .".concat(R.Z.hiddenLabel)]:{paddingTop:8},["& .".concat(L.Z.root,".").concat(R.Z.hiddenLabel)]:{paddingTop:0,paddingBottom:0,["& .".concat(B.input)]:{paddingTop:16,paddingBottom:17}},["& .".concat(L.Z.root,".").concat(R.Z.hiddenLabel,".").concat(R.Z.sizeSmall)]:{["& .".concat(B.input)]:{paddingTop:8,paddingBottom:9}},["& .".concat(B.input)]:(0,o.Z)({flexGrow:1,textOverflow:"ellipsis",opacity:0},t.inputFocused&&{opacity:1})})})),K=(0,x.ZP)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Y=(0,x.ZP)(P.Z,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Q=(0,x.ZP)(P.Z,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,o.Z)({},t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen)}})((e=>{let{ownerState:t}=e;return(0,o.Z)({padding:2,marginRight:-2},t.popupOpen&&{transform:"rotate(180deg)"})})),X=(0,x.ZP)(y.Z,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(B.option)]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({zIndex:(t.vars||t).zIndex.modal},n.disablePortal&&{position:"absolute"})})),J=(0,x.ZP)(A.Z,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{theme:t}=e;return(0,o.Z)({},t.typography.body1,{overflow:"auto"})})),ee=(0,x.ZP)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),te=(0,x.ZP)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),ne=(0,x.ZP)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((e=>{let{theme:t}=e;return{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",["& .".concat(B.option)]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},["&.".concat(B.focused)]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["&.".concat(B.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,b.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(B.focused)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,b.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(B.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,b.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}}})),re=(0,x.ZP)(I,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,top:-8}})),oe=(0,x.ZP)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,["& .".concat(B.option)]:{paddingLeft:24}}),ae=a.forwardRef((function(e,t){var n,l,c,u;const d=(0,w.Z)({props:e,name:"MuiAutocomplete"}),{autoComplete:p=!1,autoHighlight:f=!1,autoSelect:h=!1,blurOnSelect:m=!1,ChipProps:g,className:b,clearIcon:x=U||(U=(0,Z.jsx)(D.Z,{fontSize:"small"})),clearOnBlur:S=!d.freeSolo,clearOnEscape:k=!1,clearText:j="Clear",closeText:E="Close",componentsProps:C={},defaultValue:N=(d.multiple?[]:null),disableClearable:I=!1,disableCloseOnSelect:P=!1,disabled:T=!1,disabledItemsFocusable:R=!1,disableListWrap:M=!1,disablePortal:L=!1,filterSelectedOptions:B=!1,forcePopupIcon:ae="auto",freeSolo:ie=!1,fullWidth:se=!1,getLimitTagsText:le=(e=>"+".concat(e)),getOptionLabel:ce,groupBy:ue,handleHomeEndKeys:de=!d.freeSolo,includeInputInList:pe=!1,limitTags:fe=-1,ListboxComponent:he="ul",ListboxProps:me,loading:ge=!1,loadingText:ve="Loading\u2026",multiple:be=!1,noOptionsText:ye="No options",openOnFocus:xe=!1,openText:we="Open",PaperComponent:_e=A.Z,PopperComponent:Se=y.Z,popupIcon:ke=W||(W=(0,Z.jsx)(z.Z,{})),readOnly:je=!1,renderGroup:Ze,renderInput:Ee,renderOption:Ce,renderTags:Ne,selectOnFocus:Ie=!d.freeSolo,size:Ae="medium",slotProps:Pe={}}=d,Oe=(0,r.Z)(d,$),{getRootProps:Te,getInputProps:Re,getInputLabelProps:Me,getPopupIndicatorProps:Le,getClearProps:De,getTagProps:ze,getListboxProps:Fe,getOptionProps:Be,value:Ue,dirty:We,expanded:He,id:$e,popupOpen:Ge,focused:Ve,focusedTag:qe,anchorEl:Ke,setAnchorEl:Ye,inputValue:Qe,groupedOptions:Xe}=v((0,o.Z)({},d,{componentName:"Autocomplete"})),Je=!I&&!T&&We&&!je,et=(!ie||!0===ae)&&!1!==ae,{onMouseDown:tt}=Re(),{ref:nt}=null!=me?me:{},rt=Fe(),{ref:ot}=rt,at=(0,r.Z)(rt,G),it=(0,H.Z)(ot,nt),st=ce||(e=>{var t;return null!=(t=e.label)?t:e}),lt=(0,o.Z)({},d,{disablePortal:L,expanded:He,focused:Ve,fullWidth:se,getOptionLabel:st,hasClearIcon:Je,hasPopupIcon:et,inputFocused:-1===qe,popupOpen:Ge,size:Ae}),ct=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:a,hasClearIcon:i,hasPopupIcon:l,inputFocused:c,popupOpen:u,size:d}=e,p={root:["root",r&&"expanded",o&&"focused",a&&"fullWidth",i&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",c&&"inputFocused"],tag:["tag","tagSize".concat((0,_.Z)(d))],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,s.Z)(p,F,t)})(lt);let ut;if(be&&Ue.length>0){const e=e=>(0,o.Z)({className:ct.tag,disabled:T},ze(e));ut=Ne?Ne(Ue,e,lt):Ue.map(((t,n)=>(0,Z.jsx)(O.Z,(0,o.Z)({label:st(t),size:Ae},e({index:n}),g))))}if(fe>-1&&Array.isArray(ut)){const e=ut.length-fe;!Ve&&e>0&&(ut=ut.splice(0,fe),ut.push((0,Z.jsx)("span",{className:ct.tag,children:le(e)},ut.length)))}const dt=Ze||(e=>(0,Z.jsxs)("li",{children:[(0,Z.jsx)(re,{className:ct.groupLabel,ownerState:lt,component:"div",children:e.group}),(0,Z.jsx)(oe,{className:ct.groupUl,ownerState:lt,children:e.children})]},e.key)),pt=Ce||((e,t)=>{const{key:n}=e,a=(0,r.Z)(e,V);return(0,Z.jsx)("li",(0,o.Z)({},a,{children:st(t)}),n)}),ft=(e,t)=>{const n=Be({option:e,index:t});return pt((0,o.Z)({},n,{className:ct.option}),e,{selected:n["aria-selected"],index:t,inputValue:Qe},lt)},ht=null!=(n=Pe.clearIndicator)?n:C.clearIndicator,mt=null!=(l=Pe.paper)?l:C.paper,gt=null!=(c=Pe.popper)?c:C.popper,vt=null!=(u=Pe.popupIndicator)?u:C.popupIndicator;return(0,Z.jsxs)(a.Fragment,{children:[(0,Z.jsx)(q,(0,o.Z)({ref:t,className:(0,i.Z)(ct.root,b),ownerState:lt},Te(Oe),{children:Ee({id:$e,disabled:T,fullWidth:!0,size:"small"===Ae?"small":void 0,InputLabelProps:Me(),InputProps:(0,o.Z)({ref:Ye,className:ct.inputRoot,startAdornment:ut,onClick:e=>{e.target===e.currentTarget&&tt(e)}},(Je||et)&&{endAdornment:(0,Z.jsxs)(K,{className:ct.endAdornment,ownerState:lt,children:[Je?(0,Z.jsx)(Y,(0,o.Z)({},De(),{"aria-label":j,title:j,ownerState:lt},ht,{className:(0,i.Z)(ct.clearIndicator,null==ht?void 0:ht.className),children:x})):null,et?(0,Z.jsx)(Q,(0,o.Z)({},Le(),{disabled:T,"aria-label":Ge?E:we,title:Ge?E:we,ownerState:lt},vt,{className:(0,i.Z)(ct.popupIndicator,null==vt?void 0:vt.className),children:ke})):null]})}),inputProps:(0,o.Z)({className:ct.input,disabled:T,readOnly:je},Re())})})),Ke?(0,Z.jsx)(X,(0,o.Z)({as:Se,disablePortal:L,style:{width:Ke?Ke.clientWidth:null},ownerState:lt,role:"presentation",anchorEl:Ke,open:Ge},gt,{className:(0,i.Z)(ct.popper,null==gt?void 0:gt.className),children:(0,Z.jsxs)(J,(0,o.Z)({ownerState:lt,as:_e},mt,{className:(0,i.Z)(ct.paper,null==mt?void 0:mt.className),children:[ge&&0===Xe.length?(0,Z.jsx)(ee,{className:ct.loading,ownerState:lt,children:ve}):null,0!==Xe.length||ie||ge?null:(0,Z.jsx)(te,{className:ct.noOptions,ownerState:lt,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:ye}),Xe.length>0?(0,Z.jsx)(ne,(0,o.Z)({as:he,className:ct.listbox,ownerState:lt},at,me,{ref:it,children:Xe.map(((e,t)=>ue?dt({key:e.key,group:e.group,children:e.options.map(((t,n)=>ft(t,e.index+n)))}):ft(e,t)))})):null]}))})):null]})}))},2739:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(6934),c=n(1402),u=n(627),d=n(5878),p=n(1217);function f(e){return(0,p.ZP)("MuiBackdrop",e)}(0,d.Z)("MuiBackdrop",["root","invisible"]);var h=n(184);const m=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],g=(0,l.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((e=>{let{ownerState:t}=e;return(0,o.Z)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})})),v=a.forwardRef((function(e,t){var n,a,l;const d=(0,c.Z)({props:e,name:"MuiBackdrop"}),{children:p,className:v,component:b="div",components:y={},componentsProps:x={},invisible:w=!1,open:_,slotProps:S={},slots:k={},TransitionComponent:j=u.Z,transitionDuration:Z}=d,E=(0,r.Z)(d,m),C=(0,o.Z)({},d,{component:b,invisible:w}),N=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,s.Z)(r,f,t)})(C),I=null!=(n=S.root)?n:x.root;return(0,h.jsx)(j,(0,o.Z)({in:_,timeout:Z},E,{children:(0,h.jsx)(g,(0,o.Z)({"aria-hidden":!0},I,{as:null!=(a=null!=(l=k.root)?l:y.Root)?a:b,className:(0,i.Z)(N.root,v,null==I?void 0:I.className),ownerState:(0,o.Z)({},C,null==I?void 0:I.ownerState),classes:N,ref:t,children:p}))}))}))},697:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(7462),o=n(3366),a=n(2791),i=n(831),s=n(2421),l=n(104),c=n(8519),u=n(418),d=n(184);const p=["className","component"];var f=n(5902),h=n(7291),m=n(988);const g=(0,n(5878).Z)("MuiBox",["root"]),v=(0,h.Z)(),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:f="MuiBox-root",generateClassName:h}=e,m=(0,s.ZP)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l.Z),g=a.forwardRef((function(e,a){const s=(0,u.Z)(n),l=(0,c.Z)(e),{className:g,component:v="div"}=l,b=(0,o.Z)(l,p);return(0,d.jsx)(m,(0,r.Z)({as:v,ref:a,className:(0,i.Z)(g,h?h(f):f),theme:t&&s[t]||s},b))}));return g}({themeId:m.Z,defaultTheme:v,defaultClassName:g.root,generateClassName:f.Z.generate}),y=b},4518:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Z});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(5735),l=n(4419),c=n(4402),u=n(6934),d=n(1402),p=n(3701),f=n(4036),h=n(5878),m=n(1217);function g(e){return(0,m.ZP)("MuiButton",e)}const v=(0,h.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var b=n(1793),y=n(6340),x=n(184);const w=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],_=e=>(0,o.Z)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),S=(0,u.ZP)(p.Z,{shouldForwardProp:e=>(0,u.FO)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,f.Z)(n.color))],t["size".concat((0,f.Z)(n.size))],t["".concat(n.variant,"Size").concat((0,f.Z)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((e=>{let{theme:t,ownerState:n}=e;var r,a;const i="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],s="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,o.Z)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,o.Z)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,c.Fq)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,c.Fq)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:"1px solid ".concat((t.vars||t).palette[n.color].main),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,c.Fq)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,o.Z)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(v.focusVisible)]:(0,o.Z)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(v.disabled)]:(0,o.Z)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.action.disabledBackground)},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?"1px solid rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):"1px solid ".concat((0,c.Fq)(t.palette[n.color].main,.5))},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(a=t.palette).getContrastText)?void 0:r.call(a,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})}),(e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(v.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(v.disabled)]:{boxShadow:"none"}}})),k=(0,u.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,f.Z)(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,o.Z)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},_(t))})),j=(0,u.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,f.Z)(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,o.Z)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},_(t))})),Z=a.forwardRef((function(e,t){const n=a.useContext(b.Z),c=a.useContext(y.Z),u=(0,s.Z)(n,e),p=(0,d.Z)({props:u,name:"MuiButton"}),{children:h,color:m="primary",component:v="button",className:_,disabled:Z=!1,disableElevation:E=!1,disableFocusRipple:C=!1,endIcon:N,focusVisibleClassName:I,fullWidth:A=!1,size:P="medium",startIcon:O,type:T,variant:R="text"}=p,M=(0,r.Z)(p,w),L=(0,o.Z)({},p,{color:m,component:v,disabled:Z,disableElevation:E,disableFocusRipple:C,fullWidth:A,size:P,type:T,variant:R}),D=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:a,variant:i,classes:s}=e,c={root:["root",i,"".concat(i).concat((0,f.Z)(t)),"size".concat((0,f.Z)(a)),"".concat(i,"Size").concat((0,f.Z)(a)),"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon","iconSize".concat((0,f.Z)(a))],endIcon:["endIcon","iconSize".concat((0,f.Z)(a))]},u=(0,l.Z)(c,g,s);return(0,o.Z)({},s,u)})(L),z=O&&(0,x.jsx)(k,{className:D.startIcon,ownerState:L,children:O}),F=N&&(0,x.jsx)(j,{className:D.endIcon,ownerState:L,children:N}),B=c||"";return(0,x.jsxs)(S,(0,o.Z)({ownerState:L,className:(0,i.Z)(n.className,D.root,_,B),component:v,disabled:Z,focusRipple:!C,focusVisibleClassName:(0,i.Z)(D.focusVisible,I),ref:t,type:T},M,{classes:D,children:[z,h,F]}))}))},3701:(e,t,n)=>{"use strict";n.d(t,{Z:()=>q});var r=n(7462),o=n(3366),a=n(2791),i=n(9278),s=n(4419),l=n(6934),c=n(1402),u=n(2071),d=n(9683),p=n(3031),f=n(168),h=n(7326),m=n(1721),g=n(5545);function v(e,t){var n=Object.create(null);return e&&a.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,a.isValidElement)(e)?t(e):e}(e)})),n}function b(e,t,n){return null!=n[t]?n[t]:e.props[t]}function y(e,t,n){var r=v(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var s={};for(var l in t){if(o[l])for(r=0;r{if(!c&&null!=u){const e=setTimeout(u,d);return()=>{clearTimeout(e)}}}),[u,c,d]),(0,k.jsx)("span",{className:h,style:m,children:(0,k.jsx)("span",{className:g})})};var Z=n(5878);const E=(0,Z.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var C,N,I,A;const P=["center","classes","className"];let O,T,R,M;const L=(0,S.F4)(O||(O=C||(C=(0,f.Z)(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),D=(0,S.F4)(T||(T=N||(N=(0,f.Z)(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),z=(0,S.F4)(R||(R=I||(I=(0,f.Z)(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),F=(0,l.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),B=(0,l.ZP)(j,{name:"MuiTouchRipple",slot:"Ripple"})(M||(M=A||(A=(0,f.Z)(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),E.rippleVisible,L,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),E.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),E.child,E.childLeaving,D,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),E.childPulsate,z,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),U=a.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiTouchRipple"}),{center:s=!1,classes:l={},className:u}=n,d=(0,o.Z)(n,P),[p,f]=a.useState([]),h=a.useRef(0),m=a.useRef(null);a.useEffect((()=>{m.current&&(m.current(),m.current=null)}),[p]);const g=a.useRef(!1),v=a.useRef(0),b=a.useRef(null),y=a.useRef(null);a.useEffect((()=>()=>{v.current&&clearTimeout(v.current)}),[]);const x=a.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;f((e=>[...e,(0,k.jsx)(B,{classes:{ripple:(0,i.Z)(l.ripple,E.ripple),rippleVisible:(0,i.Z)(l.rippleVisible,E.rippleVisible),ripplePulsate:(0,i.Z)(l.ripplePulsate,E.ripplePulsate),child:(0,i.Z)(l.child,E.child),childLeaving:(0,i.Z)(l.childLeaving,E.childLeaving),childPulsate:(0,i.Z)(l.childPulsate,E.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},h.current)])),h.current+=1,m.current=a}),[l]),w=a.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:r=!1,center:o=s||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&g.current)return void(g.current=!1);"touchstart"===(null==e?void 0:e.type)&&(g.current=!0);const i=a?null:y.current,l=i?i.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((i?i.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((i?i.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===b.current&&(b.current=()=>{x({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},v.current=setTimeout((()=>{b.current&&(b.current(),b.current=null)}),80)):x({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[s,x]),S=a.useCallback((()=>{w({},{pulsate:!0})}),[w]),j=a.useCallback(((e,t)=>{if(clearTimeout(v.current),"touchend"===(null==e?void 0:e.type)&&b.current)return b.current(),b.current=null,void(v.current=setTimeout((()=>{j(e,t)})));b.current=null,f((e=>e.length>0?e.slice(1):e)),m.current=t}),[]);return a.useImperativeHandle(t,(()=>({pulsate:S,start:w,stop:j})),[S,w,j]),(0,k.jsx)(F,(0,r.Z)({className:(0,i.Z)(E.root,l.root,u),ref:y},d,{children:(0,k.jsx)(_,{component:null,exit:!0,children:p})}))}));var W=n(1217);function H(e){return(0,W.ZP)("MuiButtonBase",e)}const $=(0,Z.Z)("MuiButtonBase",["root","disabled","focusVisible"]),G=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],V=(0,l.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat($.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),q=a.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiButtonBase"}),{action:l,centerRipple:f=!1,children:h,className:m,component:g="button",disabled:v=!1,disableRipple:b=!1,disableTouchRipple:y=!1,focusRipple:x=!1,LinkComponent:w="a",onBlur:_,onClick:S,onContextMenu:j,onDragLeave:Z,onFocus:E,onFocusVisible:C,onKeyDown:N,onKeyUp:I,onMouseDown:A,onMouseLeave:P,onMouseUp:O,onTouchEnd:T,onTouchMove:R,onTouchStart:M,tabIndex:L=0,TouchRippleProps:D,touchRippleRef:z,type:F}=n,B=(0,o.Z)(n,G),W=a.useRef(null),$=a.useRef(null),q=(0,u.Z)($,z),{isFocusVisibleRef:K,onFocus:Y,onBlur:Q,ref:X}=(0,p.Z)(),[J,ee]=a.useState(!1);v&&J&&ee(!1),a.useImperativeHandle(l,(()=>({focusVisible:()=>{ee(!0),W.current.focus()}})),[]);const[te,ne]=a.useState(!1);a.useEffect((()=>{ne(!0)}),[]);const re=te&&!b&&!v;function oe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;return(0,d.Z)((r=>{t&&t(r);return!n&&$.current&&$.current[e](r),!0}))}a.useEffect((()=>{J&&x&&!b&&te&&$.current.pulsate()}),[b,x,J,te]);const ae=oe("start",A),ie=oe("stop",j),se=oe("stop",Z),le=oe("stop",O),ce=oe("stop",(e=>{J&&e.preventDefault(),P&&P(e)})),ue=oe("start",M),de=oe("stop",T),pe=oe("stop",R),fe=oe("stop",(e=>{Q(e),!1===K.current&&ee(!1),_&&_(e)}),!1),he=(0,d.Z)((e=>{W.current||(W.current=e.currentTarget),Y(e),!0===K.current&&(ee(!0),C&&C(e)),E&&E(e)})),me=()=>{const e=W.current;return g&&"button"!==g&&!("A"===e.tagName&&e.href)},ge=a.useRef(!1),ve=(0,d.Z)((e=>{x&&!ge.current&&J&&$.current&&" "===e.key&&(ge.current=!0,$.current.stop(e,(()=>{$.current.start(e)}))),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),N&&N(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!v&&(e.preventDefault(),S&&S(e))})),be=(0,d.Z)((e=>{x&&" "===e.key&&$.current&&J&&!e.defaultPrevented&&(ge.current=!1,$.current.stop(e,(()=>{$.current.pulsate(e)}))),I&&I(e),S&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&S(e)}));let ye=g;"button"===ye&&(B.href||B.to)&&(ye=w);const xe={};"button"===ye?(xe.type=void 0===F?"button":F,xe.disabled=v):(B.href||B.to||(xe.role="button"),v&&(xe["aria-disabled"]=v));const we=(0,u.Z)(t,X,W);const _e=(0,r.Z)({},n,{centerRipple:f,component:g,disabled:v,disableRipple:b,disableTouchRipple:y,focusRipple:x,tabIndex:L,focusVisible:J}),Se=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a={root:["root",t&&"disabled",n&&"focusVisible"]},i=(0,s.Z)(a,H,o);return n&&r&&(i.root+=" ".concat(r)),i})(_e);return(0,k.jsxs)(V,(0,r.Z)({as:ye,className:(0,i.Z)(Se.root,m),ownerState:_e,onBlur:fe,onClick:S,onContextMenu:ie,onFocus:he,onKeyDown:ve,onKeyUp:be,onMouseDown:ae,onMouseLeave:ce,onMouseUp:le,onDragLeave:se,onTouchEnd:de,onTouchMove:pe,onTouchStart:ue,ref:we,tabIndex:v?-1:L,type:F},xe,B,{children:[h,re?(0,k.jsx)(U,(0,r.Z)({ref:q,center:f},D)):null]}))}))},6340:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(2791).createContext(void 0)},1793:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(2791).createContext({})},4454:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4402),c=n(7278),u=n(6189),d=n(184);const p=(0,u.Z)((0,d.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),f=(0,u.Z)((0,d.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,u.Z)((0,d.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var m=n(4036),g=n(1402),v=n(6934),b=n(5878),y=n(1217);function x(e){return(0,y.ZP)("MuiCheckbox",e)}const w=(0,b.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),_=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],S=(0,v.ZP)(c.Z,{shouldForwardProp:e=>(0,v.FO)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t["size".concat((0,m.Z)(n.size))],"default"!==n.color&&t["color".concat((0,m.Z)(n.color))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.Fq)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(w.checked,", &.").concat(w.indeterminate)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(w.disabled)]:{color:(t.vars||t).palette.action.disabled}})})),k=(0,d.jsx)(f,{}),j=(0,d.jsx)(p,{}),Z=(0,d.jsx)(h,{}),E=a.forwardRef((function(e,t){var n,l;const c=(0,g.Z)({props:e,name:"MuiCheckbox"}),{checkedIcon:u=k,color:p="primary",icon:f=j,indeterminate:h=!1,indeterminateIcon:v=Z,inputProps:b,size:y="medium",className:w}=c,E=(0,r.Z)(c,_),C=h?v:f,N=h?v:u,I=(0,o.Z)({},c,{color:p,indeterminate:h,size:y}),A=(e=>{const{classes:t,indeterminate:n,color:r,size:a}=e,i={root:["root",n&&"indeterminate","color".concat((0,m.Z)(r)),"size".concat((0,m.Z)(a))]},l=(0,s.Z)(i,x,t);return(0,o.Z)({},t,l)})(I);return(0,d.jsx)(S,(0,o.Z)({type:"checkbox",inputProps:(0,o.Z)({"data-indeterminate":h},b),icon:a.cloneElement(C,{fontSize:null!=(n=C.props.fontSize)?n:y}),checkedIcon:a.cloneElement(N,{fontSize:null!=(l=N.props.fontSize)?l:y}),ownerState:I,ref:t,className:(0,i.Z)(A.root,w)},E,{classes:A}))}))},1918:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4402),c=n(6189),u=n(184);const d=(0,c.Z)((0,u.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var p=n(2071),f=n(4036),h=n(3701),m=n(1402),g=n(6934),v=n(5878),b=n(1217);function y(e){return(0,b.ZP)("MuiChip",e)}const x=(0,v.Z)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),w=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],_=(0,g.ZP)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:a,onDelete:i,size:s,variant:l}=n;return[{["& .".concat(x.avatar)]:t.avatar},{["& .".concat(x.avatar)]:t["avatar".concat((0,f.Z)(s))]},{["& .".concat(x.avatar)]:t["avatarColor".concat((0,f.Z)(r))]},{["& .".concat(x.icon)]:t.icon},{["& .".concat(x.icon)]:t["icon".concat((0,f.Z)(s))]},{["& .".concat(x.icon)]:t["iconColor".concat((0,f.Z)(o))]},{["& .".concat(x.deleteIcon)]:t.deleteIcon},{["& .".concat(x.deleteIcon)]:t["deleteIcon".concat((0,f.Z)(s))]},{["& .".concat(x.deleteIcon)]:t["deleteIconColor".concat((0,f.Z)(r))]},{["& .".concat(x.deleteIcon)]:t["deleteIcon".concat((0,f.Z)(l),"Color").concat((0,f.Z)(r))]},t.root,t["size".concat((0,f.Z)(s))],t["color".concat((0,f.Z)(r))],a&&t.clickable,a&&"default"!==r&&t["clickableColor".concat((0,f.Z)(r),")")],i&&t.deletable,i&&"default"!==r&&t["deletableColor".concat((0,f.Z)(r))],t[l],t["".concat(l).concat((0,f.Z)(r))]]}})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,o.Z)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",["&.".concat(x.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["& .".concat(x.avatar)]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:r,fontSize:t.typography.pxToRem(12)},["& .".concat(x.avatarColorPrimary)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},["& .".concat(x.avatarColorSecondary)]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},["& .".concat(x.avatarSmall)]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},["& .".concat(x.icon)]:(0,o.Z)({marginLeft:5,marginRight:-6},"small"===n.size&&{fontSize:18,marginLeft:4,marginRight:-4},n.iconColor===n.color&&(0,o.Z)({color:t.vars?t.vars.palette.Chip.defaultIconColor:r},"default"!==n.color&&{color:"inherit"})),["& .".concat(x.deleteIcon)]:(0,o.Z)({WebkitTapHighlightColor:"transparent",color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.26)"):(0,l.Fq)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.4)"):(0,l.Fq)(t.palette.text.primary,.4)}},"small"===n.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==n.color&&{color:t.vars?"rgba(".concat(t.vars.palette[n.color].contrastTextChannel," / 0.7)"):(0,l.Fq)(t.palette[n.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].contrastText}})},"small"===n.size&&{height:24},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},n.onDelete&&{["&.".concat(x.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,l.Fq)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},n.onDelete&&"default"!==n.color&&{["&.".concat(x.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({},n.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,l.Fq)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},["&.".concat(x.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,l.Fq)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},n.clickable&&"default"!==n.color&&{["&:hover, &.".concat(x.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({},"outlined"===n.variant&&{backgroundColor:"transparent",border:t.vars?"1px solid ".concat(t.vars.palette.Chip.defaultBorder):"1px solid ".concat("light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]),["&.".concat(x.clickable,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(x.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["& .".concat(x.avatar)]:{marginLeft:4},["& .".concat(x.avatarSmall)]:{marginLeft:2},["& .".concat(x.icon)]:{marginLeft:4},["& .".concat(x.iconSmall)]:{marginLeft:2},["& .".concat(x.deleteIcon)]:{marginRight:5},["& .".concat(x.deleteIconSmall)]:{marginRight:3}},"outlined"===n.variant&&"default"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,l.Fq)(t.palette[n.color].main,.7)),["&.".concat(x.clickable,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.Fq)(t.palette[n.color].main,t.palette.action.hoverOpacity)},["&.".concat(x.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,l.Fq)(t.palette[n.color].main,t.palette.action.focusOpacity)},["& .".concat(x.deleteIcon)]:{color:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,l.Fq)(t.palette[n.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].main}}})})),S=(0,g.ZP)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t["label".concat((0,f.Z)(r))]]}})((e=>{let{ownerState:t}=e;return(0,o.Z)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===t.variant&&{paddingLeft:11,paddingRight:11},"small"===t.size&&{paddingLeft:8,paddingRight:8},"small"===t.size&&"outlined"===t.variant&&{paddingLeft:7,paddingRight:7})}));function k(e){return"Backspace"===e.key||"Delete"===e.key}const j=a.forwardRef((function(e,t){const n=(0,m.Z)({props:e,name:"MuiChip"}),{avatar:l,className:c,clickable:g,color:v="default",component:b,deleteIcon:x,disabled:j=!1,icon:Z,label:E,onClick:C,onDelete:N,onKeyDown:I,onKeyUp:A,size:P="medium",variant:O="filled",tabIndex:T,skipFocusWhenDisabled:R=!1}=n,M=(0,r.Z)(n,w),L=a.useRef(null),D=(0,p.Z)(L,t),z=e=>{e.stopPropagation(),N&&N(e)},F=!(!1===g||!C)||g,B=F||N?h.Z:b||"div",U=(0,o.Z)({},n,{component:B,disabled:j,size:P,color:v,iconColor:a.isValidElement(Z)&&Z.props.color||v,onDelete:!!N,clickable:F,variant:O}),W=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:a,onDelete:i,clickable:l,variant:c}=e,u={root:["root",c,n&&"disabled","size".concat((0,f.Z)(r)),"color".concat((0,f.Z)(o)),l&&"clickable",l&&"clickableColor".concat((0,f.Z)(o)),i&&"deletable",i&&"deletableColor".concat((0,f.Z)(o)),"".concat(c).concat((0,f.Z)(o))],label:["label","label".concat((0,f.Z)(r))],avatar:["avatar","avatar".concat((0,f.Z)(r)),"avatarColor".concat((0,f.Z)(o))],icon:["icon","icon".concat((0,f.Z)(r)),"iconColor".concat((0,f.Z)(a))],deleteIcon:["deleteIcon","deleteIcon".concat((0,f.Z)(r)),"deleteIconColor".concat((0,f.Z)(o)),"deleteIcon".concat((0,f.Z)(c),"Color").concat((0,f.Z)(o))]};return(0,s.Z)(u,y,t)})(U),H=B===h.Z?(0,o.Z)({component:b||"div",focusVisibleClassName:W.focusVisible},N&&{disableRipple:!0}):{};let $=null;N&&($=x&&a.isValidElement(x)?a.cloneElement(x,{className:(0,i.Z)(x.props.className,W.deleteIcon),onClick:z}):(0,u.jsx)(d,{className:(0,i.Z)(W.deleteIcon),onClick:z}));let G=null;l&&a.isValidElement(l)&&(G=a.cloneElement(l,{className:(0,i.Z)(W.avatar,l.props.className)}));let V=null;return Z&&a.isValidElement(Z)&&(V=a.cloneElement(Z,{className:(0,i.Z)(W.icon,Z.props.className)})),(0,u.jsxs)(_,(0,o.Z)({as:B,className:(0,i.Z)(W.root,c),disabled:!(!F||!j)||void 0,onClick:C,onKeyDown:e=>{e.currentTarget===e.target&&k(e)&&e.preventDefault(),I&&I(e)},onKeyUp:e=>{e.currentTarget===e.target&&(N&&k(e)?N(e):"Escape"===e.key&&L.current&&L.current.blur()),A&&A(e)},ref:D,tabIndex:R&&j?-1:T,ownerState:U},H,M,{children:[G||V,(0,u.jsx)(S,{className:(0,i.Z)(W.label),ownerState:U,children:E}),$]}))}))},5289:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(8252),c=n(4036),u=n(9095),d=n(627),p=n(5527),f=n(1402),h=n(6934),m=n(5878),g=n(1217);function v(e){return(0,g.ZP)("MuiDialog",e)}const b=(0,m.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var y=n(5090),x=n(2739),w=n(3967),_=n(184);const S=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],k=(0,h.ZP)(x.Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),j=(0,h.ZP)(u.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Z=(0,h.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t["scroll".concat((0,c.Z)(n.scroll))]]}})((e=>{let{ownerState:t}=e;return(0,o.Z)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})})),E=(0,h.ZP)(p.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t["scrollPaper".concat((0,c.Z)(n.scroll))],t["paperWidth".concat((0,c.Z)(String(n.maxWidth)))],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):"max(".concat(t.breakpoints.values.xs).concat(t.breakpoints.unit,", 444px)"),["&.".concat(b.paperScrollBody)]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},n.maxWidth&&"xs"!==n.maxWidth&&{maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit),["&.".concat(b.paperScrollBody)]:{[t.breakpoints.down(t.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,["&.".concat(b.paperScrollBody)]:{margin:0,maxWidth:"100%"}})})),C=a.forwardRef((function(e,t){const n=(0,f.Z)({props:e,name:"MuiDialog"}),u=(0,w.Z)(),h={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{"aria-describedby":m,"aria-labelledby":g,BackdropComponent:b,BackdropProps:x,children:C,className:N,disableEscapeKeyDown:I=!1,fullScreen:A=!1,fullWidth:P=!1,maxWidth:O="sm",onBackdropClick:T,onClose:R,open:M,PaperComponent:L=p.Z,PaperProps:D={},scroll:z="paper",TransitionComponent:F=d.Z,transitionDuration:B=h,TransitionProps:U}=n,W=(0,r.Z)(n,S),H=(0,o.Z)({},n,{disableEscapeKeyDown:I,fullScreen:A,fullWidth:P,maxWidth:O,scroll:z}),$=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e,i={root:["root"],container:["container","scroll".concat((0,c.Z)(n))],paper:["paper","paperScroll".concat((0,c.Z)(n)),"paperWidth".concat((0,c.Z)(String(r))),o&&"paperFullWidth",a&&"paperFullScreen"]};return(0,s.Z)(i,v,t)})(H),G=a.useRef(),V=(0,l.Z)(g),q=a.useMemo((()=>({titleId:V})),[V]);return(0,_.jsx)(j,(0,o.Z)({className:(0,i.Z)($.root,N),closeAfterTransition:!0,components:{Backdrop:k},componentsProps:{backdrop:(0,o.Z)({transitionDuration:B,as:b},x)},disableEscapeKeyDown:I,onClose:R,open:M,ref:t,onClick:e=>{G.current&&(G.current=null,T&&T(e),R&&R(e,"backdropClick"))},ownerState:H},W,{children:(0,_.jsx)(F,(0,o.Z)({appear:!0,in:M,timeout:B,role:"presentation"},U,{children:(0,_.jsx)(Z,{className:(0,i.Z)($.container),onMouseDown:e=>{G.current=e.target===e.currentTarget},ownerState:H,children:(0,_.jsx)(E,(0,o.Z)({as:L,elevation:24,role:"dialog","aria-describedby":m,"aria-labelledby":V},D,{className:(0,i.Z)($.paper,D.className),ownerState:H,children:(0,_.jsx)(y.Z.Provider,{value:q,children:C})}))})}))}))}))},5090:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(2791).createContext({})},133:(e,t,n)=>{"use strict";n.d(t,{V:()=>a,Z:()=>i});var r=n(5878),o=n(1217);function a(e){return(0,o.ZP)("MuiDivider",e)}const i=(0,r.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"])},627:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(7462),o=n(3366),a=n(2791),i=n(6752),s=n(3967),l=n(4999),c=n(2071),u=n(184);const d=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],p={entering:{opacity:1},entered:{opacity:1}},f=a.forwardRef((function(e,t){const n=(0,s.Z)(),f={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:h,appear:m=!0,children:g,easing:v,in:b,onEnter:y,onEntered:x,onEntering:w,onExit:_,onExited:S,onExiting:k,style:j,timeout:Z=f,TransitionComponent:E=i.ZP}=e,C=(0,o.Z)(e,d),N=a.useRef(null),I=(0,c.Z)(N,g.ref,t),A=e=>t=>{if(e){const n=N.current;void 0===t?e(n):e(n,t)}},P=A(w),O=A(((e,t)=>{(0,l.n)(e);const r=(0,l.C)({style:j,timeout:Z,easing:v},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),y&&y(e,t)})),T=A(x),R=A(k),M=A((e=>{const t=(0,l.C)({style:j,timeout:Z,easing:v},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),_&&_(e)})),L=A(S);return(0,u.jsx)(E,(0,r.Z)({appear:m,in:b,nodeRef:N,onEnter:O,onEntered:T,onEntering:P,onExit:M,onExited:L,onExiting:R,addEndListener:e=>{h&&h(N.current,e)},timeout:Z},C,{children:(e,t)=>a.cloneElement(g,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||b?void 0:"hidden"},p[e],j,g.props.style),ref:I},t))}))}))},6596:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(3366),o=n(7462),a=n(2791),i=n(2466),s=n(4419),l=n(4834),c=n(6934),u=n(1402),d=n(6285),p=n(184);const f=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],h=(0,c.ZP)(l.Ej,{shouldForwardProp:e=>(0,c.FO)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,l.Gx)(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;var r;const a="light"===t.palette.mode,i=a?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=a?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",l=a?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",c=a?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,o.Z)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:l,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},["&.".concat(d.Z.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},["&.".concat(d.Z.disabled)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:c}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(d.Z.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(d.Z.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")"):i),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(d.Z.disabled,", .").concat(d.Z.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(d.Z.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,o.Z)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))})),m=(0,c.ZP)(l.rA,{name:"MuiFilledInput",slot:"Input",overridesResolver:l._o})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})})),g=a.forwardRef((function(e,t){var n,a,c,g;const v=(0,u.Z)({props:e,name:"MuiFilledInput"}),{components:b={},componentsProps:y,fullWidth:x=!1,inputComponent:w="input",multiline:_=!1,slotProps:S,slots:k={},type:j="text"}=v,Z=(0,r.Z)(v,f),E=(0,o.Z)({},v,{fullWidth:x,inputComponent:w,multiline:_,type:j}),C=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},a=(0,s.Z)(r,d._,t);return(0,o.Z)({},t,a)})(v),N={root:{ownerState:E},input:{ownerState:E}},I=(null!=S?S:y)?(0,i.Z)(N,null!=S?S:y):N,A=null!=(n=null!=(a=k.root)?a:b.Root)?n:h,P=null!=(c=null!=(g=k.input)?g:b.Input)?c:m;return(0,p.jsx)(l.ZP,(0,o.Z)({slots:{root:A,input:P},componentsProps:I,fullWidth:x,inputComponent:w,multiline:_,ref:t,type:j},Z,{classes:C}))}));g.muiName="Input";const v=g},6285:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l,_:()=>s});var r=n(7462),o=n(5878),a=n(1217),i=n(5891);function s(e){return(0,a.ZP)("MuiFilledInput",e)}const l=(0,r.Z)({},i.Z,(0,o.Z)("MuiFilledInput",["root","underline","input"]))},3840:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(2791).createContext(void 0)},6147:(e,t,n)=>{"use strict";function r(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce(((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e)),{})}n.d(t,{Z:()=>r})},2930:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2791),o=n(3840);function a(){return r.useContext(o.Z)}},2114:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(2930),c=n(831),u=n(2466),d=n(1217);const p=(0,n(4046).ZP)();var f=n(7078),h=n(8519),m=n(5080),g=n(1184),v=n(5682),b=n(184);const y=["component","direction","spacing","divider","children","className","useFlexGap"],x=(0,m.Z)(),w=p("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function _(e){return(0,f.Z)({props:e,name:"MuiStack",defaultTheme:x})}function S(e,t){const n=a.Children.toArray(e).filter(Boolean);return n.reduce(((e,r,o)=>(e.push(r),o{let{ownerState:t,theme:n}=e,r=(0,o.Z)({display:"flex",flexDirection:"column"},(0,g.k9)({theme:n},(0,g.P$)({values:t.direction,breakpoints:n.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,v.hB)(n),o=Object.keys(n.breakpoints.values).reduce(((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e)),{}),a=(0,g.P$)({values:t.direction,base:o}),i=(0,g.P$)({values:t.spacing,base:o});"object"===typeof a&&Object.keys(a).forEach(((e,t,n)=>{if(!a[e]){const r=t>0?a[n[t-1]]:"column";a[e]=r}}));const s=(n,r)=>{return t.useFlexGap?{gap:(0,v.NA)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{["margin".concat((o=r?a[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]))]:(0,v.NA)(e,n)}};var o};r=(0,u.Z)(r,(0,g.k9)({theme:n},i,s))}return r=(0,g.dt)(n.breakpoints,r),r};var j=n(6934),Z=n(1402);const E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=w,useThemeProps:n=_,componentName:i="MuiStack"}=e,l=()=>(0,s.Z)({root:["root"]},(e=>(0,d.ZP)(i,e)),{}),u=t(k),p=a.forwardRef((function(e,t){const a=n(e),i=(0,h.Z)(a),{component:s="div",direction:d="column",spacing:p=0,divider:f,children:m,className:g,useFlexGap:v=!1}=i,x=(0,r.Z)(i,y),w={direction:d,spacing:p,useFlexGap:v},_=l();return(0,b.jsx)(u,(0,o.Z)({as:s,ownerState:w,ref:t,className:(0,c.Z)(_.root,g)},x,{children:f?S(m,f):m}))}));return p}({createStyledComponent:(0,j.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,Z.Z)({props:e,name:"MuiStack"})}),C=E;var N=n(890),I=n(4036);function A(e){return(0,d.ZP)("MuiFormControlLabel",e)}const P=(0,n(5878).Z)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);var O=n(6147);const T=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],R=(0,j.ZP)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(P.label)]:t.label},t.root,t["labelPlacement".concat((0,I.Z)(n.labelPlacement))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(P.disabled)]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(P.label)]:{["&.".concat(P.disabled)]:{color:(t.vars||t).palette.text.disabled}}})})),M=(0,j.ZP)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(P.error)]:{color:(t.vars||t).palette.error.main}}})),L=a.forwardRef((function(e,t){var n,c;const u=(0,Z.Z)({props:e,name:"MuiFormControlLabel"}),{className:d,componentsProps:p={},control:f,disabled:h,disableTypography:m,label:g,labelPlacement:v="end",required:y,slotProps:x={}}=u,w=(0,r.Z)(u,T),_=(0,l.Z)(),S=null!=(n=null!=h?h:f.props.disabled)?n:null==_?void 0:_.disabled,k=null!=y?y:f.props.required,j={disabled:S,required:k};["checked","name","onChange","value","inputRef"].forEach((e=>{"undefined"===typeof f.props[e]&&"undefined"!==typeof u[e]&&(j[e]=u[e])}));const E=(0,O.Z)({props:u,muiFormControl:_,states:["error"]}),P=(0,o.Z)({},u,{disabled:S,labelPlacement:v,required:k,error:E.error}),L=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:a}=e,i={root:["root",n&&"disabled","labelPlacement".concat((0,I.Z)(r)),o&&"error",a&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,s.Z)(i,A,t)})(P),D=null!=(c=x.typography)?c:p.typography;let z=g;return null==z||z.type===N.Z||m||(z=(0,b.jsx)(N.Z,(0,o.Z)({component:"span"},D,{className:(0,i.Z)(L.label,null==D?void 0:D.className),children:z}))),(0,b.jsxs)(R,(0,o.Z)({className:(0,i.Z)(L.root,d),ownerState:P,ref:t},w,{children:[a.cloneElement(f,j),k?(0,b.jsxs)(C,{display:"block",children:[z,(0,b.jsxs)(M,{ownerState:P,"aria-hidden":!0,className:L.asterisk,children:["\u2009","*"]})]}):z]}))}))},6199:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(7462),o=(n(2791),n(2554)),a=n(184);function i(e){const{styles:t,defaultTheme:n={}}=e,r="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,a.jsx)(o.xB,{styles:r})}var s=n(418);const l=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const o=(0,s.Z)(r),l="function"===typeof t?t(n&&o[n]||o):t;return(0,a.jsx)(i,{styles:l})};var c=n(6482),u=n(988);const d=function(e){return(0,a.jsx)(l,(0,r.Z)({},e,{defaultTheme:c.Z,themeId:u.Z}))}},1889:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>Z});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(1184),l=n(8519),c=n(4419),u=n(6934),d=n(1402),p=n(3967);const f=a.createContext();var h=n(5878),m=n(1217);function g(e){return(0,m.ZP)("MuiGrid",e)}const v=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],b=(0,h.Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>"spacing-xs-".concat(e))),...["column-reverse","column","row-reverse","row"].map((e=>"direction-xs-".concat(e))),...["nowrap","wrap-reverse","wrap"].map((e=>"wrap-xs-".concat(e))),...v.map((e=>"grid-xs-".concat(e))),...v.map((e=>"grid-sm-".concat(e))),...v.map((e=>"grid-md-".concat(e))),...v.map((e=>"grid-lg-".concat(e))),...v.map((e=>"grid-xl-".concat(e)))]);var y=n(184);const x=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function w(e){const t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function _(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach((e=>{""===r&&0!==n[e]&&(r=e)}));const o=Object.keys(t).sort(((e,n)=>t[e]-t[n]));return o.slice(0,o.indexOf(r))}const S=(0,u.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:a,spacing:i,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n["spacing-xs-".concat(String(e))]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n["spacing-".concat(t,"-").concat(String(o))])})),r}(i,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t["grid-".concat(e,"-").concat(String(r))])})),[t.root,r&&t.container,a&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t["direction-xs-".concat(String(o))],"wrap"!==s&&t["wrap-xs-".concat(String(s))],...d]}})((e=>{let{ownerState:t}=e;return(0,o.Z)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})}),(function(e){let{theme:t,ownerState:n}=e;const r=(0,s.P$)({values:n.direction,breakpoints:t.breakpoints.values});return(0,s.k9)({theme:t},r,(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(b.item)]={maxWidth:"none"}),t}))}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:o}=n;let a={};if(r&&0!==o){const e=(0,s.P$)({values:o,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=_({breakpoints:t.breakpoints.values,values:e})),a=(0,s.k9)({theme:t},e,((e,r)=>{var o;const a=t.spacing(e);return"0px"!==a?{marginTop:"-".concat(w(a)),["& > .".concat(b.item)]:{paddingTop:w(a)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,["& > .".concat(b.item)]:{paddingTop:0}}}))}return a}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:o}=n;let a={};if(r&&0!==o){const e=(0,s.P$)({values:o,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=_({breakpoints:t.breakpoints.values,values:e})),a=(0,s.k9)({theme:t},e,((e,r)=>{var o;const a=t.spacing(e);return"0px"!==a?{width:"calc(100% + ".concat(w(a),")"),marginLeft:"-".concat(w(a)),["& > .".concat(b.item)]:{paddingLeft:w(a)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,["& > .".concat(b.item)]:{paddingLeft:0}}}))}return a}),(function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce(((e,a)=>{let i={};if(r[a]&&(t=r[a]),!t)return e;if(!0===t)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const l=(0,s.P$)({values:r.columns,breakpoints:n.breakpoints.values}),c="object"===typeof l?l[a]:l;if(void 0===c||null===c)return e;const u="".concat(Math.round(t/c*1e8)/1e6,"%");let d={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t="calc(".concat(u," + ").concat(w(e),")");d={flexBasis:t,maxWidth:t}}}i=(0,o.Z)({flexBasis:u,flexGrow:0,maxWidth:u},d)}return 0===n.breakpoints.values[a]?Object.assign(e,i):e[n.breakpoints.up(a)]=i,e}),{})}));const k=e=>{const{classes:t,container:n,direction:r,item:o,spacing:a,wrap:i,zeroMinWidth:s,breakpoints:l}=e;let u=[];n&&(u=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return["spacing-xs-".concat(String(e))];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e="spacing-".concat(t,"-").concat(String(r));n.push(e)}})),n}(a,l));const d=[];l.forEach((t=>{const n=e[t];n&&d.push("grid-".concat(t,"-").concat(String(n)))}));const p={root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...u,"row"!==r&&"direction-xs-".concat(String(r)),"wrap"!==i&&"wrap-xs-".concat(String(i)),...d]};return(0,c.Z)(p,g,t)},j=a.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiGrid"}),{breakpoints:s}=(0,p.Z)(),c=(0,l.Z)(n),{className:u,columns:h,columnSpacing:m,component:g="div",container:v=!1,direction:b="row",item:w=!1,rowSpacing:_,spacing:j=0,wrap:Z="wrap",zeroMinWidth:E=!1}=c,C=(0,r.Z)(c,x),N=_||j,I=m||j,A=a.useContext(f),P=v?h||12:A,O={},T=(0,o.Z)({},C);s.keys.forEach((e=>{null!=C[e]&&(O[e]=C[e],delete T[e])}));const R=(0,o.Z)({},c,{columns:P,container:v,direction:b,item:w,rowSpacing:N,columnSpacing:I,wrap:Z,zeroMinWidth:E,spacing:j},O,{breakpoints:s.keys}),M=k(R);return(0,y.jsx)(f.Provider,{value:P,children:(0,y.jsx)(S,(0,o.Z)({ownerState:R,className:(0,i.Z)(M.root,u),as:g,ref:t},T))})}));const Z=j},3208:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(7462),o=n(3366),a=n(2791),i=n(6752),s=n(3967),l=n(4999),c=n(2071),u=n(184);const d=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function p(e){return"scale(".concat(e,", ").concat(e**2,")")}const f={entering:{opacity:1,transform:p(1)},entered:{opacity:1,transform:"none"}},h="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),m=a.forwardRef((function(e,t){const{addEndListener:n,appear:m=!0,children:g,easing:v,in:b,onEnter:y,onEntered:x,onEntering:w,onExit:_,onExited:S,onExiting:k,style:j,timeout:Z="auto",TransitionComponent:E=i.ZP}=e,C=(0,o.Z)(e,d),N=a.useRef(),I=a.useRef(),A=(0,s.Z)(),P=a.useRef(null),O=(0,c.Z)(P,g.ref,t),T=e=>t=>{if(e){const n=P.current;void 0===t?e(n):e(n,t)}},R=T(w),M=T(((e,t)=>{(0,l.n)(e);const{duration:n,delay:r,easing:o}=(0,l.C)({style:j,timeout:Z,easing:v},{mode:"enter"});let a;"auto"===Z?(a=A.transitions.getAutoHeightDuration(e.clientHeight),I.current=a):a=n,e.style.transition=[A.transitions.create("opacity",{duration:a,delay:r}),A.transitions.create("transform",{duration:h?a:.666*a,delay:r,easing:o})].join(","),y&&y(e,t)})),L=T(x),D=T(k),z=T((e=>{const{duration:t,delay:n,easing:r}=(0,l.C)({style:j,timeout:Z,easing:v},{mode:"exit"});let o;"auto"===Z?(o=A.transitions.getAutoHeightDuration(e.clientHeight),I.current=o):o=t,e.style.transition=[A.transitions.create("opacity",{duration:o,delay:n}),A.transitions.create("transform",{duration:h?o:.666*o,delay:h?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=p(.75),_&&_(e)})),F=T(S);return a.useEffect((()=>()=>{clearTimeout(N.current)}),[]),(0,u.jsx)(E,(0,r.Z)({appear:m,in:b,nodeRef:P,onEnter:M,onEntered:L,onEntering:R,onExit:z,onExited:F,onExiting:D,addEndListener:e=>{"auto"===Z&&(N.current=setTimeout(e,I.current||0)),n&&n(P.current,e)},timeout:"auto"===Z?null:Z},C,{children:(e,t)=>a.cloneElement(g,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:p(.75),visibility:"exited"!==e||b?void 0:"hidden"},f[e],j,g.props.style),ref:O},t))}))}));m.muiSupportAuto=!0;const g=m},3400:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4402),c=n(6934),u=n(1402),d=n(3701),p=n(4036),f=n(5878),h=n(1217);function m(e){return(0,h.ZP)("MuiIconButton",e)}const g=(0,f.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var v=n(184);const b=["edge","children","className","color","disabled","disableFocusRipple","size"],y=(0,c.ZP)(d.Z,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,p.Z)(n.color))],n.edge&&t["edge".concat((0,p.Z)(n.edge))],t["size".concat((0,p.Z)(n.size))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(e=>{let{theme:t,ownerState:n}=e;var r;const a=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,o.Z)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,o.Z)({color:null==a?void 0:a.main},!n.disableRipple&&{"&:hover":(0,o.Z)({},a&&{backgroundColor:t.vars?"rgba(".concat(a.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.Fq)(a.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(g.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),x=a.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiIconButton"}),{edge:a=!1,children:l,className:c,color:d="default",disabled:f=!1,disableFocusRipple:h=!1,size:g="medium"}=n,x=(0,r.Z)(n,b),w=(0,o.Z)({},n,{edge:a,color:d,disabled:f,disableFocusRipple:h,size:g}),_=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:a}=e,i={root:["root",n&&"disabled","default"!==r&&"color".concat((0,p.Z)(r)),o&&"edge".concat((0,p.Z)(o)),"size".concat((0,p.Z)(a))]};return(0,s.Z)(i,m,t)})(w);return(0,v.jsx)(y,(0,o.Z)({className:(0,i.Z)(_.root,c),centerRipple:!0,focusRipple:!h,disabled:f,ref:t,ownerState:w},x,{children:l}))}))},4110:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(3366),o=n(7462),a=n(2791),i=n(4419),s=n(2466),l=n(4834),c=n(6934),u=n(1402),d=n(6779),p=n(184);const f=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],h=(0,c.ZP)(l.Ej,{shouldForwardProp:e=>(0,c.FO)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,l.Gx)(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,o.Z)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[n.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(d.Z.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(d.Z.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(d.Z.disabled,", .").concat(d.Z.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},["&.".concat(d.Z.disabled,":before")]:{borderBottomStyle:"dotted"}})})),m=(0,c.ZP)(l.rA,{name:"MuiInput",slot:"Input",overridesResolver:l._o})({}),g=a.forwardRef((function(e,t){var n,a,c,g;const v=(0,u.Z)({props:e,name:"MuiInput"}),{disableUnderline:b,components:y={},componentsProps:x,fullWidth:w=!1,inputComponent:_="input",multiline:S=!1,slotProps:k,slots:j={},type:Z="text"}=v,E=(0,r.Z)(v,f),C=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},a=(0,i.Z)(r,d.l,t);return(0,o.Z)({},t,a)})(v),N={root:{ownerState:{disableUnderline:b}}},I=(null!=k?k:x)?(0,s.Z)(null!=k?k:x,N):N,A=null!=(n=null!=(a=j.root)?a:y.Root)?n:h,P=null!=(c=null!=(g=j.input)?g:y.Input)?c:m;return(0,p.jsx)(l.ZP,(0,o.Z)({slots:{root:A,input:P},slotProps:I,fullWidth:w,inputComponent:_,multiline:S,ref:t,type:Z},E,{classes:C}))}));g.muiName="Input";const v=g},6779:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l,l:()=>s});var r=n(7462),o=n(5878),a=n(1217),i=n(5891);function s(e){return(0,a.ZP)("MuiInput",e)}const l=(0,r.Z)({},i.Z,(0,o.Z)("MuiInput",["root","underline","input"]))},3466:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4036),c=n(890),u=n(3840),d=n(2930),p=n(6934),f=n(5878),h=n(1217);function m(e){return(0,h.ZP)("MuiInputAdornment",e)}const g=(0,f.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var v,b=n(1402),y=n(184);const x=["children","className","component","disablePointerEvents","disableTypography","position","variant"],w=(0,p.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,l.Z)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(g.positionStart,"&:not(.").concat(g.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),_=a.forwardRef((function(e,t){const n=(0,b.Z)({props:e,name:"MuiInputAdornment"}),{children:p,className:f,component:h="div",disablePointerEvents:g=!1,disableTypography:_=!1,position:S,variant:k}=n,j=(0,r.Z)(n,x),Z=(0,d.Z)()||{};let E=k;k&&Z.variant,Z&&!E&&(E=Z.variant);const C=(0,o.Z)({},n,{hiddenLabel:Z.hiddenLabel,size:Z.size,disablePointerEvents:g,position:S,variant:E}),N=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:a,variant:i}=e,c={root:["root",n&&"disablePointerEvents",o&&"position".concat((0,l.Z)(o)),i,r&&"hiddenLabel",a&&"size".concat((0,l.Z)(a))]};return(0,s.Z)(c,m,t)})(C);return(0,y.jsx)(u.Z.Provider,{value:null,children:(0,y.jsx)(w,(0,o.Z)({as:h,ownerState:C,className:(0,i.Z)(N.root,f),ref:t},j,{children:"string"!==typeof p||_?(0,y.jsxs)(a.Fragment,{children:["start"===S?v||(v=(0,y.jsx)("span",{className:"notranslate",children:"\u200b"})):null,p]}):(0,y.jsx)(c.Z,{color:"text.secondary",children:p})}))})}))},4834:(e,t,n)=>{"use strict";n.d(t,{rA:()=>M,Ej:()=>R,ZP:()=>D,_o:()=>T,Gx:()=>O});var r=n(3366),o=n(7462),a=n(6187),i=n(2791),s=n(9278),l=n(4419),c=n(4164),u=n(6117),d=n(5202),p=n(2876),f=n(2254),h=n(184);const m=["onChange","maxRows","minRows","style","value"];function g(e){return parseInt(e,10)||0}const v={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function b(e){return void 0===e||null===e||0===Object.keys(e).length||0===e.outerHeightStyle&&!e.overflow}const y=i.forwardRef((function(e,t){const{onChange:n,maxRows:a,minRows:s=1,style:l,value:y}=e,x=(0,r.Z)(e,m),{current:w}=i.useRef(null!=y),_=i.useRef(null),S=(0,u.Z)(t,_),k=i.useRef(null),j=i.useRef(0),[Z,E]=i.useState({outerHeightStyle:0}),C=i.useCallback((()=>{const t=_.current,n=(0,d.Z)(t).getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0};const r=k.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");const o=n.boxSizing,i=g(n.paddingBottom)+g(n.paddingTop),l=g(n.borderBottomWidth)+g(n.borderTopWidth),c=r.scrollHeight;r.value="x";const u=r.scrollHeight;let p=c;s&&(p=Math.max(Number(s)*u,p)),a&&(p=Math.min(Number(a)*u,p)),p=Math.max(p,u);return{outerHeightStyle:p+("border-box"===o?i+l:0),overflow:Math.abs(p-c)<=1}}),[a,s,e.placeholder]),N=(e,t)=>{const{outerHeightStyle:n,overflow:r}=t;return j.current<20&&(n>0&&Math.abs((e.outerHeightStyle||0)-n)>1||e.overflow!==r)?(j.current+=1,{overflow:r,outerHeightStyle:n}):e},I=i.useCallback((()=>{const e=C();b(e)||E((t=>N(t,e)))}),[C]);(0,p.Z)((()=>{const e=()=>{j.current=0,(()=>{const e=C();b(e)||c.flushSync((()=>{E((t=>N(t,e)))}))})()};let t;const n=(0,f.Z)(e),r=_.current,o=(0,d.Z)(r);let a;return o.addEventListener("resize",n),"undefined"!==typeof ResizeObserver&&(a=new ResizeObserver(e),a.observe(r)),()=>{n.clear(),cancelAnimationFrame(t),o.removeEventListener("resize",n),a&&a.disconnect()}}),[C]),(0,p.Z)((()=>{I()})),i.useEffect((()=>{j.current=0}),[y]);return(0,h.jsxs)(i.Fragment,{children:[(0,h.jsx)("textarea",(0,o.Z)({value:y,onChange:e=>{j.current=0,w||I(),n&&n(e)},ref:S,rows:s,style:(0,o.Z)({height:Z.outerHeightStyle,overflow:Z.overflow?"hidden":void 0},l)},x)),(0,h.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:k,tabIndex:-1,style:(0,o.Z)({},v,l,{paddingTop:0,paddingBottom:0})})]})}));var x=n(6897),w=n(6147),_=n(3840),S=n(2930),k=n(6934),j=n(1402),Z=n(4036),E=n(2071),C=n(162),N=n(6199),I=n(5470),A=n(5891);const P=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],O=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat((0,Z.Z)(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},T=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},R=(0,k.ZP)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:O})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",["&.".concat(A.Z.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,o.Z)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})})),M=(0,k.ZP)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:T})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,a=(0,o.Z)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,o.Z)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":a,"&::-moz-placeholder":a,"&:-ms-input-placeholder":a,"&::-ms-input-placeholder":a,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(A.Z.formControl," &")]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s},["&.".concat(A.Z.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})})),L=(0,h.jsx)(N.Z,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),D=i.forwardRef((function(e,t){var n;const c=(0,j.Z)({props:e,name:"MuiInputBase"}),{"aria-describedby":u,autoComplete:d,autoFocus:p,className:f,components:m={},componentsProps:g={},defaultValue:v,disabled:b,disableInjectingGlobalStyles:k,endAdornment:N,fullWidth:O=!1,id:T,inputComponent:D="input",inputProps:z={},inputRef:F,maxRows:B,minRows:U,multiline:W=!1,name:H,onBlur:$,onChange:G,onClick:V,onFocus:q,onKeyDown:K,onKeyUp:Y,placeholder:Q,readOnly:X,renderSuffix:J,rows:ee,slotProps:te={},slots:ne={},startAdornment:re,type:oe="text",value:ae}=c,ie=(0,r.Z)(c,P),se=null!=z.value?z.value:ae,{current:le}=i.useRef(null!=se),ce=i.useRef(),ue=i.useCallback((e=>{0}),[]),de=(0,E.Z)(ce,F,z.ref,ue),[pe,fe]=i.useState(!1),he=(0,S.Z)();const me=(0,w.Z)({props:c,muiFormControl:he,states:["color","disabled","error","hiddenLabel","size","required","filled"]});me.focused=he?he.focused:pe,i.useEffect((()=>{!he&&b&&pe&&(fe(!1),$&&$())}),[he,b,pe,$]);const ge=he&&he.onFilled,ve=he&&he.onEmpty,be=i.useCallback((e=>{(0,I.vd)(e)?ge&&ge():ve&&ve()}),[ge,ve]);(0,C.Z)((()=>{le&&be({value:se})}),[se,be,le]);i.useEffect((()=>{be(ce.current)}),[]);let ye=D,xe=z;W&&"input"===ye&&(xe=ee?(0,o.Z)({type:void 0,minRows:ee,maxRows:ee},xe):(0,o.Z)({type:void 0,maxRows:B,minRows:U},xe),ye=y);i.useEffect((()=>{he&&he.setAdornedStart(Boolean(re))}),[he,re]);const we=(0,o.Z)({},c,{color:me.color||"primary",disabled:me.disabled,endAdornment:N,error:me.error,focused:me.focused,formControl:he,fullWidth:O,hiddenLabel:me.hiddenLabel,multiline:W,size:me.size,startAdornment:re,type:oe}),_e=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:a,focused:i,formControl:s,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:p,size:f,startAdornment:h,type:m}=e,g={root:["root","color".concat((0,Z.Z)(n)),r&&"disabled",o&&"error",c&&"fullWidth",i&&"focused",s&&"formControl",f&&"medium"!==f&&"size".concat((0,Z.Z)(f)),d&&"multiline",h&&"adornedStart",a&&"adornedEnd",u&&"hiddenLabel",p&&"readOnly"],input:["input",r&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===f&&"inputSizeSmall",u&&"inputHiddenLabel",h&&"inputAdornedStart",a&&"inputAdornedEnd",p&&"readOnly"]};return(0,l.Z)(g,A.u,t)})(we),Se=ne.root||m.Root||R,ke=te.root||g.root||{},je=ne.input||m.Input||M;return xe=(0,o.Z)({},xe,null!=(n=te.input)?n:g.input),(0,h.jsxs)(i.Fragment,{children:[!k&&L,(0,h.jsxs)(Se,(0,o.Z)({},ke,!(0,x.X)(Se)&&{ownerState:(0,o.Z)({},we,ke.ownerState)},{ref:t,onClick:e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),V&&V(e)}},ie,{className:(0,s.Z)(_e.root,ke.className,f,X&&"MuiInputBase-readOnly"),children:[re,(0,h.jsx)(_.Z.Provider,{value:null,children:(0,h.jsx)(je,(0,o.Z)({ownerState:we,"aria-invalid":me.error,"aria-describedby":u,autoComplete:d,autoFocus:p,defaultValue:v,disabled:me.disabled,id:T,onAnimationStart:e=>{be("mui-auto-fill-cancel"===e.animationName?ce.current:{value:"x"})},name:H,placeholder:Q,readOnly:X,required:me.required,rows:ee,value:se,onKeyDown:K,onKeyUp:Y,type:oe},xe,!(0,x.X)(je)&&{as:ye,ownerState:(0,o.Z)({},we,xe.ownerState)},{ref:de,className:(0,s.Z)(_e.input,xe.className,X&&"MuiInputBase-readOnly"),onBlur:e=>{$&&$(e),z.onBlur&&z.onBlur(e),he&&he.onBlur?he.onBlur(e):fe(!1)},onChange:function(e){if(!le){const t=e.target||ce.current;if(null==t)throw new Error((0,a.Z)(1));be({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{me.disabled?e.stopPropagation():(q&&q(e),z.onFocus&&z.onFocus(e),he&&he.onFocus?he.onFocus(e):fe(!0))}}))}),N,J?J((0,o.Z)({},me,{startAdornment:re})):null]}))]})}))},5891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i,u:()=>a});var r=n(5878),o=n(1217);function a(e){return(0,o.ZP)("MuiInputBase",e)}const i=(0,r.Z)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},5470:(e,t,n)=>{"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function a(e){return e.startAdornment}n.d(t,{B7:()=>a,vd:()=>o})},4925:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(3366),o=n(7462),a=n(2791),i=n(4419),s=n(9278),l=n(6147),c=n(2930),u=n(4036),d=n(1402),p=n(6934),f=n(5878),h=n(1217);function m(e){return(0,h.ZP)("MuiFormLabel",e)}const g=(0,f.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);var v=n(184);const b=["children","className","color","component","disabled","error","filled","focused","required"],y=(0,p.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,o.Z)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(g.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(g.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(g.error)]:{color:(t.vars||t).palette.error.main}})})),x=(0,p.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(g.error)]:{color:(t.vars||t).palette.error.main}}})),w=a.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiFormLabel"}),{children:a,className:p,component:f="label"}=n,h=(0,r.Z)(n,b),g=(0,c.Z)(),w=(0,l.Z)({props:n,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),_=(0,o.Z)({},n,{color:w.color||"primary",component:f,disabled:w.disabled,error:w.error,filled:w.filled,focused:w.focused,required:w.required}),S=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:a,filled:s,required:l}=e,c={root:["root","color".concat((0,u.Z)(n)),o&&"disabled",a&&"error",s&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",a&&"error"]};return(0,i.Z)(c,m,t)})(_);return(0,v.jsxs)(y,(0,o.Z)({as:f,ownerState:_,className:(0,s.Z)(S.root,p),ref:t},h,{children:[a,w.required&&(0,v.jsxs)(x,{ownerState:_,"aria-hidden":!0,className:S.asterisk,children:["\u2009","*"]})]}))}));function _(e){return(0,h.ZP)("MuiInputLabel",e)}(0,f.Z)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const S=["disableAnimation","margin","shrink","variant","className"],k=(0,p.ZP)(w,{shouldForwardProp:e=>(0,p.FO)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(g.asterisk)]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,o.Z)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,o.Z)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,o.Z)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))})),j=a.forwardRef((function(e,t){const n=(0,d.Z)({name:"MuiInputLabel",props:e}),{disableAnimation:a=!1,shrink:p,className:f}=n,h=(0,r.Z)(n,S),m=(0,c.Z)();let g=p;"undefined"===typeof g&&m&&(g=m.filled||m.focused||m.adornedStart);const b=(0,l.Z)({props:n,muiFormControl:m,states:["size","variant","required","focused"]}),y=(0,o.Z)({},n,{disableAnimation:a,formControl:m,shrink:g,size:b.size,variant:b.variant,required:b.required,focused:b.focused}),x=(e=>{const{classes:t,formControl:n,size:r,shrink:a,disableAnimation:s,variant:l,required:c}=e,d={root:["root",n&&"formControl",!s&&"animated",a&&"shrink",r&&"normal"!==r&&"size".concat((0,u.Z)(r)),l],asterisk:[c&&"asterisk"]},p=(0,i.Z)(d,_,t);return(0,o.Z)({},t,p)})(y);return(0,v.jsx)(k,(0,o.Z)({"data-shrink":g,ownerState:y,ref:t,className:(0,s.Z)(x.root,f)},h,{classes:x}))}))},533:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4036),c=n(6934),u=n(1402),d=n(3031),p=n(2071),f=n(890),h=n(5878),m=n(1217);function g(e){return(0,m.ZP)("MuiLink",e)}const v=(0,h.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var b=n(8529),y=n(4402);const x={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},w=e=>{let{theme:t,ownerState:n}=e;const r=(e=>x[e]||e)(n.color),o=(0,b.DW)(t,"palette.".concat(r),!1)||n.color,a=(0,b.DW)(t,"palette.".concat(r,"Channel"));return"vars"in t&&a?"rgba(".concat(a," / 0.4)"):(0,y.Fq)(o,.4)};var _=n(184);const S=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],k=(0,c.ZP)(f.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,l.Z)(n.underline))],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,o.Z)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:w({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(v.focusVisible)]:{outline:"auto"}})})),j=a.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiLink"}),{className:c,color:f="primary",component:h="a",onBlur:m,onFocus:v,TypographyClasses:b,underline:y="always",variant:w="inherit",sx:j}=n,Z=(0,r.Z)(n,S),{isFocusVisibleRef:E,onBlur:C,onFocus:N,ref:I}=(0,d.Z)(),[A,P]=a.useState(!1),O=(0,p.Z)(t,I),T=(0,o.Z)({},n,{color:f,component:h,focusVisible:A,underline:y,variant:w}),R=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,a={root:["root","underline".concat((0,l.Z)(o)),"button"===n&&"button",r&&"focusVisible"]};return(0,s.Z)(a,g,t)})(T);return(0,_.jsx)(k,(0,o.Z)({color:f,className:(0,i.Z)(R.root,c),classes:b,component:h,onBlur:e=>{C(e),!1===E.current&&P(!1),m&&m(e)},onFocus:e=>{N(e),!0===E.current&&P(!0),v&&v(e)},ref:O,ownerState:T,variant:w,sx:[...Object.keys(x).includes(f)?[]:[{color:f}],...Array.isArray(j)?j:[j]]},Z))}))},493:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(6934),c=n(1402),u=n(9480),d=n(5878),p=n(1217);function f(e){return(0,p.ZP)("MuiList",e)}(0,d.Z)("MuiList",["root","padding","dense","subheader"]);var h=n(184);const m=["children","className","component","dense","disablePadding","subheader"],g=(0,l.ZP)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((e=>{let{ownerState:t}=e;return(0,o.Z)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),v=a.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiList"}),{children:l,className:d,component:p="ul",dense:v=!1,disablePadding:b=!1,subheader:y}=n,x=(0,r.Z)(n,m),w=a.useMemo((()=>({dense:v})),[v]),_=(0,o.Z)({},n,{component:p,dense:v,disablePadding:b}),S=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,a={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,s.Z)(a,f,t)})(_);return(0,h.jsx)(u.Z.Provider,{value:w,children:(0,h.jsxs)(g,(0,o.Z)({as:p,className:(0,i.Z)(S.root,d),ref:t,ownerState:_},x,{children:[y,l]}))})}))},9480:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(2791).createContext({})},911:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Q});var r=n(7462),o=n(3366),a=n(2791),i=(n(8457),n(9278)),s=n(4419),l=n(3572),c=n(8301),u=n(493);const d=n(7137).Z;var p=n(2071),f=n(162),h=n(184);const m=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function g(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function v(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function b(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function y(e,t,n,r,o,a){let i=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(i)return!1;i=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&b(s,a)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const x=a.forwardRef((function(e,t){const{actions:n,autoFocus:i=!1,autoFocusItem:s=!1,children:l,className:x,disabledItemsFocusable:w=!1,disableListWrap:_=!1,onKeyDown:S,variant:k="selectedMenu"}=e,j=(0,o.Z)(e,m),Z=a.useRef(null),E=a.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,f.Z)((()=>{i&&Z.current.focus()}),[i]),a.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{const n=!Z.current.style.width;if(e.clientHeight{a.isValidElement(e)?(e.props.disabled||("selectedMenu"===k&&e.props.selected||-1===N)&&(N=t),N===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(N+=1,N>=l.length&&(N=-1))):N===t&&(N+=1,N>=l.length&&(N=-1))}));const I=a.Children.map(l,((e,t)=>{if(t===N){const t={};return s&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===k&&(t.tabIndex=0),a.cloneElement(e,t)}return e}));return(0,h.jsx)(u.Z,(0,r.Z)({role:"menu",ref:C,className:x,onKeyDown:e=>{const t=Z.current,n=e.key,r=(0,c.Z)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),y(t,r,_,w,g);else if("ArrowUp"===n)e.preventDefault(),y(t,r,_,w,v);else if("Home"===n)e.preventDefault(),y(t,null,_,w,g);else if("End"===n)e.preventDefault(),y(t,null,_,w,v);else if(1===n.length){const o=E.current,a=n.toLowerCase(),i=performance.now();o.keys.length>0&&(i-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&a!==o.keys[0]&&(o.repeating=!1)),o.lastTime=i,o.keys.push(a);const s=r&&!o.repeating&&b(r,o);o.previousKeyMatched&&(s||y(t,r,!1,w,g,o))?e.preventDefault():o.previousKeyMatched=!1}S&&S(e)},tabIndex:i?0:-1},j,{children:I}))}));var w=n(6897),_=n(6934),S=n(1402),k=n(3199),j=n(7602),Z=n(3208),E=n(9095),C=n(5527),N=n(5878),I=n(1217);function A(e){return(0,I.ZP)("MuiPopover",e)}(0,N.Z)("MuiPopover",["root","paper"]);const P=["onEntering"],O=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],T=["slotProps"];function R(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function M(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function L(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?"".concat(e,"px"):e)).join(" ")}function D(e){return"function"===typeof e?e():e}const z=(0,_.ZP)(E.Z,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),F=(0,_.ZP)(C.Z,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),B=a.forwardRef((function(e,t){var n,u,d;const f=(0,S.Z)({props:e,name:"MuiPopover"}),{action:m,anchorEl:g,anchorOrigin:v={vertical:"top",horizontal:"left"},anchorPosition:b,anchorReference:y="anchorEl",children:x,className:_,container:E,elevation:C=8,marginThreshold:N=16,open:I,PaperProps:B={},slots:U,slotProps:W,transformOrigin:H={vertical:"top",horizontal:"left"},TransitionComponent:$=Z.Z,transitionDuration:G="auto",TransitionProps:{onEntering:V}={},disableScrollLock:q=!1}=f,K=(0,o.Z)(f.TransitionProps,P),Y=(0,o.Z)(f,O),Q=null!=(n=null==W?void 0:W.paper)?n:B,X=a.useRef(),J=(0,p.Z)(X,Q.ref),ee=(0,r.Z)({},f,{anchorOrigin:v,anchorReference:y,elevation:C,marginThreshold:N,externalPaperSlotProps:Q,transformOrigin:H,TransitionComponent:$,transitionDuration:G,TransitionProps:K}),te=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],paper:["paper"]},A,t)})(ee),ne=a.useCallback((()=>{if("anchorPosition"===y)return b;const e=D(g),t=(e&&1===e.nodeType?e:(0,c.Z)(X.current).body).getBoundingClientRect();return{top:t.top+R(t,v.vertical),left:t.left+M(t,v.horizontal)}}),[g,v.horizontal,v.vertical,b,y]),re=a.useCallback((e=>({vertical:R(e,H.vertical),horizontal:M(e,H.horizontal)})),[H.horizontal,H.vertical]),oe=a.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=re(t);if("none"===y)return{top:null,left:null,transformOrigin:L(n)};const r=ne();let o=r.top-n.vertical,a=r.left-n.horizontal;const i=o+t.height,s=a+t.width,l=(0,j.Z)(D(g)),c=l.innerHeight-N,u=l.innerWidth-N;if(null!==N&&oc){const e=i-c;o-=e,n.vertical+=e}if(null!==N&&au){const e=s-u;a-=e,n.horizontal+=e}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:L(n)}}),[g,y,ne,re,N]),[ae,ie]=a.useState(I),se=a.useCallback((()=>{const e=X.current;if(!e)return;const t=oe(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,ie(!0)}),[oe]);a.useEffect((()=>(q&&window.addEventListener("scroll",se),()=>window.removeEventListener("scroll",se))),[g,q,se]);a.useEffect((()=>{I&&se()})),a.useImperativeHandle(m,(()=>I?{updatePosition:()=>{se()}}:null),[I,se]),a.useEffect((()=>{if(!I)return;const e=(0,k.Z)((()=>{se()})),t=(0,j.Z)(g);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[g,I,se]);let le=G;"auto"!==G||$.muiSupportAuto||(le=void 0);const ce=E||(g?(0,c.Z)(D(g)).body:void 0),ue=null!=(u=null==U?void 0:U.root)?u:z,de=null!=(d=null==U?void 0:U.paper)?d:F,pe=(0,l.y)({elementType:de,externalSlotProps:(0,r.Z)({},Q,{style:ae?Q.style:(0,r.Z)({},Q.style,{opacity:0})}),additionalProps:{elevation:C,ref:J},ownerState:ee,className:(0,i.Z)(te.paper,null==Q?void 0:Q.className)}),fe=(0,l.y)({elementType:ue,externalSlotProps:(null==W?void 0:W.root)||{},externalForwardedProps:Y,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:ce,open:I},ownerState:ee,className:(0,i.Z)(te.root,_)}),{slotProps:he}=fe,me=(0,o.Z)(fe,T);return(0,h.jsx)(ue,(0,r.Z)({},me,!(0,w.X)(ue)&&{slotProps:he,disableScrollLock:q},{children:(0,h.jsx)($,(0,r.Z)({appear:!0,in:I,onEntering:(e,t)=>{V&&V(e,t),se()},onExited:()=>{ie(!1)},timeout:le},K,{children:(0,h.jsx)(de,(0,r.Z)({},pe,{children:x}))}))}))}));var U=n(3967);function W(e){return(0,I.ZP)("MuiMenu",e)}(0,N.Z)("MuiMenu",["root","paper","list"]);const H=["onEntering"],$=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],G={vertical:"top",horizontal:"right"},V={vertical:"top",horizontal:"left"},q=(0,_.ZP)(B,{shouldForwardProp:e=>(0,_.FO)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),K=(0,_.ZP)(F,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Y=(0,_.ZP)(x,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Q=a.forwardRef((function(e,t){var n,c;const u=(0,S.Z)({props:e,name:"MuiMenu"}),{autoFocus:d=!0,children:p,className:f,disableAutoFocusItem:m=!1,MenuListProps:g={},onClose:v,open:b,PaperProps:y={},PopoverClasses:x,transitionDuration:w="auto",TransitionProps:{onEntering:_}={},variant:k="selectedMenu",slots:j={},slotProps:Z={}}=u,E=(0,o.Z)(u.TransitionProps,H),C=(0,o.Z)(u,$),N=(0,U.Z)(),I="rtl"===N.direction,A=(0,r.Z)({},u,{autoFocus:d,disableAutoFocusItem:m,MenuListProps:g,onEntering:_,PaperProps:y,transitionDuration:w,TransitionProps:E,variant:k}),P=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],paper:["paper"],list:["list"]},W,t)})(A),O=d&&!m&&b,T=a.useRef(null);let R=-1;a.Children.map(p,((e,t)=>{a.isValidElement(e)&&(e.props.disabled||("selectedMenu"===k&&e.props.selected||-1===R)&&(R=t))}));const M=null!=(n=j.paper)?n:K,L=null!=(c=Z.paper)?c:y,D=(0,l.y)({elementType:j.root,externalSlotProps:Z.root,ownerState:A,className:[P.root,f]}),z=(0,l.y)({elementType:M,externalSlotProps:L,ownerState:A,className:P.paper});return(0,h.jsx)(q,(0,r.Z)({onClose:v,anchorOrigin:{vertical:"bottom",horizontal:I?"right":"left"},transformOrigin:I?G:V,slots:{paper:M,root:j.root},slotProps:{root:D,paper:z},open:b,ref:t,transitionDuration:w,TransitionProps:(0,r.Z)({onEntering:(e,t)=>{T.current&&T.current.adjustStyleForScrollbar(e,N),_&&_(e,t)}},E),ownerState:A},C,{classes:x,children:(0,h.jsx)(Y,(0,r.Z)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),v&&v(e,"tabKeyDown"))},actions:T,autoFocus:d&&(-1===R||m),autoFocusItem:O,variant:k},g,{className:(0,i.Z)(P.list,g.className),children:p}))}))}))},4387:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4402),c=n(6934),u=n(1402),d=n(9480),p=n(3701),f=n(162),h=n(2071),m=n(133),g=n(5878);const v=(0,g.Z)("MuiListItemIcon",["root","alignItemsFlexStart"]);const b=(0,g.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);var y=n(1217);function x(e){return(0,y.ZP)("MuiMenuItem",e)}const w=(0,g.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var _=n(184);const S=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],k=(0,c.ZP)(p.Z,{shouldForwardProp:e=>(0,c.FO)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(w.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(w.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(w.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(w.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(w.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(m.Z.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(m.Z.inset)]:{marginLeft:52},["& .".concat(b.root)]:{marginTop:0,marginBottom:0},["& .".concat(b.inset)]:{paddingLeft:36},["& .".concat(v.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,o.Z)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(v.root," svg")]:{fontSize:"1.25rem"}}))})),j=a.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiMenuItem"}),{autoFocus:l=!1,component:c="li",dense:p=!1,divider:m=!1,disableGutters:g=!1,focusVisibleClassName:v,role:b="menuitem",tabIndex:y,className:w}=n,j=(0,r.Z)(n,S),Z=a.useContext(d.Z),E=a.useMemo((()=>({dense:p||Z.dense||!1,disableGutters:g})),[Z.dense,p,g]),C=a.useRef(null);(0,f.Z)((()=>{l&&C.current&&C.current.focus()}),[l]);const N=(0,o.Z)({},n,{dense:E.dense,divider:m,disableGutters:g}),I=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:a,selected:i,classes:l}=e,c={root:["root",n&&"dense",t&&"disabled",!a&&"gutters",r&&"divider",i&&"selected"]},u=(0,s.Z)(c,x,l);return(0,o.Z)({},l,u)})(n),A=(0,h.Z)(C,t);let P;return n.disabled||(P=void 0!==y?y:-1),(0,_.jsx)(d.Z.Provider,{value:E,children:(0,_.jsx)(k,(0,o.Z)({ref:A,role:b,tabIndex:P,component:c,focusVisibleClassName:(0,i.Z)(I.focusVisible,v),className:(0,i.Z)(I.root,w)},j,{ownerState:N,classes:I}))})}))},9095:(e,t,n)=>{"use strict";n.d(t,{Z:()=>D});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(3572),l=n(6117),c=n(4913),u=n(7054),d=n(8949),p=n(2086),f=n(5202),h=n(7137);function m(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function g(e){return parseInt((0,f.Z)(e).getComputedStyle(e).paddingRight,10)||0}function v(e,t,n,r,o){const a=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===a.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&m(e,o)}))}function b(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function y(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,c.Z)(e);return t.body===e?(0,f.Z)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=(0,h.Z)((0,c.Z)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(g(r)+e,"px");const t=(0,c.Z)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(g(t)+e,"px")}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,c.Z)(r).body;else{const t=r.parentElement,n=(0,f.Z)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}const x=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&m(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);v(t,e.mount,e.modalRef,r,!0);const o=b(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=b(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=y(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=b(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&m(e.modalRef,t),v(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&m(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function w(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=x,closeAfterTransition:s=!1,onTransitionEnter:f,onTransitionExited:h,children:g,onClose:v,open:b,rootRef:y}=e,w=a.useRef({}),_=a.useRef(null),S=a.useRef(null),k=(0,l.Z)(S,y),[j,Z]=a.useState(!b),E=function(e){return!!e&&e.props.hasOwnProperty("in")}(g);let C=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(C=!1);const N=()=>(w.current.modalRef=S.current,w.current.mount=_.current,w.current),I=()=>{i.mount(N(),{disableScrollLock:r}),S.current&&(S.current.scrollTop=0)},A=(0,u.Z)((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,c.Z)(_.current).body;i.add(N(),e),S.current&&I()})),P=a.useCallback((()=>i.isTopModal(N())),[i]),O=(0,u.Z)((e=>{_.current=e,e&&(b&&P()?I():S.current&&m(S.current,C))})),T=a.useCallback((()=>{i.remove(N(),C)}),[C,i]);a.useEffect((()=>()=>{T()}),[T]),a.useEffect((()=>{b?A():E&&s||T()}),[b,T,E,s,A]);const R=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&P()&&(n||(t.stopPropagation(),v&&v(t,"escapeKeyDown")))},M=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&v&&v(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,p._)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,o.Z)({},n,t);return(0,o.Z)({role:"presentation"},r,{onKeyDown:R(r),ref:k})},getBackdropProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e;return(0,o.Z)({"aria-hidden":!0},t,{onClick:M(t),open:b})},getTransitionProps:()=>({onEnter:(0,d.Z)((()=>{Z(!1),f&&f()}),null==g?void 0:g.props.onEnter),onExited:(0,d.Z)((()=>{Z(!0),h&&h(),s&&T()}),null==g?void 0:g.props.onExited)}),rootRef:k,portalRef:O,isTopModal:P,exited:j,hasTransition:E}}var _=n(4419),S=n(184);const k=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function j(e){const t=[],n=[];return Array.from(e.querySelectorAll(k)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function Z(){return!0}function E(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=j,isEnabled:s=Z,open:u}=e,d=a.useRef(!1),p=a.useRef(null),f=a.useRef(null),h=a.useRef(null),m=a.useRef(null),g=a.useRef(!1),v=a.useRef(null),b=(0,l.Z)(t.ref,v),y=a.useRef(null);a.useEffect((()=>{u&&v.current&&(g.current=!n)}),[n,u]),a.useEffect((()=>{if(!u||!v.current)return;const e=(0,c.Z)(v.current);return v.current.contains(e.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),g.current&&v.current.focus()),()=>{o||(h.current&&h.current.focus&&(d.current=!0,h.current.focus()),h.current=null)}}),[u]),a.useEffect((()=>{if(!u||!v.current)return;const e=(0,c.Z)(v.current),t=t=>{y.current=t,!r&&s()&&"Tab"===t.key&&e.activeElement===v.current&&t.shiftKey&&(d.current=!0,f.current&&f.current.focus())},n=()=>{const t=v.current;if(null===t)return;if(!e.hasFocus()||!s()||d.current)return void(d.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==p.current&&e.activeElement!==f.current)return;if(e.activeElement!==m.current)m.current=null;else if(null!==m.current)return;if(!g.current)return;let n=[];if(e.activeElement!==p.current&&e.activeElement!==f.current||(n=i(v.current)),n.length>0){var o,a;const e=Boolean((null==(o=y.current)?void 0:o.shiftKey)&&"Tab"===(null==(a=y.current)?void 0:a.key)),t=n[0],r=n[n.length-1];"string"!==typeof t&&"string"!==typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,s,u,i]);const x=e=>{null===h.current&&(h.current=e.relatedTarget),g.current=!0};return(0,S.jsxs)(a.Fragment,{children:[(0,S.jsx)("div",{tabIndex:u?0:-1,onFocus:x,ref:p,"data-testid":"sentinelStart"}),a.cloneElement(t,{ref:b,onFocus:e=>{null===h.current&&(h.current=e.relatedTarget),g.current=!0,m.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,S.jsx)("div",{tabIndex:u?0:-1,onFocus:x,ref:f,"data-testid":"sentinelEnd"})]})}var C=n(6174),N=n(6934),I=n(1402),A=n(2739),P=n(5878),O=n(1217);function T(e){return(0,O.ZP)("MuiModal",e)}(0,P.Z)("MuiModal",["root","hidden","backdrop"]);const R=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],M=(0,N.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),L=(0,N.ZP)(A.Z,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),D=a.forwardRef((function(e,t){var n,l,c,u,d,p;const f=(0,I.Z)({name:"MuiModal",props:e}),{BackdropComponent:h=L,BackdropProps:m,className:g,closeAfterTransition:v=!1,children:b,container:y,component:x,components:k={},componentsProps:j={},disableAutoFocus:Z=!1,disableEnforceFocus:N=!1,disableEscapeKeyDown:A=!1,disablePortal:P=!1,disableRestoreFocus:O=!1,disableScrollLock:D=!1,hideBackdrop:z=!1,keepMounted:F=!1,onBackdropClick:B,open:U,slotProps:W,slots:H}=f,$=(0,r.Z)(f,R),G=(0,o.Z)({},f,{closeAfterTransition:v,disableAutoFocus:Z,disableEnforceFocus:N,disableEscapeKeyDown:A,disablePortal:P,disableRestoreFocus:O,disableScrollLock:D,hideBackdrop:z,keepMounted:F}),{getRootProps:V,getBackdropProps:q,getTransitionProps:K,portalRef:Y,isTopModal:Q,exited:X,hasTransition:J}=w((0,o.Z)({},G,{rootRef:t})),ee=(0,o.Z)({},G,{exited:X}),te=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,_.Z)(o,T,r)})(ee),ne={};if(void 0===b.props.tabIndex&&(ne.tabIndex="-1"),J){const{onEnter:e,onExited:t}=K();ne.onEnter=e,ne.onExited=t}const re=null!=(n=null!=(l=null==H?void 0:H.root)?l:k.Root)?n:M,oe=null!=(c=null!=(u=null==H?void 0:H.backdrop)?u:k.Backdrop)?c:h,ae=null!=(d=null==W?void 0:W.root)?d:j.root,ie=null!=(p=null==W?void 0:W.backdrop)?p:j.backdrop,se=(0,s.y)({elementType:re,externalSlotProps:ae,externalForwardedProps:$,getSlotProps:V,additionalProps:{ref:t,as:x},ownerState:ee,className:(0,i.Z)(g,null==ae?void 0:ae.className,null==te?void 0:te.root,!ee.open&&ee.exited&&(null==te?void 0:te.hidden))}),le=(0,s.y)({elementType:oe,externalSlotProps:ie,additionalProps:m,getSlotProps:e=>q((0,o.Z)({},e,{onClick:t=>{B&&B(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,i.Z)(null==ie?void 0:ie.className,null==m?void 0:m.className,null==te?void 0:te.backdrop),ownerState:ee});return F||U||J&&!X?(0,S.jsx)(C.h,{ref:Y,container:y,disablePortal:P,children:(0,S.jsxs)(re,(0,o.Z)({},se,{children:[!z&&h?(0,S.jsx)(oe,(0,o.Z)({},le)):null,(0,S.jsx)(E,{disableEnforceFocus:N,disableAutoFocus:Z,disableRestoreFocus:O,isEnabled:Q,open:U,children:a.cloneElement(b,ne)})]}))}):null}))},7196:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var r,o=n(3366),a=n(7462),i=n(2791),s=n(4419),l=n(6934),c=n(184);const u=["children","classes","className","label","notched"],d=(0,l.ZP)("fieldset",{shouldForwardProp:l.FO})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),p=(0,l.ZP)("legend",{shouldForwardProp:l.FO})((e=>{let{ownerState:t,theme:n}=e;return(0,a.Z)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,a.Z)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))}));var f=n(2930),h=n(6147),m=n(6059),g=n(4834),v=n(1402);const b=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],y=(0,l.ZP)(g.Ej,{shouldForwardProp:e=>(0,l.FO)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:g.Gx})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,a.Z)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(m.Z.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(m.Z.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):r}},["&.".concat(m.Z.focused," .").concat(m.Z.notchedOutline)]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},["&.".concat(m.Z.error," .").concat(m.Z.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(m.Z.disabled," .").concat(m.Z.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,a.Z)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))})),x=(0,l.ZP)((function(e){const{className:t,label:n,notched:i}=e,s=(0,o.Z)(e,u),l=null!=n&&""!==n,f=(0,a.Z)({},e,{notched:i,withLabel:l});return(0,c.jsx)(d,(0,a.Z)({"aria-hidden":!0,className:t,ownerState:f},s,{children:(0,c.jsx)(p,{ownerState:f,children:l?(0,c.jsx)("span",{children:n}):r||(r=(0,c.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}})),w=(0,l.ZP)(g.rA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:g._o})((e=>{let{theme:t,ownerState:n}=e;return(0,a.Z)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})})),_=i.forwardRef((function(e,t){var n,r,l,u,d;const p=(0,v.Z)({props:e,name:"MuiOutlinedInput"}),{components:_={},fullWidth:S=!1,inputComponent:k="input",label:j,multiline:Z=!1,notched:E,slots:C={},type:N="text"}=p,I=(0,o.Z)(p,b),A=(e=>{const{classes:t}=e,n=(0,s.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},m.e,t);return(0,a.Z)({},t,n)})(p),P=(0,f.Z)(),O=(0,h.Z)({props:p,muiFormControl:P,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),T=(0,a.Z)({},p,{color:O.color||"primary",disabled:O.disabled,error:O.error,focused:O.focused,formControl:P,fullWidth:S,hiddenLabel:O.hiddenLabel,multiline:Z,size:O.size,type:N}),R=null!=(n=null!=(r=C.root)?r:_.Root)?n:y,M=null!=(l=null!=(u=C.input)?u:_.Input)?l:w;return(0,c.jsx)(g.ZP,(0,a.Z)({slots:{root:R,input:M},renderSuffix:e=>(0,c.jsx)(x,{ownerState:T,className:A.notchedOutline,label:null!=j&&""!==j&&O.required?d||(d=(0,c.jsxs)(i.Fragment,{children:[j,"\u2009","*"]})):j,notched:"undefined"!==typeof E?E:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:S,inputComponent:k,multiline:Z,ref:t,type:N},I,{classes:(0,a.Z)({},A,{notchedOutline:null})}))}));_.muiName="Input";const S=_},6059:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l,e:()=>s});var r=n(7462),o=n(5878),a=n(1217),i=n(5891);function s(e){return(0,a.ZP)("MuiOutlinedInput",e)}const l=(0,r.Z)({},i.Z,(0,o.Z)("MuiOutlinedInput",["root","notchedOutline","input"]))},7246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L});var r=n(7462),o=n(3366),a=n(2791),i=n(9278),s=n(4419),l=n(1402),c=n(5878),u=n(1217);function d(e){return(0,u.ZP)("MuiPagination",e)}(0,c.Z)("MuiPagination",["root","ul","outlined","text"]);var p=n(8637);const f=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];var h=n(4402);function m(e){return(0,u.ZP)("MuiPaginationItem",e)}const g=(0,c.Z)("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon"]);var v=n(3967),b=n(3701),y=n(4036),x=n(6189),w=n(184);const _=(0,x.Z)((0,w.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),S=(0,x.Z)((0,w.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),k=(0,x.Z)((0,w.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),j=(0,x.Z)((0,w.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");var Z=n(6934);const E=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],C=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,y.Z)(n.size))],"text"===n.variant&&t["text".concat((0,y.Z)(n.color))],"outlined"===n.variant&&t["outlined".concat((0,y.Z)(n.color))],"rounded"===n.shape&&t.rounded,"page"===n.type&&t.page,("start-ellipsis"===n.type||"end-ellipsis"===n.type)&&t.ellipsis,("previous"===n.type||"next"===n.type)&&t.previousNext,("first"===n.type||"last"===n.type)&&t.firstLast]},N=(0,Z.ZP)("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:C})((e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,height:"auto",["&.".concat(g.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"small"===n.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)})})),I=(0,Z.ZP)(b.Z,{name:"MuiPaginationItem",slot:"Root",overridesResolver:C})((e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,["&.".concat(g.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(g.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},transition:t.transitions.create(["color","background-color"],{duration:t.transitions.duration.short}),"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(g.selected)]:{backgroundColor:(t.vars||t).palette.action.selected,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,h.Fq)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(g.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,h.Fq)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},["&.".concat(g.disabled)]:{opacity:1,color:(t.vars||t).palette.action.disabled,backgroundColor:(t.vars||t).palette.action.selected}}},"small"===n.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)},"rounded"===n.shape&&{borderRadius:(t.vars||t).shape.borderRadius})}),(e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({},"text"===n.variant&&{["&.".concat(g.selected)]:(0,r.Z)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}},["&.".concat(g.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}},{["&.".concat(g.disabled)]:{color:(t.vars||t).palette.action.disabled}})},"outlined"===n.variant&&{border:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(g.selected)]:(0,r.Z)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):(0,h.Fq)(t.palette[n.color].main,.5)),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.activatedOpacity,")"):(0,h.Fq)(t.palette[n.color].main,t.palette.action.activatedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,h.Fq)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(g.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,h.Fq)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity)}},{["&.".concat(g.disabled)]:{borderColor:(t.vars||t).palette.action.disabledBackground,color:(t.vars||t).palette.action.disabled}})})})),A=(0,Z.ZP)("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})((e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({fontSize:t.typography.pxToRem(20),margin:"0 -8px"},"small"===n.size&&{fontSize:t.typography.pxToRem(18)},"large"===n.size&&{fontSize:t.typography.pxToRem(22)})})),P=a.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiPaginationItem"}),{className:a,color:c="standard",component:u,components:d={},disabled:p=!1,page:f,selected:h=!1,shape:g="circular",size:b="medium",slots:x={},type:Z="page",variant:C="text"}=n,P=(0,o.Z)(n,E),O=(0,r.Z)({},n,{color:c,disabled:p,selected:h,shape:g,size:b,type:Z,variant:C}),T=(0,v.Z)(),R=(e=>{const{classes:t,color:n,disabled:r,selected:o,size:a,shape:i,type:l,variant:c}=e,u={root:["root","size".concat((0,y.Z)(a)),c,i,"standard"!==n&&"".concat(c).concat((0,y.Z)(n)),r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[l]],icon:["icon"]};return(0,s.Z)(u,m,t)})(O),M=("rtl"===T.direction?{previous:x.next||d.next||j,next:x.previous||d.previous||k,last:x.first||d.first||_,first:x.last||d.last||S}:{previous:x.previous||d.previous||k,next:x.next||d.next||j,first:x.first||d.first||_,last:x.last||d.last||S})[Z];return"start-ellipsis"===Z||"end-ellipsis"===Z?(0,w.jsx)(N,{ref:t,ownerState:O,className:(0,i.Z)(R.root,a),children:"\u2026"}):(0,w.jsxs)(I,(0,r.Z)({ref:t,ownerState:O,component:u,disabled:p,className:(0,i.Z)(R.root,a)},P,{children:["page"===Z&&f,M?(0,w.jsx)(A,{as:M,ownerState:O,className:R.icon}):null]}))})),O=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],T=(0,Z.ZP)("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),R=(0,Z.ZP)("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function M(e,t,n){return"page"===e?"".concat(n?"":"Go to ","page ").concat(t):"Go to ".concat(e," page")}const L=a.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiPagination"}),{boundaryCount:a=1,className:c,color:u="standard",count:h=1,defaultPage:m=1,disabled:g=!1,getItemAriaLabel:v=M,hideNextButton:b=!1,hidePrevButton:y=!1,renderItem:x=(e=>(0,w.jsx)(P,(0,r.Z)({},e))),shape:_="circular",showFirstButton:S=!1,showLastButton:k=!1,siblingCount:j=1,size:Z="medium",variant:E="text"}=n,C=(0,o.Z)(n,O),{items:N}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{boundaryCount:t=1,componentName:n="usePagination",count:a=1,defaultPage:i=1,disabled:s=!1,hideNextButton:l=!1,hidePrevButton:c=!1,onChange:u,page:d,showFirstButton:h=!1,showLastButton:m=!1,siblingCount:g=1}=e,v=(0,o.Z)(e,f),[b,y]=(0,p.Z)({controlled:d,default:i,name:n,state:"page"}),x=(e,t)=>{d||y(t),u&&u(e,t)},w=(e,t)=>{const n=t-e+1;return Array.from({length:n},((t,n)=>e+n))},_=w(1,Math.min(t,a)),S=w(Math.max(a-t+1,t+1),a),k=Math.max(Math.min(b-g,a-t-2*g-1),t+2),j=Math.min(Math.max(b+g,t+2*g+2),S.length>0?S[0]-2:a-1),Z=[...h?["first"]:[],...c?[]:["previous"],..._,...k>t+2?["start-ellipsis"]:t+1t?[a-t]:[],...S,...l?[]:["next"],...m?["last"]:[]],E=e=>{switch(e){case"first":return 1;case"previous":return b-1;case"next":return b+1;case"last":return a;default:return null}},C=Z.map((e=>"number"===typeof e?{onClick:t=>{x(t,e)},type:"page",page:e,selected:e===b,disabled:s,"aria-current":e===b?"true":void 0}:{onClick:t=>{x(t,E(e))},type:e,page:E(e),selected:!1,disabled:s||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?b>=a:b<=1)}));return(0,r.Z)({items:C},v)}((0,r.Z)({},n,{componentName:"Pagination"})),I=(0,r.Z)({},n,{boundaryCount:a,color:u,count:h,defaultPage:m,disabled:g,getItemAriaLabel:v,hideNextButton:b,hidePrevButton:y,renderItem:x,shape:_,showFirstButton:S,showLastButton:k,siblingCount:j,size:Z,variant:E}),A=(e=>{const{classes:t,variant:n}=e,r={root:["root",n],ul:["ul"]};return(0,s.Z)(r,d,t)})(I);return(0,w.jsx)(T,(0,r.Z)({"aria-label":"pagination navigation",className:(0,i.Z)(A.root,c),ownerState:I,ref:t},C,{children:(0,w.jsx)(R,{className:A.ul,ownerState:I,children:N.map(((e,t)=>(0,w.jsx)("li",{children:x((0,r.Z)({},e,{color:u,"aria-label":v(e.type,e.page,e.selected),shape:_,size:Z,variant:E}))},t)))})}))}))},5527:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4402),c=n(6934);const u=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var d=n(1402),p=n(5878),f=n(1217);function h(e){return(0,f.ZP)("MuiPaper",e)}(0,p.Z)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(184);const g=["className","component","elevation","square","variant"],v=(0,c.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((e=>{let{theme:t,ownerState:n}=e;var r;return(0,o.Z)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,o.Z)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,l.Fq)("#fff",u(n.elevation)),", ").concat((0,l.Fq)("#fff",u(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))})),b=a.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiPaper"}),{className:a,component:l="div",elevation:c=1,square:u=!1,variant:p="elevation"}=n,f=(0,r.Z)(n,g),b=(0,o.Z)({},n,{component:l,elevation:c,square:u,variant:p}),y=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,a={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,s.Z)(a,h,o)})(b);return(0,m.jsx)(v,(0,o.Z)({as:l,ownerState:b,className:(0,i.Z)(y.root,a),ref:t},f))}))},5396:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ge});var r=n(7462),o=n(3366),a=n(2791),i=n(6117),s=n(2876),l=n(4913);function c(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function u(e){return e instanceof c(e).Element||e instanceof Element}function d(e){return e instanceof c(e).HTMLElement||e instanceof HTMLElement}function p(e){return"undefined"!==typeof ShadowRoot&&(e instanceof c(e).ShadowRoot||e instanceof ShadowRoot)}var f=Math.max,h=Math.min,m=Math.round;function g(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function v(){return!/^((?!chrome|android).)*safari/i.test(g())}function b(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&d(e)&&(o=e.offsetWidth>0&&m(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&m(r.height)/e.offsetHeight||1);var i=(u(e)?c(e):window).visualViewport,s=!v()&&n,l=(r.left+(s&&i?i.offsetLeft:0))/o,p=(r.top+(s&&i?i.offsetTop:0))/a,f=r.width/o,h=r.height/a;return{width:f,height:h,top:p,right:l+f,bottom:p+h,left:l,x:l,y:p}}function y(e){var t=c(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function x(e){return e?(e.nodeName||"").toLowerCase():null}function w(e){return((u(e)?e.ownerDocument:e.document)||window.document).documentElement}function _(e){return b(w(e)).left+y(e).scrollLeft}function S(e){return c(e).getComputedStyle(e)}function k(e){var t=S(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function j(e,t,n){void 0===n&&(n=!1);var r=d(t),o=d(t)&&function(e){var t=e.getBoundingClientRect(),n=m(t.width)/e.offsetWidth||1,r=m(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=w(t),i=b(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==x(t)||k(a))&&(s=function(e){return e!==c(e)&&d(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:y(e);var t}(t)),d(t)?((l=b(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=_(a))),{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function Z(e){var t=b(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function E(e){return"html"===x(e)?e:e.assignedSlot||e.parentNode||(p(e)?e.host:null)||w(e)}function C(e){return["html","body","#document"].indexOf(x(e))>=0?e.ownerDocument.body:d(e)&&k(e)?e:C(E(e))}function N(e,t){var n;void 0===t&&(t=[]);var r=C(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=c(r),i=o?[a].concat(a.visualViewport||[],k(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(N(E(i)))}function I(e){return["table","td","th"].indexOf(x(e))>=0}function A(e){return d(e)&&"fixed"!==S(e).position?e.offsetParent:null}function P(e){for(var t=c(e),n=A(e);n&&I(n)&&"static"===S(n).position;)n=A(n);return n&&("html"===x(n)||"body"===x(n)&&"static"===S(n).position)?t:n||function(e){var t=/firefox/i.test(g());if(/Trident/i.test(g())&&d(e)&&"fixed"===S(e).position)return null;var n=E(e);for(p(n)&&(n=n.host);d(n)&&["html","body"].indexOf(x(n))<0;){var r=S(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var O="top",T="bottom",R="right",M="left",L="auto",D=[O,T,R,M],z="start",F="end",B="viewport",U="popper",W=D.reduce((function(e,t){return e.concat([t+"-"+z,t+"-"+F])}),[]),H=[].concat(D,[L]).reduce((function(e,t){return e.concat([t,t+"-"+z,t+"-"+F])}),[]),$=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function G(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function V(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var q={placement:"bottom",modifiers:[],strategy:"absolute"};function K(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function te(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?X(o):null,i=o?J(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case O:t={x:s,y:n.y-r.height};break;case T:t={x:s,y:n.y+n.height};break;case R:t={x:n.x+n.width,y:l};break;case M:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?ee(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case z:t[c]=t[c]-(n[u]/2-r[u]/2);break;case F:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,p=e.isFixed,f=i.x,h=void 0===f?0:f,g=i.y,v=void 0===g?0:g,b="function"===typeof d?d({x:h,y:v}):{x:h,y:v};h=b.x,v=b.y;var y=i.hasOwnProperty("x"),x=i.hasOwnProperty("y"),_=M,k=O,j=window;if(u){var Z=P(n),E="clientHeight",C="clientWidth";if(Z===c(n)&&"static"!==S(Z=w(n)).position&&"absolute"===s&&(E="scrollHeight",C="scrollWidth"),o===O||(o===M||o===R)&&a===F)k=T,v-=(p&&Z===j&&j.visualViewport?j.visualViewport.height:Z[E])-r.height,v*=l?1:-1;if(o===M||(o===O||o===T)&&a===F)_=R,h-=(p&&Z===j&&j.visualViewport?j.visualViewport.width:Z[C])-r.width,h*=l?1:-1}var N,I=Object.assign({position:s},u&&ne),A=!0===d?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:m(n*o)/o||0,y:m(r*o)/o||0}}({x:h,y:v},c(n)):{x:h,y:v};return h=A.x,v=A.y,l?Object.assign({},I,((N={})[k]=x?"0":"",N[_]=y?"0":"",N.transform=(j.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",N)):Object.assign({},I,((t={})[k]=x?v+"px":"",t[_]=y?h+"px":"",t.transform="",t))}const oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=void 0===o?[0,0]:o,i=H.reduce((function(e,n){return e[n]=function(e,t,n){var r=X(e),o=[M,O].indexOf(r)>=0?-1:1,a="function"===typeof n?n(Object.assign({},t,{placement:e})):n,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[M,R].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}(n,t.rects,a),e}),{}),s=i[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}};var ae={left:"right",right:"left",bottom:"top",top:"bottom"};function ie(e){return e.replace(/left|right|bottom|top/g,(function(e){return ae[e]}))}var se={start:"end",end:"start"};function le(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&p(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ue(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function de(e,t,n){return t===B?ue(function(e,t){var n=c(e),r=w(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var u=v();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+_(e),y:l}}(e,n)):u(t)?function(e,t){var n=b(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ue(function(e){var t,n=w(e),r=y(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=f(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=f(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+_(e),l=-r.scrollTop;return"rtl"===S(o||n).direction&&(s+=f(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}(w(e)))}function pe(e,t,n,r){var o="clippingParents"===t?function(e){var t=N(E(e)),n=["absolute","fixed"].indexOf(S(e).position)>=0&&d(e)?P(e):e;return u(n)?t.filter((function(e){return u(e)&&ce(e,n)&&"body"!==x(e)})):[]}(e):[].concat(t),a=[].concat(o,[n]),i=a[0],s=a.reduce((function(t,n){var o=de(e,n,r);return t.top=f(o.top,t.top),t.right=h(o.right,t.right),t.bottom=h(o.bottom,t.bottom),t.left=f(o.left,t.left),t}),de(e,i,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function fe(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function he(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function me(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,a=n.strategy,i=void 0===a?e.strategy:a,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,d=void 0===c?B:c,p=n.elementContext,f=void 0===p?U:p,h=n.altBoundary,m=void 0!==h&&h,g=n.padding,v=void 0===g?0:g,y=fe("number"!==typeof v?v:he(v,D)),x=f===U?"reference":U,_=e.rects.popper,S=e.elements[m?x:f],k=pe(u(S)?S:S.contextElement||w(e.elements.popper),l,d,i),j=b(e.elements.reference),Z=te({reference:j,element:_,strategy:"absolute",placement:o}),E=ue(Object.assign({},_,Z)),C=f===U?E:j,N={top:k.top-C.top+y.top,bottom:C.bottom-k.bottom+y.bottom,left:k.left-C.left+y.left,right:C.right-k.right+y.right},I=e.modifiersData.offset;if(f===U&&I){var A=I[o];Object.keys(N).forEach((function(e){var t=[R,T].indexOf(e)>=0?1:-1,n=[O,T].indexOf(e)>=0?"y":"x";N[e]+=A[n]*t}))}return N}function ge(e,t,n){return f(e,h(t,n))}const ve={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=void 0===o||o,i=n.altAxis,s=void 0!==i&&i,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,m=void 0===p||p,g=n.tetherOffset,v=void 0===g?0:g,b=me(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=X(t.placement),x=J(t.placement),w=!x,_=ee(y),S="x"===_?"y":"x",k=t.modifiersData.popperOffsets,j=t.rects.reference,E=t.rects.popper,C="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,N="number"===typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(k){if(a){var L,D="y"===_?O:M,F="y"===_?T:R,B="y"===_?"height":"width",U=k[_],W=U+b[D],H=U-b[F],$=m?-E[B]/2:0,G=x===z?j[B]:E[B],V=x===z?-E[B]:-j[B],q=t.elements.arrow,K=m&&q?Z(q):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=Y[D],te=Y[F],ne=ge(0,j[B],K[B]),re=w?j[B]/2-$-ne-Q-N.mainAxis:G-ne-Q-N.mainAxis,oe=w?-j[B]/2+$+ne+te+N.mainAxis:V+ne+te+N.mainAxis,ae=t.elements.arrow&&P(t.elements.arrow),ie=ae?"y"===_?ae.clientTop||0:ae.clientLeft||0:0,se=null!=(L=null==I?void 0:I[_])?L:0,le=U+oe-se,ce=ge(m?h(W,U+re-se-ie):W,U,m?f(H,le):H);k[_]=ce,A[_]=ce-U}if(s){var ue,de="x"===_?O:M,pe="x"===_?T:R,fe=k[S],he="y"===S?"height":"width",ve=fe+b[de],be=fe-b[pe],ye=-1!==[O,M].indexOf(y),xe=null!=(ue=null==I?void 0:I[S])?ue:0,we=ye?ve:fe-j[he]-E[he]-xe+N.altAxis,_e=ye?fe+j[he]+E[he]-xe-N.altAxis:be,Se=m&&ye?function(e,t,n){var r=ge(e,t,n);return r>n?n:r}(we,fe,_e):ge(m?we:ve,fe,m?_e:be);k[S]=Se,A[S]=Se-fe}t.modifiersData[r]=A}},requiresIfExists:["offset"]};const be={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,s=X(n.placement),l=ee(s),c=[M,R].indexOf(s)>=0?"height":"width";if(a&&i){var u=function(e,t){return fe("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:he(e,D))}(o.padding,n),d=Z(a),p="y"===l?O:M,f="y"===l?T:R,h=n.rects.reference[c]+n.rects.reference[l]-i[l]-n.rects.popper[c],m=i[l]-n.rects.reference[l],g=P(a),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=h/2-m/2,y=u[p],x=v-d[c]-u[f],w=v/2-d[c]/2+b,_=ge(y,w,x),S=l;n.modifiersData[r]=((t={})[S]=_,t.centerOffset=_-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&ce(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ye(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xe(e){return[O,R,T,M].some((function(t){return e[t]>=0}))}var we=Y({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=void 0===o||o,i=r.resize,s=void 0===i||i,l=c(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach((function(e){e.addEventListener("scroll",n.update,Q)})),s&&l.addEventListener("resize",n.update,Q),function(){a&&u.forEach((function(e){e.removeEventListener("scroll",n.update,Q)})),s&&l.removeEventListener("resize",n.update,Q)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=te({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,a=n.adaptive,i=void 0===a||a,s=n.roundOffsets,l=void 0===s||s,c={placement:X(t.placement),variation:J(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];d(o)&&x(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});d(r)&&x(r)&&(Object.assign(r.style,a),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},oe,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,i=n.altAxis,s=void 0===i||i,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=X(g),b=l||(v===g||!h?[ie(g)]:function(e){if(X(e)===L)return[];var t=ie(e);return[le(e),t,le(t)]}(g)),y=[g].concat(b).reduce((function(e,n){return e.concat(X(n)===L?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?H:l,u=J(r),d=u?s?W:W.filter((function(e){return J(e)===u})):D,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=me(e,{placement:n,boundary:o,rootBoundary:a,padding:i})[X(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,_=new Map,S=!0,k=y[0],j=0;j=0,I=N?"width":"height",A=me(t,{placement:Z,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),P=N?C?R:M:C?T:O;x[I]>w[I]&&(P=ie(P));var F=ie(P),B=[];if(a&&B.push(A[E]<=0),s&&B.push(A[P]<=0,A[F]<=0),B.every((function(e){return e}))){k=Z,S=!1;break}_.set(Z,B)}if(S)for(var U=function(e){var t=y.find((function(t){var n=_.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},$=h?3:1;$>0;$--){if("break"===U($))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ve,be,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=me(t,{elementContext:"reference"}),s=me(t,{altBoundary:!0}),l=ye(i,r),c=ye(s,o,a),u=xe(l),d=xe(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),_e=n(4419),Se=n(6174),ke=n(1217);const je="base";function Ze(e,t){const n=ke._v[t];return n?(r=n,"".concat(je,"--").concat(r)):function(e,t){return"".concat(je,"-").concat(e,"-").concat(t)}(e,t);var r}const Ee="Popper";function Ce(e){return Ze(Ee,e)}!function(e,t){const n={};t.forEach((t=>{n[t]=Ze(e,t)}))}(Ee,["root"]);var Ne=n(3572),Ie=n(184);const Ae={disableDefaultClasses:!1},Pe=a.createContext(Ae);const Oe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Te=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Re(e){return"function"===typeof e?e():e}function Me(e){return void 0!==e.nodeType}const Le=()=>(0,_e.Z)({root:["root"]},function(e){const{disableDefaultClasses:t}=a.useContext(Pe);return n=>t?"":e(n)}(Ce)),De={},ze=a.forwardRef((function(e,t){var n;const{anchorEl:l,children:c,direction:u,disablePortal:d,modifiers:p,open:f,placement:h,popperOptions:m,popperRef:g,slotProps:v={},slots:b={},TransitionProps:y}=e,x=(0,o.Z)(e,Oe),w=a.useRef(null),_=(0,i.Z)(w,t),S=a.useRef(null),k=(0,i.Z)(S,g),j=a.useRef(k);(0,s.Z)((()=>{j.current=k}),[k]),a.useImperativeHandle(g,(()=>S.current),[]);const Z=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(h,u),[E,C]=a.useState(Z),[N,I]=a.useState(Re(l));a.useEffect((()=>{S.current&&S.current.forceUpdate()})),a.useEffect((()=>{l&&I(Re(l))}),[l]),(0,s.Z)((()=>{if(!N||!f)return;let e=[{name:"preventOverflow",options:{altBoundary:d}},{name:"flip",options:{altBoundary:d}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;C(t.placement)}}];null!=p&&(e=e.concat(p)),m&&null!=m.modifiers&&(e=e.concat(m.modifiers));const t=we(N,w.current,(0,r.Z)({placement:Z},m,{modifiers:e}));return j.current(t),()=>{t.destroy(),j.current(null)}}),[N,d,p,f,m,Z]);const A={placement:E};null!==y&&(A.TransitionProps=y);const P=Le(),O=null!=(n=b.root)?n:"div",T=(0,Ne.y)({elementType:O,externalSlotProps:v.root,externalForwardedProps:x,additionalProps:{role:"tooltip",ref:_},ownerState:e,className:P.root});return(0,Ie.jsx)(O,(0,r.Z)({},T,{children:"function"===typeof c?c(A):c}))})),Fe=a.forwardRef((function(e,t){const{anchorEl:n,children:i,container:s,direction:c="ltr",disablePortal:u=!1,keepMounted:d=!1,modifiers:p,open:f,placement:h="bottom",popperOptions:m=De,popperRef:g,style:v,transition:b=!1,slotProps:y={},slots:x={}}=e,w=(0,o.Z)(e,Te),[_,S]=a.useState(!0);if(!d&&!f&&(!b||_))return null;let k;if(s)k=s;else if(n){const e=Re(n);k=e&&Me(e)?(0,l.Z)(e).body:(0,l.Z)(null).body}const j=f||!d||b&&!_?void 0:"none",Z=b?{in:f,onEnter:()=>{S(!1)},onExited:()=>{S(!0)}}:void 0;return(0,Ie.jsx)(Se.h,{disablePortal:u,container:k,children:(0,Ie.jsx)(ze,(0,r.Z)({anchorEl:n,direction:c,disablePortal:u,modifiers:p,ref:t,open:b?!_:f,placement:h,popperOptions:m,popperRef:g,slotProps:y,slots:x},w,{style:(0,r.Z)({position:"fixed",top:0,left:0,display:j},v),TransitionProps:Z,children:i}))})}));var Be=n(9120),Ue=n(6934),We=n(1402);const He=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],$e=(0,Ue.ZP)(Fe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ge=a.forwardRef((function(e,t){var n;const a=(0,Be.Z)(),i=(0,We.Z)({props:e,name:"MuiPopper"}),{anchorEl:s,component:l,components:c,componentsProps:u,container:d,disablePortal:p,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:v,popperRef:b,transition:y,slots:x,slotProps:w}=i,_=(0,o.Z)(i,He),S=null!=(n=null==x?void 0:x.root)?n:null==c?void 0:c.Root,k=(0,r.Z)({anchorEl:s,container:d,disablePortal:p,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:v,popperRef:b,transition:y},_);return(0,Ie.jsx)($e,(0,r.Z)({as:l,direction:null==a?void 0:a.direction,slots:{root:S},slotProps:null!=w?w:u},k,{ref:t}))}))},8406:(e,t,n)=>{"use strict";n.d(t,{Z:()=>J});var r=n(7462),o=n(3366),a=n(2791),i=n(9278),s=n(2466),l=n(6187),c=(n(8457),n(4419)),u=n(8252),d=n(8301),p=n(4036),f=n(911),h=n(5878),m=n(1217);function g(e){return(0,m.ZP)("MuiNativeSelect",e)}const v=(0,h.Z)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var b=n(6934),y=n(184);const x=["className","disabled","error","IconComponent","inputRef","variant"],w=e=>{let{ownerState:t,theme:n}=e;return(0,r.Z)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,r.Z)({},n.vars?{backgroundColor:"rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(v.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},_=(0,b.ZP)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:b.FO,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{["&.".concat(v.multiple)]:t.multiple}]}})(w),S=e=>{let{ownerState:t,theme:n}=e;return(0,r.Z)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,["&.".concat(v.disabled)]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},k=(0,b.ZP)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,p.Z)(n.variant))],n.open&&t.iconOpen]}})(S),j=a.forwardRef((function(e,t){const{className:n,disabled:s,error:l,IconComponent:u,inputRef:d,variant:f="standard"}=e,h=(0,o.Z)(e,x),m=(0,r.Z)({},e,{disabled:s,variant:f,error:l}),v=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:a,error:i}=e,s={select:["select",n,r&&"disabled",o&&"multiple",i&&"error"],icon:["icon","icon".concat((0,p.Z)(n)),a&&"iconOpen",r&&"disabled"]};return(0,c.Z)(s,g,t)})(m);return(0,y.jsxs)(a.Fragment,{children:[(0,y.jsx)(_,(0,r.Z)({ownerState:m,className:(0,i.Z)(v.select,n),disabled:s,ref:d||t},h)),e.multiple?null:(0,y.jsx)(k,{as:u,ownerState:m,className:v.icon})]})}));var Z=n(5470),E=n(2071),C=n(8278);function N(e){return(0,m.ZP)("MuiSelect",e)}const I=(0,h.Z)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var A;const P=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],O=(0,b.ZP)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["&.".concat(I.select)]:t.select},{["&.".concat(I.select)]:t[n.variant]},{["&.".concat(I.error)]:t.error},{["&.".concat(I.multiple)]:t.multiple}]}})(w,{["&.".concat(I.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),T=(0,b.ZP)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,p.Z)(n.variant))],n.open&&t.iconOpen]}})(S),R=(0,b.ZP)("input",{shouldForwardProp:e=>(0,b.Dz)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function M(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function L(e){return null==e||"string"===typeof e&&!e.trim()}const D=a.forwardRef((function(e,t){var n;const{"aria-describedby":s,"aria-label":h,autoFocus:m,autoWidth:g,children:v,className:b,defaultOpen:x,defaultValue:w,disabled:_,displayEmpty:S,error:k=!1,IconComponent:j,inputRef:I,labelId:D,MenuProps:z={},multiple:F,name:B,onBlur:U,onChange:W,onClose:H,onFocus:$,onOpen:G,open:V,readOnly:q,renderValue:K,SelectDisplayProps:Y={},tabIndex:Q,value:X,variant:J="standard"}=e,ee=(0,o.Z)(e,P),[te,ne]=(0,C.Z)({controlled:X,default:w,name:"Select"}),[re,oe]=(0,C.Z)({controlled:V,default:x,name:"Select"}),ae=a.useRef(null),ie=a.useRef(null),[se,le]=a.useState(null),{current:ce}=a.useRef(null!=V),[ue,de]=a.useState(),pe=(0,E.Z)(t,I),fe=a.useCallback((e=>{ie.current=e,e&&le(e)}),[]),he=null==se?void 0:se.parentNode;a.useImperativeHandle(pe,(()=>({focus:()=>{ie.current.focus()},node:ae.current,value:te})),[te]),a.useEffect((()=>{x&&re&&se&&!ce&&(de(g?null:he.clientWidth),ie.current.focus())}),[se,g]),a.useEffect((()=>{m&&ie.current.focus()}),[m]),a.useEffect((()=>{if(!D)return;const e=(0,d.Z)(ie.current).getElementById(D);if(e){const t=()=>{getSelection().isCollapsed&&ie.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[D]);const me=(e,t)=>{e?G&&G(t):H&&H(t),ce||(de(g?null:he.clientWidth),oe(e))},ge=a.Children.toArray(v),ve=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(F){n=Array.isArray(te)?te.slice():[];const t=te.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),te!==n&&(ne(n),W)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:B}}),W(o,e)}F||me(!1,t)}},be=null!==se&&re;let ye,xe;delete ee["aria-invalid"];const we=[];let _e=!1,Se=!1;((0,Z.vd)({value:te})||S)&&(K?ye=K(te):_e=!0);const ke=ge.map((e=>{if(!a.isValidElement(e))return null;let t;if(F){if(!Array.isArray(te))throw new Error((0,l.Z)(2));t=te.some((t=>M(t,e.props.value))),t&&_e&&we.push(e.props.children)}else t=M(te,e.props.value),t&&_e&&(xe=e.props.children);return t&&(Se=!0),a.cloneElement(e,{"aria-selected":t?"true":"false",onClick:ve(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));_e&&(ye=F?0===we.length?null:we.reduce(((e,t,n)=>(e.push(t),n{const{classes:t,variant:n,disabled:r,multiple:o,open:a,error:i}=e,s={select:["select",n,r&&"disabled",o&&"multiple",i&&"error"],icon:["icon","icon".concat((0,p.Z)(n)),a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,c.Z)(s,N,t)})(Ce),Ie=(0,r.Z)({},z.PaperProps,null==(n=z.slotProps)?void 0:n.paper),Ae=(0,u.Z)();return(0,y.jsxs)(a.Fragment,{children:[(0,y.jsx)(O,(0,r.Z)({ref:fe,tabIndex:je,role:"combobox","aria-controls":Ae,"aria-disabled":_?"true":void 0,"aria-expanded":be?"true":"false","aria-haspopup":"listbox","aria-label":h,"aria-labelledby":[D,Ee].filter(Boolean).join(" ")||void 0,"aria-describedby":s,onKeyDown:e=>{if(!q){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),me(!0,e))}},onMouseDown:_||q?null:e=>{0===e.button&&(e.preventDefault(),ie.current.focus(),me(!0,e))},onBlur:e=>{!be&&U&&(Object.defineProperty(e,"target",{writable:!0,value:{value:te,name:B}}),U(e))},onFocus:$},Y,{ownerState:Ce,className:(0,i.Z)(Y.className,Ne.select,b),id:Ee,children:L(ye)?A||(A=(0,y.jsx)("span",{className:"notranslate",children:"\u200b"})):ye})),(0,y.jsx)(R,(0,r.Z)({"aria-invalid":k,value:Array.isArray(te)?te.join(","):te,name:B,ref:ae,"aria-hidden":!0,onChange:e=>{const t=ge.find((t=>t.props.value===e.target.value));void 0!==t&&(ne(t.props.value),W&&W(e,t))},tabIndex:-1,disabled:_,className:Ne.nativeInput,autoFocus:m,ownerState:Ce},ee)),(0,y.jsx)(T,{as:j,className:Ne.icon,ownerState:Ce}),(0,y.jsx)(f.Z,(0,r.Z)({id:"menu-".concat(B||""),anchorEl:he,open:be,onClose:e=>{me(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},z,{MenuListProps:(0,r.Z)({"aria-labelledby":D,role:"listbox","aria-multiselectable":F?"true":void 0,disableListWrap:!0,id:Ae},z.MenuListProps),slotProps:(0,r.Z)({},z.slotProps,{paper:(0,r.Z)({},Ie,{style:(0,r.Z)({minWidth:Ze},null!=Ie?Ie.style:null)})}),children:ke}))]})}));var z=n(6147),F=n(2930),B=n(9059),U=n(4110),W=n(6596),H=n(7196),$=n(1402);const G=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],V=["root"],q={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,b.FO)(e)&&"variant"!==e,slot:"Root"},K=(0,b.ZP)(U.Z,q)(""),Y=(0,b.ZP)(H.Z,q)(""),Q=(0,b.ZP)(W.Z,q)(""),X=a.forwardRef((function(e,t){const n=(0,$.Z)({name:"MuiSelect",props:e}),{autoWidth:l=!1,children:c,classes:u={},className:d,defaultOpen:p=!1,displayEmpty:f=!1,IconComponent:h=B.Z,id:m,input:g,inputProps:v,label:b,labelId:x,MenuProps:w,multiple:_=!1,native:S=!1,onClose:k,onOpen:Z,open:C,renderValue:N,SelectDisplayProps:I,variant:A="outlined"}=n,P=(0,o.Z)(n,G),O=S?j:D,T=(0,F.Z)(),R=(0,z.Z)({props:n,muiFormControl:T,states:["variant","error"]}),M=R.variant||A,L=(0,r.Z)({},n,{variant:M,classes:u}),U=(e=>{const{classes:t}=e;return t})(L),W=(0,o.Z)(U,V),H=g||{standard:(0,y.jsx)(K,{ownerState:L}),outlined:(0,y.jsx)(Y,{label:b,ownerState:L}),filled:(0,y.jsx)(Q,{ownerState:L})}[M],q=(0,E.Z)(t,H.ref);return(0,y.jsx)(a.Fragment,{children:a.cloneElement(H,(0,r.Z)({inputComponent:O,inputProps:(0,r.Z)({children:c,error:R.error,IconComponent:h,variant:M,type:void 0,multiple:_},S?{id:m}:{autoWidth:l,defaultOpen:p,displayEmpty:f,labelId:x,MenuProps:w,onClose:k,onOpen:Z,open:C,renderValue:N,SelectDisplayProps:(0,r.Z)({id:m},I)},v,{classes:v?(0,s.Z)(W,v.classes):W},g?g.props.inputProps:{})},_&&S&&"outlined"===M?{notched:!0}:{},{ref:q,className:(0,i.Z)(H.props.className,d,U.root)},!g&&{variant:M},P))})}));X.muiName="Select";const J=X},9955:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4402),c=n(4036),u=n(7278),d=n(1402),p=n(6934),f=n(5878),h=n(1217);function m(e){return(0,h.ZP)("MuiSwitch",e)}const g=(0,f.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var v=n(184);const b=["className","color","edge","size","sx"],y=(0,p.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t["edge".concat((0,c.Z)(n.edge))],t["size".concat((0,c.Z)(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,o.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===t.edge&&{marginLeft:-8},"end"===t.edge&&{marginRight:-8},"small"===t.size&&{width:40,height:24,padding:7,["& .".concat(g.thumb)]:{width:16,height:16},["& .".concat(g.switchBase)]:{padding:4,["&.".concat(g.checked)]:{transform:"translateX(16px)"}}})})),x=(0,p.ZP)(u.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{["& .".concat(g.input)]:t.input},"default"!==n.color&&t["color".concat((0,c.Z)(n.color))]]}})((e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:"".concat("light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]),transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),["&.".concat(g.checked)]:{transform:"translateX(20px)"},["&.".concat(g.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(g.checked," + .").concat(g.track)]:{opacity:.5},["&.".concat(g.disabled," + .").concat(g.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(g.input)]:{left:"-100%",width:"300%"}}}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(g.checked)]:{color:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.Fq)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(g.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(n.color,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,l.$n)(t.palette[n.color].main,.62):(0,l._j)(t.palette[n.color].main,.55))}},["&.".concat(g.checked," + .").concat(g.track)]:{backgroundColor:(t.vars||t).palette[n.color].main}})})),w=(0,p.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}})),_=(0,p.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}})),S=a.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiSwitch"}),{className:a,color:l="primary",edge:u=!1,size:p="medium",sx:f}=n,h=(0,r.Z)(n,b),g=(0,o.Z)({},n,{color:l,edge:u,size:p}),S=(e=>{const{classes:t,edge:n,size:r,color:a,checked:i,disabled:l}=e,u={root:["root",n&&"edge".concat((0,c.Z)(n)),"size".concat((0,c.Z)(r))],switchBase:["switchBase","color".concat((0,c.Z)(a)),i&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=(0,s.Z)(u,m,t);return(0,o.Z)({},t,d)})(g),k=(0,v.jsx)(_,{className:S.thumb,ownerState:g});return(0,v.jsxs)(y,{className:(0,i.Z)(S.root,a),sx:f,ownerState:g,children:[(0,v.jsx)(x,(0,o.Z)({type:"checkbox",icon:k,checkedIcon:k,ref:t,ownerState:g},h,{classes:(0,o.Z)({},S,{root:S.switchBase})})),(0,v.jsx)(w,{className:S.track,ownerState:g})]})}))},9836:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(6646),c=n(1402),u=n(6934),d=n(5878),p=n(1217);function f(e){return(0,p.ZP)("MuiTable",e)}(0,d.Z)("MuiTable",["root","stickyHeader"]);var h=n(184);const m=["className","component","padding","size","stickyHeader"],g=(0,u.ZP)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,o.Z)({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})})),v="table",b=a.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiTable"}),{className:u,component:d=v,padding:p="normal",size:b="medium",stickyHeader:y=!1}=n,x=(0,r.Z)(n,m),w=(0,o.Z)({},n,{component:d,padding:p,size:b,stickyHeader:y}),_=(e=>{const{classes:t,stickyHeader:n}=e,r={root:["root",n&&"stickyHeader"]};return(0,s.Z)(r,f,t)})(w),S=a.useMemo((()=>({padding:p,size:b,stickyHeader:y})),[p,b,y]);return(0,h.jsx)(l.Z.Provider,{value:S,children:(0,h.jsx)(g,(0,o.Z)({as:d,role:d===v?null:"table",ref:t,className:(0,i.Z)(_.root,u),ownerState:w},x))})}))},6646:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(2791).createContext()},829:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(2791).createContext()},3382:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(7462),o=n(3366),a=n(2791),i=n(9278),s=n(4419),l=n(829),c=n(1402),u=n(6934),d=n(5878),p=n(1217);function f(e){return(0,p.ZP)("MuiTableBody",e)}(0,d.Z)("MuiTableBody",["root"]);var h=n(184);const m=["className","component"],g=(0,u.ZP)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),v={variant:"body"},b="tbody",y=a.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiTableBody"}),{className:a,component:u=b}=n,d=(0,o.Z)(n,m),p=(0,r.Z)({},n,{component:u}),y=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},f,t)})(p);return(0,h.jsx)(l.Z.Provider,{value:v,children:(0,h.jsx)(g,(0,r.Z)({className:(0,i.Z)(y.root,a),as:u,ref:t,role:u===b?null:"rowgroup",ownerState:p},d))})}))},3994:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4402),c=n(4036),u=n(6646),d=n(829),p=n(1402),f=n(6934),h=n(5878),m=n(1217);function g(e){return(0,m.ZP)("MuiTableCell",e)}const v=(0,h.Z)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);var b=n(184);const y=["align","className","component","padding","scope","size","sortDirection","variant"],x=(0,f.ZP)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,c.Z)(n.size))],"normal"!==n.padding&&t["padding".concat((0,c.Z)(n.padding))],"inherit"!==n.align&&t["align".concat((0,c.Z)(n.align))],n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?"1px solid ".concat(t.vars.palette.TableCell.border):"1px solid\n ".concat("light"===t.palette.mode?(0,l.$n)((0,l.Fq)(t.palette.divider,1),.88):(0,l._j)((0,l.Fq)(t.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&{padding:"6px 16px",["&.".concat(v.paddingCheckbox)]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})})),w=a.forwardRef((function(e,t){const n=(0,p.Z)({props:e,name:"MuiTableCell"}),{align:l="inherit",className:f,component:h,padding:m,scope:v,size:w,sortDirection:_,variant:S}=n,k=(0,r.Z)(n,y),j=a.useContext(u.Z),Z=a.useContext(d.Z),E=Z&&"head"===Z.variant;let C;C=h||(E?"th":"td");let N=v;"td"===C?N=void 0:!N&&E&&(N="col");const I=S||Z&&Z.variant,A=(0,o.Z)({},n,{align:l,component:C,padding:m||(j&&j.padding?j.padding:"normal"),size:w||(j&&j.size?j.size:"medium"),sortDirection:_,stickyHeader:"head"===I&&j&&j.stickyHeader,variant:I}),P=(e=>{const{classes:t,variant:n,align:r,padding:o,size:a,stickyHeader:i}=e,l={root:["root",n,i&&"stickyHeader","inherit"!==r&&"align".concat((0,c.Z)(r)),"normal"!==o&&"padding".concat((0,c.Z)(o)),"size".concat((0,c.Z)(a))]};return(0,s.Z)(l,g,t)})(A);let O=null;return _&&(O="asc"===_?"ascending":"descending"),(0,b.jsx)(x,(0,o.Z)({as:C,ref:t,className:(0,i.Z)(P.root,f),"aria-sort":O,scope:N,ownerState:A},k))}))},9281:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(7462),o=n(3366),a=n(2791),i=n(9278),s=n(4419),l=n(1402),c=n(6934),u=n(5878),d=n(1217);function p(e){return(0,d.ZP)("MuiTableContainer",e)}(0,u.Z)("MuiTableContainer",["root"]);var f=n(184);const h=["className","component"],m=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),g=a.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiTableContainer"}),{className:a,component:c="div"}=n,u=(0,o.Z)(n,h),d=(0,r.Z)({},n,{component:c}),g=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},p,t)})(d);return(0,f.jsx)(m,(0,r.Z)({ref:t,as:c,className:(0,i.Z)(g.root,a),ownerState:d},u))}))},6890:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(7462),o=n(3366),a=n(2791),i=n(9278),s=n(4419),l=n(829),c=n(1402),u=n(6934),d=n(5878),p=n(1217);function f(e){return(0,p.ZP)("MuiTableHead",e)}(0,d.Z)("MuiTableHead",["root"]);var h=n(184);const m=["className","component"],g=(0,u.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),v={variant:"head"},b="thead",y=a.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiTableHead"}),{className:a,component:u=b}=n,d=(0,o.Z)(n,m),p=(0,r.Z)({},n,{component:u}),y=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},f,t)})(p);return(0,h.jsx)(l.Z.Provider,{value:v,children:(0,h.jsx)(g,(0,r.Z)({as:u,className:(0,i.Z)(y.root,a),ref:t,role:u===b?null:"rowgroup",ownerState:p},d))})}))},5855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(7462),o=n(3366),a=n(2791),i=n(9278),s=n(4419),l=n(4402),c=n(829),u=n(1402),d=n(6934),p=n(5878),f=n(1217);function h(e){return(0,f.ZP)("MuiTableRow",e)}const m=(0,p.Z)("MuiTableRow",["root","selected","hover","head","footer"]);var g=n(184);const v=["className","component","hover","selected"],b=(0,d.ZP)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,["&.".concat(m.hover,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(m.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,l.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}})),y="tr",x=a.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiTableRow"}),{className:l,component:d=y,hover:p=!1,selected:f=!1}=n,m=(0,o.Z)(n,v),x=a.useContext(c.Z),w=(0,r.Z)({},n,{component:d,hover:p,selected:f,head:x&&"head"===x.variant,footer:x&&"footer"===x.variant}),_=(e=>{const{classes:t,selected:n,hover:r,head:o,footer:a}=e,i={root:["root",n&&"selected",r&&"hover",o&&"head",a&&"footer"]};return(0,s.Z)(i,h,t)})(w);return(0,g.jsx)(b,(0,r.Z)({as:d,ref:t,className:(0,i.Z)(_.root,l),role:d===y?null:"row",ownerState:w},m))}))},9431:(e,t,n)=>{"use strict";n.d(t,{Z:()=>z});var r=n(7462),o=n(3366),a=n(2791),i=n(9278),s=n(4419),l=n(8252),c=n(6934),u=n(1402),d=n(4110),p=n(6596),f=n(7196),h=n(4925),m=n(5470),g=n(4036),v=n(9103),b=n(3840),y=n(5878),x=n(1217);function w(e){return(0,x.ZP)("MuiFormControl",e)}(0,y.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var _=n(184);const S=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],k=(0,c.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,r.Z)({},t.root,t["margin".concat((0,g.Z)(n.margin))],n.fullWidth&&t.fullWidth)}})((e=>{let{ownerState:t}=e;return(0,r.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),j=a.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiFormControl"}),{children:l,className:c,color:d="primary",component:p="div",disabled:f=!1,error:h=!1,focused:y,fullWidth:x=!1,hiddenLabel:j=!1,margin:Z="none",required:E=!1,size:C="medium",variant:N="outlined"}=n,I=(0,o.Z)(n,S),A=(0,r.Z)({},n,{color:d,component:p,disabled:f,error:h,fullWidth:x,hiddenLabel:j,margin:Z,required:E,size:C,variant:N}),P=(e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root","none"!==n&&"margin".concat((0,g.Z)(n)),r&&"fullWidth"]};return(0,s.Z)(o,w,t)})(A),[O,T]=a.useState((()=>{let e=!1;return l&&a.Children.forEach(l,(t=>{if(!(0,v.Z)(t,["Input","Select"]))return;const n=(0,v.Z)(t,["Select"])?t.props.input:t;n&&(0,m.B7)(n.props)&&(e=!0)})),e})),[R,M]=a.useState((()=>{let e=!1;return l&&a.Children.forEach(l,(t=>{(0,v.Z)(t,["Input","Select"])&&((0,m.vd)(t.props,!0)||(0,m.vd)(t.props.inputProps,!0))&&(e=!0)})),e})),[L,D]=a.useState(!1);f&&L&&D(!1);const z=void 0===y||f?L:y;let F;const B=a.useMemo((()=>({adornedStart:O,setAdornedStart:T,color:d,disabled:f,error:h,filled:R,focused:z,fullWidth:x,hiddenLabel:j,size:C,onBlur:()=>{D(!1)},onEmpty:()=>{M(!1)},onFilled:()=>{M(!0)},onFocus:()=>{D(!0)},registerEffect:F,required:E,variant:N})),[O,d,f,h,R,z,x,j,F,E,C,N]);return(0,_.jsx)(b.Z.Provider,{value:B,children:(0,_.jsx)(k,(0,r.Z)({as:p,ownerState:A,className:(0,i.Z)(P.root,c),ref:t},I,{children:l}))})}));var Z=n(6147),E=n(2930);function C(e){return(0,x.ZP)("MuiFormHelperText",e)}const N=(0,y.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var I;const A=["children","className","component","disabled","error","filled","focused","margin","required","variant"],P=(0,c.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t["size".concat((0,g.Z)(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(N.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(N.error)]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})})),O=a.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiFormHelperText"}),{children:a,className:l,component:c="p"}=n,d=(0,o.Z)(n,A),p=(0,E.Z)(),f=(0,Z.Z)({props:n,muiFormControl:p,states:["variant","size","disabled","error","filled","focused","required"]}),h=(0,r.Z)({},n,{component:c,contained:"filled"===f.variant||"outlined"===f.variant,variant:f.variant,size:f.size,disabled:f.disabled,error:f.error,filled:f.filled,focused:f.focused,required:f.required}),m=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:a,filled:i,focused:l,required:c}=e,u={root:["root",o&&"disabled",a&&"error",r&&"size".concat((0,g.Z)(r)),n&&"contained",l&&"focused",i&&"filled",c&&"required"]};return(0,s.Z)(u,C,t)})(h);return(0,_.jsx)(P,(0,r.Z)({as:c,ownerState:h,className:(0,i.Z)(m.root,l),ref:t},d,{children:" "===a?I||(I=(0,_.jsx)("span",{className:"notranslate",children:"\u200b"})):a}))}));var T=n(8406);function R(e){return(0,x.ZP)("MuiTextField",e)}(0,y.Z)("MuiTextField",["root"]);const M=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],L={standard:d.Z,filled:p.Z,outlined:f.Z},D=(0,c.ZP)(j,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),z=a.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiTextField"}),{autoComplete:a,autoFocus:c=!1,children:d,className:p,color:f="primary",defaultValue:m,disabled:g=!1,error:v=!1,FormHelperTextProps:b,fullWidth:y=!1,helperText:x,id:w,InputLabelProps:S,inputProps:k,InputProps:j,inputRef:Z,label:E,maxRows:C,minRows:N,multiline:I=!1,name:A,onBlur:P,onChange:z,onFocus:F,placeholder:B,required:U=!1,rows:W,select:H=!1,SelectProps:$,type:G,value:V,variant:q="outlined"}=n,K=(0,o.Z)(n,M),Y=(0,r.Z)({},n,{autoFocus:c,color:f,disabled:g,error:v,fullWidth:y,multiline:I,required:U,select:H,variant:q}),Q=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},R,t)})(Y);const X={};"outlined"===q&&(S&&"undefined"!==typeof S.shrink&&(X.notched=S.shrink),X.label=E),H&&($&&$.native||(X.id=void 0),X["aria-describedby"]=void 0);const J=(0,l.Z)(w),ee=x&&J?"".concat(J,"-helper-text"):void 0,te=E&&J?"".concat(J,"-label"):void 0,ne=L[q],re=(0,_.jsx)(ne,(0,r.Z)({"aria-describedby":ee,autoComplete:a,autoFocus:c,defaultValue:m,fullWidth:y,multiline:I,name:A,rows:W,maxRows:C,minRows:N,type:G,value:V,id:J,inputRef:Z,onBlur:P,onChange:z,onFocus:F,placeholder:B,inputProps:k},X,j));return(0,_.jsxs)(D,(0,r.Z)({className:(0,i.Z)(Q.root,p),disabled:g,error:v,fullWidth:y,ref:t,required:U,color:f,variant:q,ownerState:Y},K,{children:[null!=E&&""!==E&&(0,_.jsx)(h.Z,(0,r.Z)({htmlFor:J,id:te},S,{children:E})),H?(0,_.jsx)(T.Z,(0,r.Z)({"aria-describedby":ee,id:J,labelId:te,value:V,input:re},$,{children:d})):re,x&&(0,_.jsx)(O,(0,r.Z)({id:ee},b,{children:x}))]}))}))},68:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(183),c=n(4402),u=n(6934),d=n(3967),p=n(1402),f=n(4036),h=n(3208),m=n(5396),g=n(9683),v=n(2071),b=n(7384),y=n(3031),x=n(8278),w=n(5878),_=n(1217);function S(e){return(0,_.ZP)("MuiTooltip",e)}const k=(0,w.Z)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);var j=n(184);const Z=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const E=(0,u.ZP)(m.Z,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((e=>{let{theme:t,ownerState:n,open:r}=e;return(0,o.Z)({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!n.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},n.arrow&&{['&[data-popper-placement*="bottom"] .'.concat(k.arrow)]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},['&[data-popper-placement*="top"] .'.concat(k.arrow)]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},['&[data-popper-placement*="right"] .'.concat(k.arrow)]:(0,o.Z)({},n.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),['&[data-popper-placement*="left"] .'.concat(k.arrow)]:(0,o.Z)({},n.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})})),C=(0,u.ZP)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t["tooltipPlacement".concat((0,f.Z)(n.placement.split("-")[0]))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:(0,c.Fq)(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},n.arrow&&{position:"relative",margin:0},n.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:"".concat((r=16/14,Math.round(1e5*r)/1e5),"em"),fontWeight:t.typography.fontWeightRegular},{[".".concat(k.popper,'[data-popper-placement*="left"] &')]:(0,o.Z)({transformOrigin:"right center"},n.isRtl?(0,o.Z)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"}):(0,o.Z)({marginRight:"14px"},n.touch&&{marginRight:"24px"})),[".".concat(k.popper,'[data-popper-placement*="right"] &')]:(0,o.Z)({transformOrigin:"left center"},n.isRtl?(0,o.Z)({marginRight:"14px"},n.touch&&{marginRight:"24px"}):(0,o.Z)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"})),[".".concat(k.popper,'[data-popper-placement*="top"] &')]:(0,o.Z)({transformOrigin:"center bottom",marginBottom:"14px"},n.touch&&{marginBottom:"24px"}),[".".concat(k.popper,'[data-popper-placement*="bottom"] &')]:(0,o.Z)({transformOrigin:"center top",marginTop:"14px"},n.touch&&{marginTop:"24px"})});var r})),N=(0,u.ZP)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((e=>{let{theme:t}=e;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:(0,c.Fq)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}}));let I=!1,A=null,P={x:0,y:0};function O(e,t){return n=>{t&&t(n),e(n)}}const T=a.forwardRef((function(e,t){var n,c,u,w,_,k,T,R,M,L,D,z,F,B,U,W,H,$,G;const V=(0,p.Z)({props:e,name:"MuiTooltip"}),{arrow:q=!1,children:K,components:Y={},componentsProps:Q={},describeChild:X=!1,disableFocusListener:J=!1,disableHoverListener:ee=!1,disableInteractive:te=!1,disableTouchListener:ne=!1,enterDelay:re=100,enterNextDelay:oe=0,enterTouchDelay:ae=700,followCursor:ie=!1,id:se,leaveDelay:le=0,leaveTouchDelay:ce=1500,onClose:ue,onOpen:de,open:pe,placement:fe="bottom",PopperComponent:he,PopperProps:me={},slotProps:ge={},slots:ve={},title:be,TransitionComponent:ye=h.Z,TransitionProps:xe}=V,we=(0,r.Z)(V,Z),_e=a.isValidElement(K)?K:(0,j.jsx)("span",{children:K}),Se=(0,d.Z)(),ke="rtl"===Se.direction,[je,Ze]=a.useState(),[Ee,Ce]=a.useState(null),Ne=a.useRef(!1),Ie=te||ie,Ae=a.useRef(),Pe=a.useRef(),Oe=a.useRef(),Te=a.useRef(),[Re,Me]=(0,x.Z)({controlled:pe,default:!1,name:"Tooltip",state:"open"});let Le=Re;const De=(0,b.Z)(se),ze=a.useRef(),Fe=a.useCallback((()=>{void 0!==ze.current&&(document.body.style.WebkitUserSelect=ze.current,ze.current=void 0),clearTimeout(Te.current)}),[]);a.useEffect((()=>()=>{clearTimeout(Ae.current),clearTimeout(Pe.current),clearTimeout(Oe.current),Fe()}),[Fe]);const Be=e=>{clearTimeout(A),I=!0,Me(!0),de&&!Le&&de(e)},Ue=(0,g.Z)((e=>{clearTimeout(A),A=setTimeout((()=>{I=!1}),800+le),Me(!1),ue&&Le&&ue(e),clearTimeout(Ae.current),Ae.current=setTimeout((()=>{Ne.current=!1}),Se.transitions.duration.shortest)})),We=e=>{Ne.current&&"touchstart"!==e.type||(je&&je.removeAttribute("title"),clearTimeout(Pe.current),clearTimeout(Oe.current),re||I&&oe?Pe.current=setTimeout((()=>{Be(e)}),I?oe:re):Be(e))},He=e=>{clearTimeout(Pe.current),clearTimeout(Oe.current),Oe.current=setTimeout((()=>{Ue(e)}),le)},{isFocusVisibleRef:$e,onBlur:Ge,onFocus:Ve,ref:qe}=(0,y.Z)(),[,Ke]=a.useState(!1),Ye=e=>{Ge(e),!1===$e.current&&(Ke(!1),He(e))},Qe=e=>{je||Ze(e.currentTarget),Ve(e),!0===$e.current&&(Ke(!0),We(e))},Xe=e=>{Ne.current=!0;const t=_e.props;t.onTouchStart&&t.onTouchStart(e)},Je=We,et=He,tt=e=>{Xe(e),clearTimeout(Oe.current),clearTimeout(Ae.current),Fe(),ze.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Te.current=setTimeout((()=>{document.body.style.WebkitUserSelect=ze.current,We(e)}),ae)},nt=e=>{_e.props.onTouchEnd&&_e.props.onTouchEnd(e),Fe(),clearTimeout(Oe.current),Oe.current=setTimeout((()=>{Ue(e)}),ce)};a.useEffect((()=>{if(Le)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Ue(e)}}),[Ue,Le]);const rt=(0,v.Z)(_e.ref,qe,Ze,t);be||0===be||(Le=!1);const ot=a.useRef(),at={},it="string"===typeof be;X?(at.title=Le||!it||ee?null:be,at["aria-describedby"]=Le?De:null):(at["aria-label"]=it?be:null,at["aria-labelledby"]=Le&&!it?De:null);const st=(0,o.Z)({},at,we,_e.props,{className:(0,i.Z)(we.className,_e.props.className),onTouchStart:Xe,ref:rt},ie?{onMouseMove:e=>{const t=_e.props;t.onMouseMove&&t.onMouseMove(e),P={x:e.clientX,y:e.clientY},ot.current&&ot.current.update()}}:{});const lt={};ne||(st.onTouchStart=tt,st.onTouchEnd=nt),ee||(st.onMouseOver=O(Je,st.onMouseOver),st.onMouseLeave=O(et,st.onMouseLeave),Ie||(lt.onMouseOver=Je,lt.onMouseLeave=et)),J||(st.onFocus=O(Qe,st.onFocus),st.onBlur=O(Ye,st.onBlur),Ie||(lt.onFocus=Qe,lt.onBlur=Ye));const ct=a.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(Ee),options:{element:Ee,padding:4}}];return null!=(e=me.popperOptions)&&e.modifiers&&(t=t.concat(me.popperOptions.modifiers)),(0,o.Z)({},me.popperOptions,{modifiers:t})}),[Ee,me]),ut=(0,o.Z)({},V,{isRtl:ke,arrow:q,disableInteractive:Ie,placement:fe,PopperComponentProp:he,touch:Ne.current}),dt=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:a}=e,i={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch","tooltipPlacement".concat((0,f.Z)(a.split("-")[0]))],arrow:["arrow"]};return(0,s.Z)(i,S,t)})(ut),pt=null!=(n=null!=(c=ve.popper)?c:Y.Popper)?n:E,ft=null!=(u=null!=(w=null!=(_=ve.transition)?_:Y.Transition)?w:ye)?u:h.Z,ht=null!=(k=null!=(T=ve.tooltip)?T:Y.Tooltip)?k:C,mt=null!=(R=null!=(M=ve.arrow)?M:Y.Arrow)?R:N,gt=(0,l.$)(pt,(0,o.Z)({},me,null!=(L=ge.popper)?L:Q.popper,{className:(0,i.Z)(dt.popper,null==me?void 0:me.className,null==(D=null!=(z=ge.popper)?z:Q.popper)?void 0:D.className)}),ut),vt=(0,l.$)(ft,(0,o.Z)({},xe,null!=(F=ge.transition)?F:Q.transition),ut),bt=(0,l.$)(ht,(0,o.Z)({},null!=(B=ge.tooltip)?B:Q.tooltip,{className:(0,i.Z)(dt.tooltip,null==(U=null!=(W=ge.tooltip)?W:Q.tooltip)?void 0:U.className)}),ut),yt=(0,l.$)(mt,(0,o.Z)({},null!=(H=ge.arrow)?H:Q.arrow,{className:(0,i.Z)(dt.arrow,null==($=null!=(G=ge.arrow)?G:Q.arrow)?void 0:$.className)}),ut);return(0,j.jsxs)(a.Fragment,{children:[a.cloneElement(_e,st),(0,j.jsx)(pt,(0,o.Z)({as:null!=he?he:m.Z,placement:fe,anchorEl:ie?{getBoundingClientRect:()=>({top:P.y,left:P.x,right:P.x,bottom:P.y,width:0,height:0})}:je,popperRef:ot,open:!!je&&Le,id:De,transition:!0},lt,gt,{popperOptions:ct,children:e=>{let{TransitionProps:t}=e;return(0,j.jsx)(ft,(0,o.Z)({timeout:Se.transitions.duration.shorter},t,vt,{children:(0,j.jsxs)(ht,(0,o.Z)({},bt,{children:[be,q?(0,j.jsx)(mt,(0,o.Z)({},yt,{ref:Ce})):null]}))}))}}))]})}))},890:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(8519),l=n(4419),c=n(6934),u=n(1402),d=n(4036),p=n(5878),f=n(1217);function h(e){return(0,f.ZP)("MuiTypography",e)}(0,p.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var m=n(184);const g=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],v=(0,c.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,d.Z)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),b={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},y={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=a.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiTypography"}),a=(e=>y[e]||e)(n.color),c=(0,s.Z)((0,o.Z)({},n,{color:a})),{align:p="inherit",className:f,component:x,gutterBottom:w=!1,noWrap:_=!1,paragraph:S=!1,variant:k="body1",variantMapping:j=b}=c,Z=(0,r.Z)(c,g),E=(0,o.Z)({},c,{align:p,color:a,className:f,component:x,gutterBottom:w,noWrap:_,paragraph:S,variant:k,variantMapping:j}),C=x||(S?"p":j[k]||b[k])||"span",N=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:i}=e,s={root:["root",a,"inherit"!==e.align&&"align".concat((0,d.Z)(t)),n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return(0,l.Z)(s,h,i)})(E);return(0,m.jsx)(v,(0,o.Z)({as:C,ref:t,ownerState:E,className:(0,i.Z)(N.root,f)},Z))}))},427:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},3771:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"}},7:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},5519:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},7851:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"}},1258:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},2460:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},7278:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(3366),o=n(7462),a=n(2791),i=n(9278),s=n(4419),l=n(4036),c=n(6934),u=n(8278),d=n(2930),p=n(3701),f=n(5878),h=n(1217);function m(e){return(0,h.ZP)("PrivateSwitchBase",e)}(0,f.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var g=n(184);const v=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],b=(0,c.ZP)(p.Z)((e=>{let{ownerState:t}=e;return(0,o.Z)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),y=(0,c.ZP)("input",{shouldForwardProp:c.FO})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),x=a.forwardRef((function(e,t){const{autoFocus:n,checked:a,checkedIcon:c,className:p,defaultChecked:f,disabled:h,disableFocusRipple:x=!1,edge:w=!1,icon:_,id:S,inputProps:k,inputRef:j,name:Z,onBlur:E,onChange:C,onFocus:N,readOnly:I,required:A=!1,tabIndex:P,type:O,value:T}=e,R=(0,r.Z)(e,v),[M,L]=(0,u.Z)({controlled:a,default:Boolean(f),name:"SwitchBase",state:"checked"}),D=(0,d.Z)();let z=h;D&&"undefined"===typeof z&&(z=D.disabled);const F="checkbox"===O||"radio"===O,B=(0,o.Z)({},e,{checked:M,disabled:z,disableFocusRipple:x,edge:w}),U=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,a={root:["root",n&&"checked",r&&"disabled",o&&"edge".concat((0,l.Z)(o))],input:["input"]};return(0,s.Z)(a,m,t)})(B);return(0,g.jsxs)(b,(0,o.Z)({component:"span",className:(0,i.Z)(U.root,p),centerRipple:!0,focusRipple:!x,disabled:z,tabIndex:null,role:void 0,onFocus:e=>{N&&N(e),D&&D.onFocus&&D.onFocus(e)},onBlur:e=>{E&&E(e),D&&D.onBlur&&D.onBlur(e)},ownerState:B,ref:t},R,{children:[(0,g.jsx)(y,(0,o.Z)({autoFocus:n,checked:a,defaultChecked:f,className:U.input,disabled:z,id:F?S:void 0,name:Z,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;L(t),C&&C(e,t)},readOnly:I,ref:j,required:A,ownerState:B,tabIndex:P,type:O},"checkbox"===O&&void 0===T?{}:{value:T},k)),M?c:_]}))}))},9059:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});n(2791);var r=n(6189),o=n(184);const a=(0,r.Z)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},8799:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});n(2791);var r=n(6189),o=n(184);const a=(0,r.Z)((0,o.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},6532:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case a:case s:case i:case p:case f:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case m:case h:case l:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference")},8457:(e,t,n)=>{"use strict";n(6532)},7291:(e,t,n)=>{"use strict";n.d(t,{Z:()=>F});var r=n(7462),o=n(3366),a=n(6187),i=n(2466),s=n(5080),l=n(7416),c=n(104);function u(e,t){return(0,r.Z)({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var d=n(4402);const p={black:"#000",white:"#fff"};var f=n(5519);const h={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var m=n(2460),g=n(1258),v=n(427),b=n(7851),y=n(7);const x=["mode","contrastThreshold","tonalOffset"],w={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:p.white,default:p.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:p.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:p.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function S(e,t,n,r){const o=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,d.$n)(e.main,o):"dark"===t&&(e.dark=(0,d._j)(e.main,a)))}function k(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,l=(0,o.Z)(e,x),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v.Z[200],light:v.Z[50],dark:v.Z[400]}:{main:v.Z[700],light:v.Z[400],dark:v.Z[800]}}(t),u=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[200],light:h[50],dark:h[400]}:{main:h[500],light:h[300],dark:h[700]}}(t),k=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m.Z[500],light:m.Z[300],dark:m.Z[700]}:{main:m.Z[700],light:m.Z[400],dark:m.Z[800]}}(t),j=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:b.Z[400],light:b.Z[300],dark:b.Z[700]}:{main:b.Z[700],light:b.Z[500],dark:b.Z[900]}}(t),Z=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y.Z[400],light:y.Z[300],dark:y.Z[700]}:{main:y.Z[800],light:y.Z[500],dark:y.Z[900]}}(t),E=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g.Z[400],light:g.Z[300],dark:g.Z[700]}:{main:"#ed6c02",light:g.Z[500],dark:g.Z[900]}}(t);function C(e){return(0,d.mi)(e,_.text.primary)>=n?_.text.primary:w.text.primary}const N=e=>{let{color:t,name:n,mainShade:o=500,lightShade:i=300,darkShade:l=700}=e;if(t=(0,r.Z)({},t),!t.main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,a.Z)(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error((0,a.Z)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return S(t,"light",i,s),S(t,"dark",l,s),t.contrastText||(t.contrastText=C(t.main)),t},I={dark:_,light:w};return(0,i.Z)((0,r.Z)({common:(0,r.Z)({},p),mode:t,primary:N({color:c,name:"primary"}),secondary:N({color:u,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:N({color:k,name:"error"}),warning:N({color:E,name:"warning"}),info:N({color:j,name:"info"}),success:N({color:Z,name:"success"}),grey:f.Z,contrastThreshold:n,getContrastText:C,augmentColor:N,tonalOffset:s},I[t]),l)}const j=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const Z={textTransform:"uppercase"},E='"Roboto", "Helvetica", "Arial", sans-serif';function C(e,t){const n="function"===typeof t?t(e):t,{fontFamily:a=E,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:p=16,allVariants:f,pxToRem:h}=n,m=(0,o.Z)(n,j);const g=s/14,v=h||(e=>"".concat(e/p*g,"rem")),b=(e,t,n,o,i)=>{return(0,r.Z)({fontFamily:a,fontWeight:e,fontSize:v(t),lineHeight:n},a===E?{letterSpacing:"".concat((s=o/t,Math.round(1e5*s)/1e5),"em")}:{},i,f);var s},y={h1:b(l,96,1.167,-1.5),h2:b(l,60,1.2,-.5),h3:b(c,48,1.167,0),h4:b(c,34,1.235,.25),h5:b(c,24,1.334,0),h6:b(u,20,1.6,.15),subtitle1:b(c,16,1.75,.15),subtitle2:b(u,14,1.57,.1),body1:b(c,16,1.5,.15),body2:b(c,14,1.43,.15),button:b(u,14,1.75,.4,Z),caption:b(c,12,1.66,.4),overline:b(c,12,2.66,1,Z),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,i.Z)((0,r.Z)({htmlFontSize:p,pxToRem:v,fontFamily:a,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},y),m,{clone:!1})}function N(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const I=["none",N(0,2,1,-1,0,1,1,0,0,1,3,0),N(0,3,1,-2,0,2,2,0,0,1,5,0),N(0,3,3,-2,0,3,4,0,0,1,8,0),N(0,2,4,-1,0,4,5,0,0,1,10,0),N(0,3,5,-1,0,5,8,0,0,1,14,0),N(0,3,5,-1,0,6,10,0,0,1,18,0),N(0,4,5,-2,0,7,10,1,0,2,16,1),N(0,5,5,-3,0,8,10,1,0,3,14,2),N(0,5,6,-3,0,9,12,1,0,3,16,2),N(0,6,6,-3,0,10,14,1,0,4,18,3),N(0,6,7,-4,0,11,15,1,0,4,20,3),N(0,7,8,-4,0,12,17,2,0,5,22,4),N(0,7,8,-4,0,13,19,2,0,5,24,4),N(0,7,9,-4,0,14,21,2,0,5,26,4),N(0,8,9,-5,0,15,22,2,0,6,28,5),N(0,8,10,-5,0,16,24,2,0,6,30,5),N(0,8,11,-5,0,17,26,2,0,6,32,5),N(0,9,11,-5,0,18,28,2,0,7,34,6),N(0,9,12,-6,0,19,29,2,0,7,36,6),N(0,10,13,-6,0,20,31,3,0,8,38,7),N(0,10,13,-6,0,21,33,3,0,8,40,7),N(0,10,14,-6,0,22,35,3,0,8,42,7),N(0,11,14,-7,0,23,36,3,0,9,44,8),N(0,11,15,-7,0,24,38,3,0,9,46,8)],A=["duration","easing","delay"],P={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},O={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function T(e){return"".concat(Math.round(e),"ms")}function R(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function M(e){const t=(0,r.Z)({},P,e.easing),n=(0,r.Z)({},O,e.duration);return(0,r.Z)({getAutoHeightDuration:R,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:a=n.standard,easing:i=t.easeInOut,delay:s=0}=r;(0,o.Z)(r,A);return(Array.isArray(e)?e:[e]).map((e=>"".concat(e," ").concat("string"===typeof a?a:T(a)," ").concat(i," ").concat("string"===typeof s?s:T(s)))).join(",")}},e,{easing:t,duration:n})}const L={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},D=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:d={},typography:p={}}=e,f=(0,o.Z)(e,D);if(e.vars)throw new Error((0,a.Z)(18));const h=k(n),m=(0,s.Z)(e);let g=(0,i.Z)(m,{mixins:u(m.breakpoints,t),palette:h,shadows:I.slice(),typography:C(h,p),transitions:M(d),zIndex:(0,r.Z)({},L)});g=(0,i.Z)(g,f);for(var v=arguments.length,b=new Array(v>1?v-1:0),y=1;y(0,i.Z)(e,t)),g),g.unstable_sxConfig=(0,r.Z)({},l.Z,null==f?void 0:f.unstable_sxConfig),g.unstable_sx=function(e){return(0,c.Z)({sx:e,theme:this})},g}const F=z},6482:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(7291).Z)()},988:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="$$material"},6934:(e,t,n)=>{"use strict";n.d(t,{Dz:()=>s,FO:()=>i,ZP:()=>l});var r=n(4046),o=n(6482),a=n(988);const i=e=>(0,r.x9)(e)&&"classes"!==e,s=r.x9,l=(0,r.ZP)({themeId:a.Z,defaultTheme:o.Z,rootShouldForwardProp:i})},3967:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});n(2791);var r=n(418),o=n(6482),a=n(988);function i(){const e=(0,r.Z)(o.Z);return e[a.Z]||e}},1402:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(7078),o=n(6482),a=n(988);function i(e){let{props:t,name:n}=e;return(0,r.Z)({props:t,name:n,defaultTheme:o.Z,themeId:a.Z})}},4999:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,n:()=>r});const r=e=>e.scrollTop;function o(e,t){var n,r;const{timeout:o,easing:a,style:i={}}=e;return{duration:null!=(n=i.transitionDuration)?n:"number"===typeof o?o:o[t.mode]||0,easing:null!=(r=i.transitionTimingFunction)?r:"object"===typeof a?a[t.mode]:a,delay:i.transitionDelay}}},4036:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(1122).Z},6189:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(7462),o=n(2791),a=n(3366),i=n(9278),s=n(4419),l=n(4036),c=n(1402),u=n(6934),d=n(5878),p=n(1217);function f(e){return(0,p.ZP)("MuiSvgIcon",e)}(0,d.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var h=n(184);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,u.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.Z)(n.color))],t["fontSize".concat((0,l.Z)(n.fontSize))]]}})((e=>{let{theme:t,ownerState:n}=e;var r,o,a,i,s,l,c,u,d,p,f,h,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(o=r.create)?void 0:o.call(r,"fill",{duration:null==(a=t.transitions)||null==(a=a.duration)?void 0:a.shorter}),fontSize:{inherit:"inherit",small:(null==(i=t.typography)||null==(s=i.pxToRem)?void 0:s.call(i,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[n.fontSize],color:null!=(p=null==(f=(t.vars||t).palette)||null==(f=f[n.color])?void 0:f.main)?p:{action:null==(h=(t.vars||t).palette)||null==(h=h.action)?void 0:h.active,disabled:null==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0}[n.color]}})),v=o.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:p="inherit",component:v="svg",fontSize:b="medium",htmlColor:y,inheritViewBox:x=!1,titleAccess:w,viewBox:_="0 0 24 24"}=n,S=(0,a.Z)(n,m),k=o.isValidElement(u)&&"svg"===u.type,j=(0,r.Z)({},n,{color:p,component:v,fontSize:b,instanceFontSize:e.fontSize,inheritViewBox:x,viewBox:_,hasSvgAsChild:k}),Z={};x||(Z.viewBox=_);const E=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&"color".concat((0,l.Z)(t)),"fontSize".concat((0,l.Z)(n))]};return(0,s.Z)(o,f,r)})(j);return(0,h.jsxs)(g,(0,r.Z)({as:v,className:(0,i.Z)(E.root,d),focusable:"false",color:y,"aria-hidden":!w||void 0,role:w?"img":void 0,ref:t},Z,S,k&&u.props,{ownerState:j,children:[k?u.props.children:u,w?(0,h.jsx)("title",{children:w}):null]}))}));v.muiName="SvgIcon";const b=v;function y(e,t){function n(n,o){return(0,h.jsx)(b,(0,r.Z)({"data-testid":"".concat(t,"Icon"),ref:o},n,{children:e}))}return n.muiName=b.muiName,o.memo(o.forwardRef(n))}},3199:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(2254).Z},4421:(e,t,n)=>{"use strict";n.r(t),n.d(t,{capitalize:()=>o.Z,createChainedFunction:()=>a,createSvgIcon:()=>i.Z,debounce:()=>s.Z,deprecatedPropType:()=>l,isMuiElement:()=>c.Z,ownerDocument:()=>u.Z,ownerWindow:()=>d.Z,requirePropFactory:()=>p,setRef:()=>f,unstable_ClassNameGenerator:()=>w,unstable_useEnhancedEffect:()=>h.Z,unstable_useId:()=>m.Z,unsupportedProp:()=>g,useControlled:()=>v.Z,useEventCallback:()=>b.Z,useForkRef:()=>y.Z,useIsFocusVisible:()=>x.Z});var r=n(5902),o=n(4036);const a=n(8949).Z;var i=n(6189),s=n(3199);const l=function(e,t){return()=>null};var c=n(9103),u=n(8301),d=n(7602);n(7462);const p=function(e,t){return()=>null};const f=n(2971).Z;var h=n(162),m=n(7384);const g=function(e,t,n,r,o){return null};var v=n(8278),b=n(9683),y=n(2071),x=n(3031);const w={configure:e=>{r.Z.configure(e)}}},9103:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2791);const o=function(e,t){var n,o;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(o=e.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},8301:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(4913).Z},7602:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(5202).Z},8278:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(8637).Z},162:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(2876).Z},9683:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(7054).Z},2071:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(6117).Z},7384:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(8252).Z},3031:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(2791);let o,a=!0,i=!1;const s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function c(){a=!1}function u(){"hidden"===this.visibilityState&&i&&(a=!0)}function d(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return a||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!s[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}const p=function(){const e=r.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",u,!0))}),[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!d(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(i=!0,window.clearTimeout(o),o=window.setTimeout((()=>{i=!1}),100),t.current=!1,!0)},ref:e}}},2421:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>b,Co:()=>y});var r=n(7462),o=n(2791),a=n(9797),i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,a.Z)((function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(2564),c=n(5438),u=n(1849),d=n(2561),p=s,f=function(e){return"theme"!==e},h=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?p:f},m=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.hC)(t,n,r),(0,d.L)((function(){return(0,c.My)(t,n,r)})),null},v=function e(t,n){var a,i,s=t.__emotion_real===t,d=s&&t.__emotion_base||t;void 0!==n&&(a=n.label,i=n.target);var p=m(t,n,s),f=p||h(d),v=!f("as");return function(){var b=arguments,y=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&y.push("label:"+a+";"),null==b[0]||void 0===b[0].raw)y.push.apply(y,b);else{0,y.push(b[0][0]);for(var x=b.length,w=1;w{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},1184:(e,t,n)=>{"use strict";n.d(t,{L7:()=>l,P$:()=>u,VO:()=>o,W8:()=>s,dt:()=>c,k9:()=>i});var r=n(2466);const o={xs:0,sm:600,md:900,lg:1200,xl:1536},a={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(o[e],"px)")};function i(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||a;return t.reduce(((r,o,a)=>(r[e.up(e.keys[a])]=n(t[a]),r)),{})}if("object"===typeof t){const e=r.breakpoints||a;return Object.keys(t).reduce(((r,a)=>{if(-1!==Object.keys(e.values||o).indexOf(a)){r[e.up(a)]=n(t[a],a)}else{const e=a;r[e]=t[e]}return r}),{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const n=null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return n||{}}function l(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function c(e){const t=s(e);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a(0,r.Z)(e,t)),{});return l(Object.keys(t),i)}function u(e){let{values:t,breakpoints:n,base:r}=e;const o=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(t,n),a=Object.keys(o);if(0===a.length)return t;let i;return a.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[i],i=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[i],i=n):e[n]=t,e)),{})}},4402:(e,t,n)=>{"use strict";n.d(t,{Fq:()=>u,_j:()=>d,mi:()=>c,$n:()=>p});var r=n(6187);const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))};function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return o(e,t,n)}function i(e){if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", "),")"):""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.Z)(9,e));let o,a=e.substring(t+1,e.length-1);if("color"===n){if(a=a.split(" "),o=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error((0,r.Z)(10,o))}else a=a.split(",");return a=a.map((e=>parseFloat(e))),{type:n,values:a,colorSpace:o}}function s(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function l(e){let t="hsl"===(e=i(e)).type||"hsla"===e.type?i(function(e){e=i(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,a=r*Math.min(o,1-o),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-a*Math.max(Math.min(t-3,9-t,1),-1)};let c="rgb";const u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),s({type:c,values:u})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){const n=l(e),r=l(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(e,t){return e=i(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,s(e)}function d(e,t){if(e=i(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return s(e)}function p(e,t){if(e=i(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return s(e)}},4046:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>Z,x9:()=>x});var r=n(3366),o=n(7462),a=n(2421),i=n(2466),s=n(5080),l=n(1122);const c=["variant"];function u(e){return 0===e.length}function d(e){const{variant:t}=e,n=(0,r.Z)(e,c);let o=t||"";return Object.keys(n).sort().forEach((t=>{o+="color"===t?u(o)?e[t]:(0,l.Z)(e[t]):"".concat(u(o)?t:(0,l.Z)(t)).concat((0,l.Z)(e[t].toString()))})),o}var p=n(104);const f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(e){return"string"===typeof e&&e.charCodeAt(0)>96}const m=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,g=e=>{let t=0;const n={};return e&&e.forEach((e=>{let r="";"function"===typeof e.props?(r="callback".concat(t),t+=1):r=d(e.props),n[r]=e.style})),n},v=(e,t)=>{let n=[];return t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants),g(n)},b=(e,t,n)=>{const{ownerState:r={}}=e,a=[];let i=0;return n&&n.forEach((n=>{let s=!0;if("function"===typeof n.props){const t=(0,o.Z)({},e,r);s=n.props(t)}else Object.keys(n.props).forEach((t=>{r[t]!==n.props[t]&&e[t]!==n.props[t]&&(s=!1)}));s&&("function"===typeof n.props?a.push(t["callback".concat(i)]):a.push(t[d(n.props)])),"function"===typeof n.props&&(i+=1)})),a},y=(e,t,n,r)=>{var o;const a=null==n||null==(o=n.components)||null==(o=o[r])?void 0:o.variants;return b(e,t,a)};function x(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const w=(0,s.Z)(),_=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function S(e){let{defaultTheme:t,theme:n,themeId:r}=e;return o=n,0===Object.keys(o).length?t:n[r]||n;var o}function k(e){return e?(t,n)=>n[e]:null}const j=e=>{let{styledArg:t,props:n,defaultTheme:r,themeId:a}=e;const i=t((0,o.Z)({},n,{theme:S((0,o.Z)({},n,{defaultTheme:r,themeId:a}))}));let s;if(i&&i.variants&&(s=i.variants,delete i.variants),s){return[i,...b(n,g(s),s)]}return i};function Z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=w,rootShouldForwardProp:s=x,slotShouldForwardProp:l=x}=e,c=e=>(0,p.Z)((0,o.Z)({},e,{theme:S((0,o.Z)({},e,{defaultTheme:n,themeId:t}))}));return c.__mui_systemSx=!0,function(e){let u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.Co)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:p,skipVariantsResolver:w,skipSx:Z,overridesResolver:E=k(_(p))}=u,C=(0,r.Z)(u,f),N=void 0!==w?w:p&&"Root"!==p&&"root"!==p||!1,I=Z||!1;let A;let P=x;"Root"===p||"root"===p?P=s:p?P=l:h(e)&&(P=void 0);const O=(0,a.ZP)(e,(0,o.Z)({shouldForwardProp:P,label:A},C)),T=function(r){for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l{if("function"===typeof e&&e.__emotion_real!==e)return r=>j({styledArg:e,props:r,defaultTheme:n,themeId:t});if((0,i.P)(e)){let t,n=e;return e&&e.variants&&(t=e.variants,delete n.variants,n=n=>{let r=e;return b(n,g(t),t).forEach((e=>{r=(0,i.Z)(r,e)})),r}),n}return e})):[];let p=r;if((0,i.P)(r)){let e;r&&r.variants&&(e=r.variants,delete p.variants,p=t=>{let n=r;return b(t,g(e),e).forEach((e=>{n=(0,i.Z)(n,e)})),n})}else"function"===typeof r&&r.__emotion_real!==r&&(p=e=>j({styledArg:r,props:e,defaultTheme:n,themeId:t}));d&&E&&u.push((e=>{const r=S((0,o.Z)({},e,{defaultTheme:n,themeId:t})),a=m(d,r);if(a){const t={};return Object.entries(a).forEach((n=>{let[a,i]=n;t[a]="function"===typeof i?i((0,o.Z)({},e,{theme:r})):i})),E(e,t)}return null})),d&&!N&&u.push((e=>{const r=S((0,o.Z)({},e,{defaultTheme:n,themeId:t}));return y(e,v(d,r),r,d)})),I||u.push(c);const f=u.length-s.length;if(Array.isArray(r)&&f>0){const e=new Array(f).fill("");p=[...r,...e],p.raw=[...r.raw,...e]}const h=O(p,...u);return e.muiName&&(h.muiName=e.muiName),h};return O.withConfig&&(T.withConfig=O.withConfig),T}}},5080:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(7462),o=n(3366),a=n(2466);const i=["values","unit","step"];function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,s=(0,o.Z)(e,i),l=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,r.Z)({},e,{[t.key]:t.val})),{})})(t),c=Object.keys(l);function u(e){const r="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(r).concat(n,")")}function d(e){const r="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(r-a/100).concat(n,")")}function p(e,r){const o=c.indexOf(r);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(n,") and ")+"(max-width:".concat((-1!==o&&"number"===typeof t[c[o]]?t[c[o]]:r)-a/100).concat(n,")")}return(0,r.Z)({keys:c,values:l,up:u,down:d,between:p,only:function(e){return c.indexOf(e)+10&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,c.hB)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r{const n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return n.mui=!0,n}var d=n(104),p=n(7416);const f=["breakpoints","palette","spacing","shape"];const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:i,shape:c={}}=e,h=(0,o.Z)(e,f),m=s(t),g=u(i);let v=(0,a.Z)({breakpoints:m,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},n),spacing:g,shape:(0,r.Z)({},l,c)},h);for(var b=arguments.length,y=new Array(b>1?b-1:0),x=1;x(0,a.Z)(e,t)),v),v.unstable_sxConfig=(0,r.Z)({},p.Z,null==h?void 0:h.unstable_sxConfig),v.unstable_sx=function(e){return(0,d.Z)({sx:e,theme:this})},v}},8247:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2466);const o=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},5682:(e,t,n)=>{"use strict";n.d(t,{hB:()=>h,eI:()=>f,NA:()=>m,e6:()=>b,o3:()=>y});var r=n(1184),o=n(8529),a=n(8247);const i={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=i[t],o=s[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],p=[...u,...d];function f(e,t,n,r){var a;const i=null!=(a=(0,o.DW)(e,t,!1))?a:n;return"number"===typeof i?e=>"string"===typeof e?e:i*e:Array.isArray(i)?e=>"string"===typeof e?e:i[e]:"function"===typeof i?i:()=>{}}function h(e){return f(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function g(e,t,n,o){if(-1===t.indexOf(n))return null;const a=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=m(t,n),e)),{})}(c(n),o),i=e[n];return(0,r.k9)(e,i,a)}function v(e,t){const n=h(e.theme);return Object.keys(e).map((r=>g(e,t,r,n))).reduce(a.Z,{})}function b(e){return v(e,u)}function y(e){return v(e,d)}function x(e){return v(e,p)}b.propTypes={},b.filterProps=u,y.propTypes={},y.filterProps=d,x.propTypes={},x.filterProps=p},8529:(e,t,n)=>{"use strict";n.d(t,{DW:()=>a,Jq:()=>i,ZP:()=>s});var r=n(1122),o=n(1184);function a(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function i(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:a(e,n)||o,t&&(r=t(r,o,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=a(e.theme,s)||{};return(0,o.k9)(e,c,(e=>{let o=i(u,l,e);return e===o&&"string"===typeof e&&(o=i(u,l,"".concat(t).concat("default"===e?"":(0,r.Z)(e)),e)),!1===n?o:{[n]:o}}))};return c.propTypes={},c.filterProps=[t],c}},7416:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(5682),o=n(8529),a=n(8247);const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),o=e=>Object.keys(e).reduce(((t,n)=>r[n]?(0,a.Z)(t,r[n](e)):t),{});return o.propTypes={},o.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),o};var s=n(1184);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,o.ZP)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),p=c("borderRight",l),f=c("borderBottom",l),h=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),b=c("borderBottomColor"),y=c("borderLeftColor"),x=c("outline",l),w=c("outlineColor"),_=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r.NA)(t,e)});return(0,s.k9)(e,e.borderRadius,n)}return null};_.propTypes={},_.filterProps=["borderRadius"];i(u,d,p,f,h,m,g,v,b,y,_,x,w);const S=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.eI)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.gap,n)}return null};S.propTypes={},S.filterProps=["gap"];const k=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.eI)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.columnGap,n)}return null};k.propTypes={},k.filterProps=["columnGap"];const j=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.eI)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.rowGap,n)}return null};j.propTypes={},j.filterProps=["rowGap"];i(S,k,j,(0,o.ZP)({prop:"gridColumn"}),(0,o.ZP)({prop:"gridRow"}),(0,o.ZP)({prop:"gridAutoFlow"}),(0,o.ZP)({prop:"gridAutoColumns"}),(0,o.ZP)({prop:"gridAutoRows"}),(0,o.ZP)({prop:"gridTemplateColumns"}),(0,o.ZP)({prop:"gridTemplateRows"}),(0,o.ZP)({prop:"gridTemplateAreas"}),(0,o.ZP)({prop:"gridArea"}));function Z(e,t){return"grey"===t?t:e}i((0,o.ZP)({prop:"color",themeKey:"palette",transform:Z}),(0,o.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Z}),(0,o.ZP)({prop:"backgroundColor",themeKey:"palette",transform:Z}));function E(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const C=(0,o.ZP)({prop:"width",transform:E}),N=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const o=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.VO[t];return o?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:"".concat(o).concat(e.theme.breakpoints.unit)}:{maxWidth:o}:{maxWidth:E(t)}};return(0,s.k9)(e,e.maxWidth,t)}return null};N.filterProps=["maxWidth"];const I=(0,o.ZP)({prop:"minWidth",transform:E}),A=(0,o.ZP)({prop:"height",transform:E}),P=(0,o.ZP)({prop:"maxHeight",transform:E}),O=(0,o.ZP)({prop:"minHeight",transform:E}),T=((0,o.ZP)({prop:"size",cssProperty:"width",transform:E}),(0,o.ZP)({prop:"size",cssProperty:"height",transform:E}),i(C,N,I,A,P,O,(0,o.ZP)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:_},color:{themeKey:"palette",transform:Z},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Z},backgroundColor:{themeKey:"palette",transform:Z},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:S},rowGap:{style:j},columnGap:{style:k},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:E},maxWidth:{style:N},minWidth:{transform:E},height:{transform:E},maxHeight:{transform:E},minHeight:{transform:E},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},8519:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7462),o=n(3366),a=n(2466),i=n(7416);const s=["sx"];function l(e){const{sx:t}=e,n=(0,o.Z)(e,s),{systemProps:l,otherProps:c}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:i.Z;return Object.keys(e).forEach((t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r})(n);let u;return u=Array.isArray(t)?[l,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,a.P)(e)?(0,r.Z)({},l,e):l}:(0,r.Z)({},l,t),(0,r.Z)({},c,{sx:u})}},104:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(1122),o=n(8247),a=n(8529),i=n(1184),s=n(7416);const l=function(){function e(e,t,n,o){const s={[e]:t,theme:n},l=o[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:p}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const f=(0,a.DW)(n,u)||{};if(p)return p(s);return(0,i.k9)(s,t,(t=>{let n=(0,a.Jq)(f,d,t);return t===n&&"string"===typeof t&&(n=(0,a.Jq)(f,d,"".concat(e).concat("default"===t?"":(0,r.Z)(t)),t)),!1===c?n:{[c]:n}}))}return function t(n){var r;const{sx:a,theme:l={}}=n||{};if(!a)return null;const c=null!=(r=l.unstable_sxConfig)?r:s.Z;function u(n){let r=n;if("function"===typeof n)r=n(l);else if("object"!==typeof n)return n;if(!r)return null;const a=(0,i.W8)(l.breakpoints),s=Object.keys(a);let u=a;return Object.keys(r).forEach((n=>{const a=(s=r[n],d=l,"function"===typeof s?s(d):s);var s,d;if(null!==a&&void 0!==a)if("object"===typeof a)if(c[n])u=(0,o.Z)(u,e(n,a,l,c));else{const e=(0,i.k9)({theme:l},a,(e=>({[n]:e})));!function(){for(var e=arguments.length,t=new Array(e),n=0;ne.concat(Object.keys(t))),[]),o=new Set(r);return t.every((e=>o.size===Object.keys(e).length))}(e,a)?u=(0,o.Z)(u,e):u[n]=t({sx:a,theme:l})}else u=(0,o.Z)(u,e(n,a,l,c))})),(0,i.L7)(s,u)}return Array.isArray(a)?a.map(u):u(a)}}();l.filterProps=["sx"];const c=l},418:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5080),o=n(9120);const a=(0,r.Z)();const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;return(0,o.Z)(e)}},7078:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5735);var o=n(418);function a(e){let{props:t,name:n,defaultTheme:a,themeId:i}=e,s=(0,o.Z)(a);i&&(s=s[i]||s);const l=function(e){const{theme:t,name:n,props:o}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,o):o}({theme:s,name:n,props:t});return l}},9120:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2791),o=n(2564);function a(e){return 0===Object.keys(e).length}const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(o.T);return!t||a(t)?e:t}},5902:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const r=e=>e,o=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},1122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(6187);function o(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},4419:(e,t,n)=>{"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}n.d(t,{Z:()=>r})},8949:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;nnull==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o{}))}n.d(t,{Z:()=>r})},2254:(e,t,n)=>{"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),a=0;a{e.apply(this,o)};clearTimeout(t),t=setTimeout(i,n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{Z:()=>r})},2466:(e,t,n)=>{"use strict";n.d(t,{P:()=>o,Z:()=>i});var r=n(7462);function o(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function a(e){if(!o(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=a(e[n])})),t}function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const s=n.clone?(0,r.Z)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(o(t[r])&&r in e&&o(e[r])?s[r]=i(e[r],t[r],n):n.clone?s[r]=o(t[r])?a(t[r]):t[r]:s[r]=t[r])})),s}},6187:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nr})},1217:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>a,_v:()=>o});var r=n(5902);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const a=o[t];return a?"".concat(n,"-").concat(a):"".concat(r.Z.generate(e),"-").concat(t)}},5878:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(1217);function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const o={};return t.forEach((t=>{o[t]=(0,r.ZP)(e,t,n)})),o}},7137:(e,t,n)=>{"use strict";function r(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}n.d(t,{Z:()=>r})},4913:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:()=>r})},5202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4913);function o(e){return(0,r.Z)(e).defaultView||window}},5735:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7462);function o(e,t){const n=(0,r.Z)({},t);return Object.keys(e).forEach((a=>{if(a.toString().match(/^(components|slots)$/))n[a]=(0,r.Z)({},e[a],n[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){const i=e[a]||{},s=t[a];n[a]={},s&&Object.keys(s)?i&&Object.keys(i)?(n[a]=(0,r.Z)({},s),Object.keys(i).forEach((e=>{n[a][e]=o(i[e],s[e])}))):n[a]=s:n[a]=i}else void 0===n[a]&&(n[a]=e[a])})),n}},2971:(e,t,n)=>{"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:()=>r})},8637:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2791);function o(e){let{controlled:t,default:n,name:o,state:a="value"}=e;const{current:i}=r.useRef(void 0!==t),[s,l]=r.useState(n);return[i?t:s,r.useCallback((e=>{i||l(e)}),[])]}},2876:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2791);const o="undefined"!==typeof window?r.useLayoutEffect:r.useEffect},7054:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2791),o=n(2876);const a=function(e){const t=r.useRef(e);return(0,o.Z)((()=>{t.current=e})),r.useRef((function(){return(0,t.current)(...arguments)})).current}},6117:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2791),o=n(2971);function a(){for(var e=arguments.length,t=new Array(e),n=0;nt.every((e=>null==e))?null:e=>{t.forEach((t=>{(0,o.Z)(t,e)}))}),t)}},8252:(e,t,n)=>{"use strict";var r;n.d(t,{Z:()=>s});var o=n(2791);let a=0;const i=(r||(r=n.t(o,2)))["useId".toString()];function s(e){if(void 0!==i){const t=i();return null!=e?e:t}return function(e){const[t,n]=o.useState(e),r=e||t;return o.useEffect((()=>{null==t&&(a+=1,n("mui-".concat(a)))}),[t]),r}(e)}},1443:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tu,RQ:()=>N,WK:()=>R,Zn:()=>S,Zq:()=>E,aU:()=>o,cP:()=>d,fp:()=>m,kG:()=>k,pC:()=>C,q_:()=>i}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const a="popstate";function i(e){return void 0===e&&(e={}),f((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=d(e.location.hash.substr(1));return c("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:u(t))}),(function(e,t){s("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function s(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function l(e){return{usr:e.state,key:e.key}}function c(e,t,n,o){return void 0===n&&(n=null),r({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?d(t):t,{state:n,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function u(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function d(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function p(e){let t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:u(e);return new URL(n,t)}function f(e,t,n,i){void 0===i&&(i={});let{window:s=document.defaultView,v5Compat:d=!1}=i,f=s.history,h=o.Pop,m=null;function g(){h=o.Pop,m&&m({action:h,location:v.location})}let v={get action(){return h},get location(){return e(s,f)},listen(e){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(a,g),m=e,()=>{s.removeEventListener(a,g),m=null}},createHref:e=>t(s,e),encodeLocation(e){let t=p(u(e));return r({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){h=o.Push;let r=c(v.location,e,t);n&&n(r,e);let a=l(r),i=v.createHref(r);try{f.pushState(a,"",i)}catch(u){s.location.assign(i)}d&&m&&m({action:h,location:v.location})},replace:function(e,t){h=o.Replace;let r=c(v.location,e,t);n&&n(r,e);let a=l(r),i=v.createHref(r);f.replaceState(a,"",i),d&&m&&m({action:h,location:v.location})},go:e=>f.go(e)};return v}var h;function m(e,t,n){void 0===n&&(n="/");let r=S(("string"===typeof t?d(t):t).pathname||"/",n);if(null==r)return null;let o=g(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let a=null;for(let i=0;null==a&&i{let a={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(k(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let i=N([r,a.relativePath]),s=n.concat(a);e.children&&e.children.length>0&&(k(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+i+'".'),g(e.children,t,s,i)),(null!=e.path||e.index)&&t.push({path:i,score:y(i,e.index),routesMeta:s})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(h||(h={}));const v=/^:\w+$/,b=e=>"*"===e;function y(e,t){let n=e.split("/"),r=n.length;return n.some(b)&&(r+=-2),t&&(r+=2),n.filter((e=>!b(e))).reduce(((e,t)=>e+(v.test(t)?3:""===t?1:10)),r)}function x(e,t){let{routesMeta:n}=e,r={},o="/",a=[];for(let i=0;i(r.push(t),"([^\\/]+)")));e.endsWith("*")?(r.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");return[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=s[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return j(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(s[n]||"",t),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function _(e){try{return decodeURI(e)}catch(t){return j(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function S(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function k(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function j(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function Z(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function E(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function C(e,t,n,o){let a;void 0===o&&(o=!1),"string"===typeof e?a=d(e):(a=r({},e),k(!a.pathname||!a.pathname.includes("?"),Z("?","pathname","search",a)),k(!a.pathname||!a.pathname.includes("#"),Z("#","pathname","hash",a)),k(!a.search||!a.search.includes("#"),Z("#","search","hash",a)));let i,s=""===e||""===a.pathname,l=s?"/":a.pathname;if(o||null==l)i=n;else{let e=t.length-1;if(l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?d(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:A(r),hash:P(o)}}(a,i),u=l&&"/"!==l&&l.endsWith("/"),p=(s||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!p||(c.pathname+="/"),c}const N=e=>e.join("/").replace(/\/\/+/g,"/"),I=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),A=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",P=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class O extends Error{}class T{constructor(e,t,n){this.status=e,this.statusText=t||"",this.data=n}}function R(e){return e instanceof T}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;const M=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD",...M])},4569:(e,t,n)=>{e.exports=n(8036)},3381:(e,t,n)=>{"use strict";var r=n(3589),o=n(7297),a=n(9301),i=n(9774),s=n(1804),l=n(9145),c=n(5411),u=n(6467);e.exports=function(e){return new Promise((function(t,n){var d=e.data,p=e.headers,f=e.responseType;r.isFormData(d)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(m+":"+g)}var v=s(e.baseURL,e.url);function b(){if(h){var r="getAllResponseHeaders"in h?l(h.getAllResponseHeaders()):null,a={data:f&&"text"!==f&&"json"!==f?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,n,a),h=null}}if(h.open(e.method.toUpperCase(),i(v,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=b:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(b)},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||c(v))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}"setRequestHeader"in h&&r.forEach(p,(function(e,t){"undefined"===typeof d&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),f&&"json"!==f&&(h.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},8036:(e,t,n)=>{"use strict";var r=n(3589),o=n(4049),a=n(3773),i=n(777);function s(e){var t=new a(e),n=o(a.prototype.request,t);return r.extend(n,a.prototype,t),r.extend(n,t),n}var l=s(n(221));l.Axios=a,l.create=function(e){return s(i(l.defaults,e))},l.Cancel=n(9346),l.CancelToken=n(6857),l.isCancel=n(5517),l.all=function(e){return Promise.all(e)},l.spread=n(8089),l.isAxiosError=n(9580),e.exports=l,e.exports.default=l},9346:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},6857:(e,t,n)=>{"use strict";var r=n(9346);function o(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},5517:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},3773:(e,t,n)=>{"use strict";var r=n(3589),o=n(9774),a=n(7470),i=n(2733),s=n(777),l=n(7835),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var u=[i,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var d=e;n.length;){var p=n.shift(),f=n.shift();try{d=p(d)}catch(h){f(h);break}}try{o=i(d)}catch(h){return Promise.reject(h)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},7470:(e,t,n)=>{"use strict";var r=n(3589);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},1804:(e,t,n)=>{"use strict";var r=n(4044),o=n(9549);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},6467:(e,t,n)=>{"use strict";var r=n(6460);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},2733:(e,t,n)=>{"use strict";var r=n(3589),o=n(2693),a=n(5517),i=n(221);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return s(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},6460:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},777:(e,t,n)=>{"use strict";var r=n(3589);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],a=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=l(void 0,e[o])):n[o]=l(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(a,c),r.forEach(i,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=l(void 0,e[o])):n[o]=l(void 0,t[o])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=o.concat(a).concat(i).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,c),n}},7297:(e,t,n)=>{"use strict";var r=n(6467);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},2693:(e,t,n)=>{"use strict";var r=n(3589),o=n(221);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},221:(e,t,n)=>{"use strict";var r=n(3589),o=n(4341),a=n(6460),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(3381)),e}(),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(o){if("SyntaxError"!==o.name)throw o}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(i){if("SyntaxError"===s.name)throw a(s,this,"E_JSON_PARSE");throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(i)})),e.exports=l},4049:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(3589);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},9549:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},9301:(e,t,n)=>{"use strict";var r=n(3589);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4044:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},9580:e=>{"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},5411:(e,t,n)=>{"use strict";var r=n(3589);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},4341:(e,t,n)=>{"use strict";var r=n(3589);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},9145:(e,t,n)=>{"use strict";var r=n(3589),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},8089:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7835:(e,t,n)=>{"use strict";var r=n(8593),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={},i=r.version.split(".");function s(e,t){for(var n=t?t.split("."):i,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]0;){var a=r[o],i=t[a];if(i){var s=e[a],l=void 0===s||i(s,a,e);if(!0!==l)throw new TypeError("option "+a+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},3589:(e,t,n)=>{"use strict";var r=n(4049),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function i(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function l(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n{"use strict";var r=n(2458),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,i,s,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),s=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=o[t.format]||o.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),c&&document.body.removeChild(c),i()}return u}},7892:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",s="day",l="week",c="month",u="quarter",d="year",p="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},b={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var s=t.name;x[s]=t,o=s}return!r&&o&&(y=o),o||!r&&y},S=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new j(n)},k=b;k.l=_,k.i=w,k.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var j=function(){function g(e){this.$L=_(e.locale,null,!0),this.parse(e)}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return k},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return S(e)=0&&(a[d]=parseInt(u,10))}var p=a[3],f=24===p?0:p,h=a[0]+"-"+a[1]+"-"+a[2]+" "+f+":"+a[4]+":"+a[5]+":000",m=+t;return(o.utc(h).valueOf()-(m-=m%1e3))/6e4},l=r.prototype;l.tz=function(e,t){void 0===e&&(e=a);var n=this.utcOffset(),r=this.toDate(),i=r.toLocaleString("en-US",{timeZone:e}),s=Math.round((r-new Date(i))/1e3/60),l=o(i).$set("millisecond",this.$ms).utcOffset(15*-Math.round(r.getTimezoneOffset()/15)-s,!0);if(t){var c=l.utcOffset();l=l.add(n-c,"minute")}return l.$x.$timezone=e,l},l.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=i(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,i=n||t||a,l=s(+o(),i);if("string"!=typeof e)return o(e).tz(i);var c=function(e,t,n){var r=e-60*t*1e3,o=s(r,n);if(t===o)return[r,t];var a=s(r-=60*(o-t)*1e3,n);return o===a?[r,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}(o.utc(e,r).valueOf(),l,i),u=c[0],d=c[1],p=o(u).utcOffset(d);return p.$x.$timezone=i,p},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){a=e}}}()},3027:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,a){var i=o.prototype;a.utc=function(e){return new o({date:e,utc:!0,args:arguments})},i.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=i.utcOffset;i.utcOffset=function(r,o){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],a=o[0],i=60*+o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,s=this;if(o)return s.$offset=i,s.$u=0===r,s;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(i+l,e)).$offset=i,s.$x.$localOffset=l}else s=this.utc();return s};var u=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return p.call(this,e,t,n);var r=this.local(),o=a(e).local();return p.call(r,o,t,n)}}}()},4707:e=>{!function(){var t;function n(e){for(var t,n,r,o,a=1,i=[].slice.call(arguments),s=0,l=e.length,c="",u=!1,d=!1,p=function(){return i[a++]},f=function(){for(var n="";/\d/.test(e[s]);)n+=e[s++],t=e[s];return n.length>0?parseInt(n):null};s{"use strict";var r=n(8309),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),m=l(n),g=0;g{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case m:case l:return e;default:return t}}case o:return t}}}function _(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||w(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===s||e===i||e===f||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===y||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},8309:(e,t,n)=>{"use strict";e.exports=n(746)},763:function(e,t,n){var r;e=n.nmd(e),function(){var o,a="Expected a function",i="__lodash_hash_undefined__",s="__lodash_placeholder__",l=16,c=32,u=64,d=128,p=256,f=1/0,h=9007199254740991,m=NaN,g=4294967295,v=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",u],["rearg",p]],b="[object Arguments]",y="[object Array]",x="[object Boolean]",w="[object Date]",_="[object Error]",S="[object Function]",k="[object GeneratorFunction]",j="[object Map]",Z="[object Number]",E="[object Object]",C="[object Promise]",N="[object RegExp]",I="[object Set]",A="[object String]",P="[object Symbol]",O="[object WeakMap]",T="[object ArrayBuffer]",R="[object DataView]",M="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",z="[object Int16Array]",F="[object Int32Array]",B="[object Uint8Array]",U="[object Uint8ClampedArray]",W="[object Uint16Array]",H="[object Uint32Array]",$=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Y=RegExp(q.source),Q=RegExp(K.source),X=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),ie=/^\s+/,se=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,be=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,xe=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",je="\\u2700-\\u27bf",Ze="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Ne="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="['\u2019]",Ae="[\\ud800-\\udfff]",Pe="["+Ne+"]",Oe="["+ke+"]",Te="\\d+",Re="[\\u2700-\\u27bf]",Me="["+Ze+"]",Le="[^\\ud800-\\udfff"+Ne+Te+je+Ze+Ee+"]",De="\\ud83c[\\udffb-\\udfff]",ze="[^\\ud800-\\udfff]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ee+"]",We="(?:"+Me+"|"+Le+")",He="(?:"+Ue+"|"+Le+")",$e="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ge="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Oe+"|"+De+")"+"?",qe="[\\ufe0e\\ufe0f]?",Ke=qe+Ve+("(?:\\u200d(?:"+[ze,Fe,Be].join("|")+")"+qe+Ve+")*"),Ye="(?:"+[Re,Fe,Be].join("|")+")"+Ke,Qe="(?:"+[ze+Oe+"?",Oe,Fe,Be,Ae].join("|")+")",Xe=RegExp(Ie,"g"),Je=RegExp(Oe,"g"),et=RegExp(De+"(?="+De+")|"+Qe+Ke,"g"),tt=RegExp([Ue+"?"+Me+"+"+$e+"(?="+[Pe,Ue,"$"].join("|")+")",He+"+"+Ge+"(?="+[Pe,Ue+We,"$"].join("|")+")",Ue+"?"+We+"+"+$e,Ue+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,Ye].join("|"),"g"),nt=RegExp("[\\u200d\\ud800-\\udfff"+ke+Ce+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,it={};it[M]=it[L]=it[D]=it[z]=it[F]=it[B]=it[U]=it[W]=it[H]=!0,it[b]=it[y]=it[T]=it[x]=it[R]=it[w]=it[_]=it[S]=it[j]=it[Z]=it[E]=it[N]=it[I]=it[A]=it[O]=!1;var st={};st[b]=st[y]=st[T]=st[R]=st[x]=st[w]=st[M]=st[L]=st[D]=st[z]=st[F]=st[j]=st[Z]=st[E]=st[N]=st[I]=st[A]=st[P]=st[B]=st[U]=st[W]=st[H]=!0,st[_]=st[S]=st[O]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ut=parseInt,dt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,ft=dt||pt||Function("return this")(),ht=t&&!t.nodeType&&t,mt=ht&&e&&!e.nodeType&&e,gt=mt&&mt.exports===ht,vt=gt&&dt.process,bt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||vt&&vt.binding&&vt.binding("util")}catch(t){}}(),yt=bt&&bt.isArrayBuffer,xt=bt&&bt.isDate,wt=bt&&bt.isMap,_t=bt&&bt.isRegExp,St=bt&&bt.isSet,kt=bt&&bt.isTypedArray;function jt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Zt(e,t,n,r){for(var o=-1,a=null==e?0:e.length;++o-1}function Pt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function tn(e,t){for(var n=e.length;n--&&Bt(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var rn=Gt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),on=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+lt[e]}function sn(e){return nt.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,r=e.length,o=0,a=[];++n",""":'"',"'":"'"});var vn=function e(t){var n=(t=null==t?ft:vn.defaults(ft.Object(),t,vn.pick(ft,ot))).Array,r=t.Date,se=t.Error,ke=t.Function,je=t.Math,Ze=t.Object,Ee=t.RegExp,Ce=t.String,Ne=t.TypeError,Ie=n.prototype,Ae=ke.prototype,Pe=Ze.prototype,Oe=t["__core-js_shared__"],Te=Ae.toString,Re=Pe.hasOwnProperty,Me=0,Le=function(){var e=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),De=Pe.toString,ze=Te.call(Ze),Fe=ft._,Be=Ee("^"+Te.call(Re).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=gt?t.Buffer:o,We=t.Symbol,He=t.Uint8Array,$e=Ue?Ue.allocUnsafe:o,Ge=cn(Ze.getPrototypeOf,Ze),Ve=Ze.create,qe=Pe.propertyIsEnumerable,Ke=Ie.splice,Ye=We?We.isConcatSpreadable:o,Qe=We?We.iterator:o,et=We?We.toStringTag:o,nt=function(){try{var e=fa(Ze,"defineProperty");return e({},"",{}),e}catch(t){}}(),lt=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,dt=r&&r.now!==ft.Date.now&&r.now,pt=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=je.ceil,mt=je.floor,vt=Ze.getOwnPropertySymbols,bt=Ue?Ue.isBuffer:o,Dt=t.isFinite,Gt=Ie.join,bn=cn(Ze.keys,Ze),yn=je.max,xn=je.min,wn=r.now,_n=t.parseInt,Sn=je.random,kn=Ie.reverse,jn=fa(t,"DataView"),Zn=fa(t,"Map"),En=fa(t,"Promise"),Cn=fa(t,"Set"),Nn=fa(t,"WeakMap"),In=fa(Ze,"create"),An=Nn&&new Nn,Pn={},On=Fa(jn),Tn=Fa(Zn),Rn=Fa(En),Mn=Fa(Cn),Ln=Fa(Nn),Dn=We?We.prototype:o,zn=Dn?Dn.valueOf:o,Fn=Dn?Dn.toString:o;function Bn(e){if(rs(e)&&!Gi(e)&&!(e instanceof $n)){if(e instanceof Hn)return e;if(Re.call(e,"__wrapped__"))return Ba(e)}return new Hn(e)}var Un=function(){function e(){}return function(t){if(!ns(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Wn(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function $n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function cr(e,t,n,r,a,i){var s,l=1&t,c=2&t,u=4&t;if(n&&(s=a?n(e,r,a,i):n(e)),s!==o)return s;if(!ns(e))return e;var d=Gi(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Ao(e,s)}else{var p=ga(e),f=p==S||p==k;if(Yi(e))return jo(e,l);if(p==E||p==b||f&&!a){if(s=c||f?{}:ba(e),!l)return c?function(e,t){return Po(e,ma(e),t)}(e,function(e,t){return e&&Po(t,Ts(t),e)}(s,e)):function(e,t){return Po(e,ha(e),t)}(e,ar(s,e))}else{if(!st[p])return a?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case T:return Zo(e);case x:case w:return new r(+e);case R:return function(e,t){var n=t?Zo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case L:case D:case z:case F:case B:case U:case W:case H:return Eo(e,n);case j:return new r;case Z:case A:return new r(e);case N:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return new r;case P:return o=e,zn?Ze(zn.call(o)):{}}var o}(e,p,l)}}i||(i=new Yn);var h=i.get(e);if(h)return h;i.set(e,s),ls(e)?e.forEach((function(r){s.add(cr(r,t,n,r,e,i))})):os(e)&&e.forEach((function(r,o){s.set(o,cr(r,t,n,o,e,i))}));var m=d?o:(u?c?ia:aa:c?Ts:Os)(e);return Et(m||e,(function(r,o){m&&(r=e[o=r]),nr(s,o,cr(r,t,n,o,e,i))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ze(e);r--;){var a=n[r],i=t[a],s=e[a];if(s===o&&!(a in e)||!i(s))return!1}return!0}function dr(e,t,n){if("function"!=typeof e)throw new Ne(a);return Oa((function(){e.apply(o,n)}),t)}function pr(e,t,n,r){var o=-1,a=At,i=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Ot(t,Qt(n))),r?(a=Pt,i=!1):t.length>=200&&(a=Jt,i=!1,t=new Kn(t));e:for(;++o-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(Zn||Vn),string:new Gn}},qn.prototype.delete=function(e){var t=da(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return da(this,e).get(e)},qn.prototype.has=function(e){return da(this,e).has(e)},qn.prototype.set=function(e,t){var n=da(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,i),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!Zn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ro(wr),hr=Ro(_r,!0);function mr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function gr(e,t,n){for(var r=-1,a=e.length;++r0&&n(s)?t>1?br(s,t-1,n,r,o):Tt(o,s):r||(o[o.length]=s)}return o}var yr=Mo(),xr=Mo(!0);function wr(e,t){return e&&yr(e,t,Os)}function _r(e,t){return e&&xr(e,t,Os)}function Sr(e,t){return It(t,(function(t){return Ji(e[t])}))}function kr(e,t){for(var n=0,r=(t=wo(t,e)).length;null!=e&&nt}function Cr(e,t){return null!=e&&Re.call(e,t)}function Nr(e,t){return null!=e&&t in Ze(e)}function Ir(e,t,r){for(var a=r?Pt:At,i=e[0].length,s=e.length,l=s,c=n(s),u=1/0,d=[];l--;){var p=e[l];l&&t&&(p=Ot(p,Qt(t))),u=xn(p.length,u),c[l]=!r&&(t||i>=120&&p.length>=120)?new Kn(l&&p):o}p=e[0];var f=-1,h=c[0];e:for(;++f=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Gr(e,t,n){for(var r=-1,o=t.length,a={};++r-1;)s!==e&&Ke.call(s,l,1),Ke.call(e,l,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==a){var a=o;xa(o)?Ke.call(e,o,1):fo(e,o)}}return e}function Kr(e,t){return e+mt(Sn()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return Ta(Ca(e,t,al),e+"")}function Xr(e){return Xn(Us(e))}function Jr(e,t){var n=Us(e);return La(n,lr(t,0,n.length))}function eo(e,t,n,r){if(!ns(e))return e;for(var a=-1,i=(t=wo(t,e)).length,s=i-1,l=e;null!=l&&++aa?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=n(a);++o>>1,i=e[a];null!==i&&!us(i)&&(n?i<=t:i=200){var c=t?null:Qo(e);if(c)return dn(c);i=!1,o=Jt,l=new Kn}else l=t?[]:s;e:for(;++r=r?e:oo(e,t,n)}var ko=lt||function(e){return ft.clearTimeout(e)};function jo(e,t){if(t)return e.slice();var n=e.length,r=$e?$e(n):new e.constructor(n);return e.copy(r),r}function Zo(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Eo(e,t){var n=t?Zo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Co(e,t){if(e!==t){var n=e!==o,r=null===e,a=e===e,i=us(e),s=t!==o,l=null===t,c=t===t,u=us(t);if(!l&&!u&&!i&&e>t||i&&s&&c&&!l&&!u||r&&s&&c||!n&&c||!a)return 1;if(!r&&!i&&!u&&e1?n[a-1]:o,s=a>2?n[2]:o;for(i=e.length>3&&"function"==typeof i?(a--,i):o,s&&wa(n[0],n[1],s)&&(i=a<3?o:i,a=1),t=Ze(t);++r-1?a[i?t[s]:s]:o}}function Bo(e){return oa((function(t){var n=t.length,r=n,i=Hn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ne(a);if(i&&!l&&"wrapper"==la(s))var l=new Hn([],!0)}for(r=l?r:n;++r1&&y.reverse(),f&&ul))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var p=-1,f=!0,h=2&n?new Kn:o;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Et(v,(function(n){var r="_."+n[0];t&n[1]&&!At(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(ue):[]}(r),n)))}function Ma(e){var t=0,n=0;return function(){var r=wn(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function La(e,t){var n=-1,r=e.length,a=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,si(e,n)}));function hi(e){var t=Bn(e);return t.__chain__=!0,t}function mi(e,t){return t(e)}var gi=oa((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,a=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof $n&&xa(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:mi,args:[a],thisArg:o}),new Hn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(a)}));var vi=Oo((function(e,t,n){Re.call(e,n)?++e[n]:ir(e,n,1)}));var bi=Fo($a),yi=Fo(Ga);function xi(e,t){return(Gi(e)?Et:fr)(e,ua(t,3))}function wi(e,t){return(Gi(e)?Ct:hr)(e,ua(t,3))}var _i=Oo((function(e,t,n){Re.call(e,n)?e[n].push(t):ir(e,n,[t])}));var Si=Qr((function(e,t,r){var o=-1,a="function"==typeof t,i=qi(e)?n(e.length):[];return fr(e,(function(e){i[++o]=a?jt(t,e,r):Ar(e,t,r)})),i})),ki=Oo((function(e,t,n){ir(e,n,t)}));function ji(e,t){return(Gi(e)?Ot:Fr)(e,ua(t,3))}var Zi=Oo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ei=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wa(e,t[0],t[1])?t=[]:n>2&&wa(t[0],t[1],t[2])&&(t=[t[0]]),$r(e,br(t,1),[])})),Ci=dt||function(){return ft.Date.now()};function Ni(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Jo(e,d,o,o,o,o,t)}function Ii(e,t){var n;if("function"!=typeof t)throw new Ne(a);return e=gs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ai=Qr((function(e,t,n){var r=1;if(n.length){var o=un(n,ca(Ai));r|=c}return Jo(e,r,t,n,o)})),Pi=Qr((function(e,t,n){var r=3;if(n.length){var o=un(n,ca(Pi));r|=c}return Jo(t,r,e,n,o)}));function Oi(e,t,n){var r,i,s,l,c,u,d=0,p=!1,f=!1,h=!0;if("function"!=typeof e)throw new Ne(a);function m(t){var n=r,a=i;return r=i=o,d=t,l=e.apply(a,n)}function g(e){return d=e,c=Oa(b,t),p?m(e):l}function v(e){var n=e-u;return u===o||n>=t||n<0||f&&e-d>=s}function b(){var e=Ci();if(v(e))return y(e);c=Oa(b,function(e){var n=t-(e-u);return f?xn(n,s-(e-d)):n}(e))}function y(e){return c=o,h&&r?m(e):(r=i=o,l)}function x(){var e=Ci(),n=v(e);if(r=arguments,i=this,u=e,n){if(c===o)return g(u);if(f)return ko(c),c=Oa(b,t),m(u)}return c===o&&(c=Oa(b,t)),l}return t=bs(t)||0,ns(n)&&(p=!!n.leading,s=(f="maxWait"in n)?yn(bs(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),x.cancel=function(){c!==o&&ko(c),d=0,r=u=i=c=o},x.flush=function(){return c===o?l:y(Ci())},x}var Ti=Qr((function(e,t){return dr(e,1,t)})),Ri=Qr((function(e,t,n){return dr(e,bs(t)||0,n)}));function Mi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ne(a);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(Mi.Cache||qn),n}function Li(e){if("function"!=typeof e)throw new Ne(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Mi.Cache=qn;var Di=_o((function(e,t){var n=(t=1==t.length&&Gi(t[0])?Ot(t[0],Qt(ua())):Ot(br(t,1),Qt(ua()))).length;return Qr((function(r){for(var o=-1,a=xn(r.length,n);++o=t})),$i=Pr(function(){return arguments}())?Pr:function(e){return rs(e)&&Re.call(e,"callee")&&!qe.call(e,"callee")},Gi=n.isArray,Vi=yt?Qt(yt):function(e){return rs(e)&&Zr(e)==T};function qi(e){return null!=e&&ts(e.length)&&!Ji(e)}function Ki(e){return rs(e)&&qi(e)}var Yi=bt||bl,Qi=xt?Qt(xt):function(e){return rs(e)&&Zr(e)==w};function Xi(e){if(!rs(e))return!1;var t=Zr(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Ji(e){if(!ns(e))return!1;var t=Zr(e);return t==S||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function es(e){return"number"==typeof e&&e==gs(e)}function ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function ns(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rs(e){return null!=e&&"object"==typeof e}var os=wt?Qt(wt):function(e){return rs(e)&&ga(e)==j};function as(e){return"number"==typeof e||rs(e)&&Zr(e)==Z}function is(e){if(!rs(e)||Zr(e)!=E)return!1;var t=Ge(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Te.call(n)==ze}var ss=_t?Qt(_t):function(e){return rs(e)&&Zr(e)==N};var ls=St?Qt(St):function(e){return rs(e)&&ga(e)==I};function cs(e){return"string"==typeof e||!Gi(e)&&rs(e)&&Zr(e)==A}function us(e){return"symbol"==typeof e||rs(e)&&Zr(e)==P}var ds=kt?Qt(kt):function(e){return rs(e)&&ts(e.length)&&!!it[Zr(e)]};var ps=qo(zr),fs=qo((function(e,t){return e<=t}));function hs(e){if(!e)return[];if(qi(e))return cs(e)?hn(e):Ao(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=ga(e);return(t==j?ln:t==I?dn:Us)(e)}function ms(e){return e?(e=bs(e))===f||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function gs(e){var t=ms(e),n=t%1;return t===t?n?t-n:t:0}function vs(e){return e?lr(gs(e),0,g):0}function bs(e){if("number"==typeof e)return e;if(us(e))return m;if(ns(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ns(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var n=ve.test(e);return n||ye.test(e)?ut(e.slice(2),n?2:8):ge.test(e)?m:+e}function ys(e){return Po(e,Ts(e))}function xs(e){return null==e?"":uo(e)}var ws=To((function(e,t){if(ja(t)||qi(t))Po(t,Os(t),e);else for(var n in t)Re.call(t,n)&&nr(e,n,t[n])})),_s=To((function(e,t){Po(t,Ts(t),e)})),Ss=To((function(e,t,n,r){Po(t,Ts(t),e,r)})),ks=To((function(e,t,n,r){Po(t,Os(t),e,r)})),js=oa(sr);var Zs=Qr((function(e,t){e=Ze(e);var n=-1,r=t.length,a=r>2?t[2]:o;for(a&&wa(t[0],t[1],a)&&(r=1);++n1),t})),Po(e,ia(e),n),r&&(n=cr(n,7,na));for(var o=t.length;o--;)fo(n,t[o]);return n}));var Ds=oa((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return Ns(e,n)}))}(e,t)}));function zs(e,t){if(null==e)return{};var n=Ot(ia(e),(function(e){return[e]}));return t=ua(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Xo(Os),Bs=Xo(Ts);function Us(e){return null==e?[]:Xt(e,Os(e))}var Ws=Do((function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)}));function Hs(e){return Xs(xs(e).toLowerCase())}function $s(e){return(e=xs(e))&&e.replace(we,rn).replace(Je,"")}var Gs=Do((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Vs=Do((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qs=Lo("toLowerCase");var Ks=Do((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ys=Do((function(e,t,n){return e+(n?" ":"")+Xs(t)}));var Qs=Do((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=Lo("toUpperCase");function Js(e,t,n){return e=xs(e),(t=n?o:t)===o?function(e){return rt.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var el=Qr((function(e,t){try{return jt(e,o,t)}catch(n){return Xi(n)?n:new se(n)}})),tl=oa((function(e,t){return Et(t,(function(t){t=za(t),ir(e,t,Ai(e[t],e))})),e}));function nl(e){return function(){return e}}var rl=Bo(),ol=Bo(!0);function al(e){return e}function il(e){return Mr("function"==typeof e?e:cr(e,1))}var sl=Qr((function(e,t){return function(n){return Ar(n,e,t)}})),ll=Qr((function(e,t){return function(n){return Ar(e,n,t)}}));function cl(e,t,n){var r=Os(t),o=Sr(t,r);null!=n||ns(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Sr(t,Os(t)));var a=!(ns(n)&&"chain"in n)||!!n.chain,i=Ji(e);return Et(o,(function(n){var r=t[n];e[n]=r,i&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__),o=n.__actions__=Ao(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Tt([this.value()],arguments))})})),e}function ul(){}var dl=$o(Ot),pl=$o(Nt),fl=$o(Lt);function hl(e){return _a(e)?$t(za(e)):function(e){return function(t){return kr(t,e)}}(e)}var ml=Vo(),gl=Vo(!0);function vl(){return[]}function bl(){return!1}var yl=Ho((function(e,t){return e+t}),0),xl=Yo("ceil"),wl=Ho((function(e,t){return e/t}),1),_l=Yo("floor");var Sl=Ho((function(e,t){return e*t}),1),kl=Yo("round"),jl=Ho((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Ne(a);return e=gs(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Ni,Bn.assign=ws,Bn.assignIn=_s,Bn.assignInWith=Ss,Bn.assignWith=ks,Bn.at=js,Bn.before=Ii,Bn.bind=Ai,Bn.bindAll=tl,Bn.bindKey=Pi,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Gi(e)?e:[e]},Bn.chain=hi,Bn.chunk=function(e,t,r){t=(r?wa(e,t,r):t===o)?1:yn(gs(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var i=0,s=0,l=n(ht(a/t));ia?0:a+n),(r=r===o||r>a?a:gs(r))<0&&(r+=a),r=n>r?0:vs(r);n>>0)?(e=xs(e))&&("string"==typeof t||null!=t&&!ss(t))&&!(t=uo(t))&&sn(e)?So(hn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Ne(a);return t=null==t?0:yn(gs(t),0),Qr((function(n){var r=n[t],o=So(n,0,t);return r&&Tt(o,r),jt(e,this,o)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?oo(e,0,(t=n||t===o?1:gs(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?oo(e,(t=r-(t=n||t===o?1:gs(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?mo(e,ua(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?mo(e,ua(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Ne(a);return ns(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Oi(e,t,{leading:r,maxWait:t,trailing:o})},Bn.thru=mi,Bn.toArray=hs,Bn.toPairs=Fs,Bn.toPairsIn=Bs,Bn.toPath=function(e){return Gi(e)?Ot(e,za):us(e)?[e]:Ao(Da(xs(e)))},Bn.toPlainObject=ys,Bn.transform=function(e,t,n){var r=Gi(e),o=r||Yi(e)||ds(e);if(t=ua(t,4),null==n){var a=e&&e.constructor;n=o?r?new a:[]:ns(e)&&Ji(a)?Un(Ge(e)):{}}return(o?Et:wr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Bn.unary=function(e){return Ni(e,1)},Bn.union=ri,Bn.unionBy=oi,Bn.unionWith=ai,Bn.uniq=function(e){return e&&e.length?po(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?po(e,ua(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?po(e,o,t):[]},Bn.unset=function(e,t){return null==e||fo(e,t)},Bn.unzip=ii,Bn.unzipWith=si,Bn.update=function(e,t,n){return null==e?e:ho(e,t,xo(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:ho(e,t,xo(n),r)},Bn.values=Us,Bn.valuesIn=function(e){return null==e?[]:Xt(e,Ts(e))},Bn.without=li,Bn.words=Js,Bn.wrap=function(e,t){return zi(xo(t),e)},Bn.xor=ci,Bn.xorBy=ui,Bn.xorWith=di,Bn.zip=pi,Bn.zipObject=function(e,t){return bo(e||[],t||[],nr)},Bn.zipObjectDeep=function(e,t){return bo(e||[],t||[],eo)},Bn.zipWith=fi,Bn.entries=Fs,Bn.entriesIn=Bs,Bn.extend=_s,Bn.extendWith=Ss,cl(Bn,Bn),Bn.add=yl,Bn.attempt=el,Bn.camelCase=Ws,Bn.capitalize=Hs,Bn.ceil=xl,Bn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=bs(n))===n?n:0),t!==o&&(t=(t=bs(t))===t?t:0),lr(bs(e),t,n)},Bn.clone=function(e){return cr(e,4)},Bn.cloneDeep=function(e){return cr(e,5)},Bn.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:o)},Bn.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:o)},Bn.conformsTo=function(e,t){return null==t||ur(e,t,Os(t))},Bn.deburr=$s,Bn.defaultTo=function(e,t){return null==e||e!==e?t:e},Bn.divide=wl,Bn.endsWith=function(e,t,n){e=xs(e),t=uo(t);var r=e.length,a=n=n===o?r:lr(gs(n),0,r);return(n-=t.length)>=0&&e.slice(n,a)==t},Bn.eq=Ui,Bn.escape=function(e){return(e=xs(e))&&Q.test(e)?e.replace(K,on):e},Bn.escapeRegExp=function(e){return(e=xs(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},Bn.every=function(e,t,n){var r=Gi(e)?Nt:mr;return n&&wa(e,t,n)&&(t=o),r(e,ua(t,3))},Bn.find=bi,Bn.findIndex=$a,Bn.findKey=function(e,t){return zt(e,ua(t,3),wr)},Bn.findLast=yi,Bn.findLastIndex=Ga,Bn.findLastKey=function(e,t){return zt(e,ua(t,3),_r)},Bn.floor=_l,Bn.forEach=xi,Bn.forEachRight=wi,Bn.forIn=function(e,t){return null==e?e:yr(e,ua(t,3),Ts)},Bn.forInRight=function(e,t){return null==e?e:xr(e,ua(t,3),Ts)},Bn.forOwn=function(e,t){return e&&wr(e,ua(t,3))},Bn.forOwnRight=function(e,t){return e&&_r(e,ua(t,3))},Bn.get=Cs,Bn.gt=Wi,Bn.gte=Hi,Bn.has=function(e,t){return null!=e&&va(e,t,Cr)},Bn.hasIn=Ns,Bn.head=qa,Bn.identity=al,Bn.includes=function(e,t,n,r){e=qi(e)?e:Us(e),n=n&&!r?gs(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),cs(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Bt(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:gs(n);return o<0&&(o=yn(r+o,0)),Bt(e,t,o)},Bn.inRange=function(e,t,n){return t=ms(t),n===o?(n=t,t=0):n=ms(n),function(e,t,n){return e>=xn(t,n)&&e=-9007199254740991&&e<=h},Bn.isSet=ls,Bn.isString=cs,Bn.isSymbol=us,Bn.isTypedArray=ds,Bn.isUndefined=function(e){return e===o},Bn.isWeakMap=function(e){return rs(e)&&ga(e)==O},Bn.isWeakSet=function(e){return rs(e)&&"[object WeakSet]"==Zr(e)},Bn.join=function(e,t){return null==e?"":Gt.call(e,t)},Bn.kebabCase=Gs,Bn.last=Xa,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r;return n!==o&&(a=(a=gs(n))<0?yn(r+a,0):xn(a,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,a):Ft(e,Wt,a,!0)},Bn.lowerCase=Vs,Bn.lowerFirst=qs,Bn.lt=ps,Bn.lte=fs,Bn.max=function(e){return e&&e.length?gr(e,al,Er):o},Bn.maxBy=function(e,t){return e&&e.length?gr(e,ua(t,2),Er):o},Bn.mean=function(e){return Ht(e,al)},Bn.meanBy=function(e,t){return Ht(e,ua(t,2))},Bn.min=function(e){return e&&e.length?gr(e,al,zr):o},Bn.minBy=function(e,t){return e&&e.length?gr(e,ua(t,2),zr):o},Bn.stubArray=vl,Bn.stubFalse=bl,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Sl,Bn.nth=function(e,t){return e&&e.length?Hr(e,gs(t)):o},Bn.noConflict=function(){return ft._===this&&(ft._=Fe),this},Bn.noop=ul,Bn.now=Ci,Bn.pad=function(e,t,n){e=xs(e);var r=(t=gs(t))?fn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Go(mt(o),n)+e+Go(ht(o),n)},Bn.padEnd=function(e,t,n){e=xs(e);var r=(t=gs(t))?fn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var a=Sn();return xn(e+a*(t-e+ct("1e-"+((a+"").length-1))),t)}return Kr(e,t)},Bn.reduce=function(e,t,n){var r=Gi(e)?Rt:Vt,o=arguments.length<3;return r(e,ua(t,4),n,o,fr)},Bn.reduceRight=function(e,t,n){var r=Gi(e)?Mt:Vt,o=arguments.length<3;return r(e,ua(t,4),n,o,hr)},Bn.repeat=function(e,t,n){return t=(n?wa(e,t,n):t===o)?1:gs(t),Yr(xs(e),t)},Bn.replace=function(){var e=arguments,t=xs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,a=(t=wo(t,e)).length;for(a||(a=1,e=o);++rh)return[];var n=g,r=xn(e,g);t=ua(t),e-=g;for(var o=Kt(r,t);++n=i)return e;var l=n-fn(r);if(l<1)return r;var c=s?So(s,0,l).join(""):e.slice(0,l);if(a===o)return c+r;if(s&&(l+=c.length-l),ss(a)){if(e.slice(l).search(a)){var u,d=c;for(a.global||(a=Ee(a.source,xs(me.exec(a))+"g")),a.lastIndex=0;u=a.exec(d);)var p=u.index;c=c.slice(0,p===o?l:p)}}else if(e.indexOf(uo(a),l)!=l){var f=c.lastIndexOf(a);f>-1&&(c=c.slice(0,f))}return c+r},Bn.unescape=function(e){return(e=xs(e))&&Y.test(e)?e.replace(q,gn):e},Bn.uniqueId=function(e){var t=++Me;return xs(e)+t},Bn.upperCase=Qs,Bn.upperFirst=Xs,Bn.each=xi,Bn.eachRight=wi,Bn.first=qa,cl(Bn,function(){var e={};return wr(Bn,(function(t,n){Re.call(Bn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Bn.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Et(["drop","take"],(function(e,t){$n.prototype[e]=function(n){n=n===o?1:yn(gs(n),0);var r=this.__filtered__&&!t?new $n(this):this.clone();return r.__filtered__?r.__takeCount__=xn(n,r.__takeCount__):r.__views__.push({size:xn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},$n.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Et(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;$n.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ua(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Et(["head","last"],(function(e,t){var n="take"+(t?"Right":"");$n.prototype[e]=function(){return this[n](1).value()[0]}})),Et(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");$n.prototype[e]=function(){return this.__filtered__?new $n(this):this[n](1)}})),$n.prototype.compact=function(){return this.filter(al)},$n.prototype.find=function(e){return this.filter(e).head()},$n.prototype.findLast=function(e){return this.reverse().find(e)},$n.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new $n(this):this.map((function(n){return Ar(n,e,t)}))})),$n.prototype.reject=function(e){return this.filter(Li(ua(e)))},$n.prototype.slice=function(e,t){e=gs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new $n(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=gs(t))<0?n.dropRight(-t):n.take(t-e)),n)},$n.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$n.prototype.toArray=function(){return this.take(g)},wr($n.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=Bn[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);a&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof $n,c=s[0],u=l||Gi(t),d=function(e){var t=a.apply(Bn,Tt([e],s));return r&&p?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,f=!!this.__actions__.length,h=i&&!p,m=l&&!f;if(!i&&u){t=m?t:new $n(this);var g=e.apply(t,s);return g.__actions__.push({func:mi,args:[d],thisArg:o}),new Hn(g,p)}return h&&m?e.apply(this,s):(g=this.thru(d),h?r?g.value()[0]:g.value():g)})})),Et(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Gi(o)?o:[],e)}return this[n]((function(n){return t.apply(Gi(n)?n:[],e)}))}})),wr($n.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";Re.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}})),Pn[Uo(o,2).name]=[{name:"wrapper",func:o}],$n.prototype.clone=function(){var e=new $n(this.__wrapped__);return e.__actions__=Ao(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ao(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ao(this.__views__),e},$n.prototype.reverse=function(){if(this.__filtered__){var e=new $n(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$n.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Gi(e),r=t<0,o=n?e.length:0,a=function(e,t,n){var r=-1,o=n.length;for(;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Wn;){var r=Ba(n);r.__index__=0,r.__values__=o,t?a.__wrapped__=r:t=r;var a=r;n=n.__wrapped__}return a.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $n){var t=e;return this.__actions__.length&&(t=new $n(this)),(t=t.reverse()).__actions__.push({func:mi,args:[ni],thisArg:o}),new Hn(t,this.__chain__)}return this.thru(ni)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Qe&&(Bn.prototype[Qe]=function(){return this}),Bn}();ft._=vn,(r=function(){return vn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},4463:(e,t,n)=>{"use strict";var r=n(2791),o=n(5296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n