id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11,000 | ray-project/ray | python/ray/util/metrics.py | ray.util.metrics.Metric | from ray.util.annotations import DeveloperAPI
from typing import Any, Dict, List, Optional, Tuple, Union
@DeveloperAPI
class Metric:
"""The parent class of custom metrics.
Ray's custom metrics APIs are rooted from this class and share
the same public methods.
"""
def __init__(self, name: str, des... | @DeveloperAPI
class Metric:
'''The parent class of custom metrics.
Ray's custom metrics APIs are rooted from this class and share
the same public methods.
'''
def __init__(self, name: str, description: str='', tag_keys: Optional[Tuple[str, ...]]=None):
pass
def set_default_tags(self, d... | 9 | 4 | 17 | 2 | 10 | 5 | 3 | 0.58 | 0 | 8 | 0 | 3 | 6 | 5 | 6 | 6 | 115 | 20 | 60 | 28 | 43 | 35 | 43 | 18 | 36 | 5 | 0 | 2 | 19 |
11,001 | ray-project/ray | python/ray/util/multiprocessing/Pool.py | ray.util.multiprocessing.Pool.IMapIterator | import collections
import itertools
class IMapIterator:
"""Base class for OrderedIMapIterator and UnorderedIMapIterator."""
def __init__(self, pool, func, iterable, chunksize=None):
self._pool = pool
self._func = func
self._next_chunk_index = 0
self._finished_iterating = False
... |
class IMapIterator:
'''Base class for OrderedIMapIterator and UnorderedIMapIterator.'''
def __init__(self, pool, func, iterable, chunksize=None):
pass
def _submit_next_chunk(self):
pass
def __iter__(self):
pass
def __next__(self):
pass
def next(self):
... | 6 | 1 | 12 | 1 | 8 | 3 | 2 | 0.33 | 0 | 6 | 1 | 2 | 5 | 9 | 5 | 5 | 67 | 10 | 43 | 21 | 37 | 14 | 40 | 21 | 34 | 5 | 0 | 2 | 11 |
11,002 | ray-project/ray | python/ray/util/multiprocessing/Pool.py | ray.util.multiprocessing.Pool.Pool | from typing import Any, Callable, Dict, Hashable, Iterable, List, Optional, Tuple
import ray
from ray.util import log_once
from ray._common.usage import usage_lib
import os
import gc
class Pool:
"""A pool of actor processes that is used to process tasks in parallel.
Args:
processes: number of actor pr... |
class Pool:
'''A pool of actor processes that is used to process tasks in parallel.
Args:
processes: number of actor processes to start in the pool. Defaults to
the number of cores in the Ray cluster if one is already running,
otherwise the number of cores on this machine.
... | 28 | 13 | 15 | 2 | 9 | 4 | 2 | 0.55 | 0 | 15 | 5 | 0 | 27 | 11 | 27 | 27 | 451 | 70 | 246 | 99 | 174 | 135 | 155 | 55 | 127 | 8 | 0 | 3 | 55 |
11,003 | ray-project/ray | python/ray/util/multiprocessing/Pool.py | ray.util.multiprocessing.Pool.ResultThread | from typing import Any, Callable, Dict, Hashable, Iterable, List, Optional, Tuple
import copy
import threading
from multiprocessing import TimeoutError
import ray
import queue
class ResultThread(threading.Thread):
"""Thread that collects results from distributed actors.
It winds down when either:
- A ... |
class ResultThread(threading.Thread):
'''Thread that collects results from distributed actors.
It winds down when either:
- A pre-specified number of objects has been processed
- When the END_SENTINEL (submitted through self.add_object_ref())
has been received and all objects receiv... | 9 | 1 | 13 | 1 | 10 | 3 | 3 | 0.74 | 1 | 6 | 0 | 0 | 8 | 11 | 8 | 33 | 153 | 17 | 78 | 36 | 62 | 58 | 68 | 28 | 59 | 12 | 1 | 5 | 21 |
11,004 | ray-project/ray | python/ray/util/multiprocessing/pool.py | ray.util.multiprocessing.pool.AsyncResult | from multiprocessing import TimeoutError
class AsyncResult:
"""An asynchronous interface to task results.
This should not be constructed directly.
"""
def __init__(self, chunk_object_refs, callback=None, error_callback=None, single_result=False):
self._single_result = single_result
se... |
class AsyncResult:
'''An asynchronous interface to task results.
This should not be constructed directly.
'''
def __init__(self, chunk_object_refs, callback=None, error_callback=None, single_result=False):
pass
def wait(self, timeout=None):
'''
Returns once the result is r... | 6 | 4 | 10 | 1 | 6 | 3 | 2 | 0.53 | 0 | 5 | 2 | 0 | 5 | 2 | 5 | 5 | 62 | 13 | 32 | 13 | 24 | 17 | 27 | 11 | 21 | 7 | 0 | 3 | 12 |
11,005 | ray-project/ray | python/ray/util/multiprocessing/pool.py | ray.util.multiprocessing.pool.IMapIterator | import itertools
import collections
class IMapIterator:
"""Base class for OrderedIMapIterator and UnorderedIMapIterator."""
def __init__(self, pool, func, iterable, chunksize=None):
self._pool = pool
self._func = func
self._next_chunk_index = 0
self._finished_iterating = False
... |
class IMapIterator:
'''Base class for OrderedIMapIterator and UnorderedIMapIterator.'''
def __init__(self, pool, func, iterable, chunksize=None):
pass
def _submit_next_chunk(self):
pass
def __iter__(self):
pass
def __next__(self):
pass
def next(self):
... | 6 | 1 | 12 | 1 | 8 | 3 | 2 | 0.33 | 0 | 6 | 1 | 2 | 5 | 9 | 5 | 5 | 67 | 10 | 43 | 21 | 37 | 14 | 40 | 21 | 34 | 5 | 0 | 2 | 11 |
11,006 | ray-project/ray | python/ray/util/multiprocessing/pool.py | ray.util.multiprocessing.pool.OrderedIMapIterator | import time
class OrderedIMapIterator(IMapIterator):
"""Iterator to the results of tasks submitted using `imap`.
The results are returned in the same order that they were submitted, even
if they don't finish in that order. Only one batch of tasks per actor
process is submitted at a time - the rest are... |
class OrderedIMapIterator(IMapIterator):
'''Iterator to the results of tasks submitted using `imap`.
The results are returned in the same order that they were submitted, even
if they don't finish in that order. Only one batch of tasks per actor
process is submitted at a time - the rest are submitted as... | 2 | 1 | 29 | 3 | 22 | 4 | 7 | 0.43 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 6 | 39 | 6 | 23 | 5 | 21 | 10 | 18 | 5 | 16 | 7 | 1 | 3 | 7 |
11,007 | ray-project/ray | python/ray/util/multiprocessing/pool.py | ray.util.multiprocessing.pool.Pool | from ray._common.usage import usage_lib
from ray.util import log_once
from typing import Any, Callable, Dict, Hashable, Iterable, List, Optional, Tuple
import ray
import gc
import os
class Pool:
"""A pool of actor processes that is used to process tasks in parallel.
Args:
processes: number of actor pr... |
class Pool:
'''A pool of actor processes that is used to process tasks in parallel.
Args:
processes: number of actor processes to start in the pool. Defaults to
the number of cores in the Ray cluster if one is already running,
otherwise the number of cores on this machine.
... | 28 | 13 | 15 | 2 | 9 | 4 | 2 | 0.55 | 0 | 15 | 5 | 1 | 27 | 11 | 27 | 27 | 451 | 70 | 246 | 99 | 174 | 135 | 155 | 55 | 127 | 8 | 0 | 3 | 55 |
11,008 | ray-project/ray | python/ray/util/multiprocessing/pool.py | ray.util.multiprocessing.pool.PoolActor | import ray
@ray.remote(num_cpus=0)
class PoolActor:
"""Actor used to process tasks submitted to a Pool."""
def __init__(self, initializer=None, initargs=None):
if initializer:
initargs = initargs or ()
initializer(*initargs)
def ping(self):
pass
def run_batch(... | @ray.remote(num_cpus=0)
class PoolActor:
'''Actor used to process tasks submitted to a Pool.'''
def __init__(self, initializer=None, initargs=None):
pass
def ping(self):
pass
def run_batch(self, func, batch):
pass | 5 | 1 | 6 | 0 | 5 | 0 | 2 | 0.12 | 0 | 2 | 1 | 0 | 3 | 0 | 3 | 3 | 22 | 3 | 17 | 7 | 13 | 2 | 17 | 6 | 13 | 3 | 0 | 2 | 6 |
11,009 | ray-project/ray | python/ray/util/multiprocessing/pool.py | ray.util.multiprocessing.pool.PoolTaskError | class PoolTaskError(Exception):
def __init__(self, underlying):
self.underlying = underlying | class PoolTaskError(Exception):
def __init__(self, underlying):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 11 | 3 | 0 | 3 | 3 | 1 | 0 | 3 | 3 | 1 | 1 | 3 | 0 | 1 |
11,010 | ray-project/ray | python/ray/util/multiprocessing/pool.py | ray.util.multiprocessing.pool.ResultThread | import copy
from typing import Any, Callable, Dict, Hashable, Iterable, List, Optional, Tuple
from multiprocessing import TimeoutError
import ray
import queue
import threading
class ResultThread(threading.Thread):
"""Thread that collects results from distributed actors.
It winds down when either:
- A ... |
class ResultThread(threading.Thread):
'''Thread that collects results from distributed actors.
It winds down when either:
- A pre-specified number of objects has been processed
- When the END_SENTINEL (submitted through self.add_object_ref())
has been received and all objects receiv... | 9 | 1 | 13 | 1 | 10 | 3 | 3 | 0.74 | 1 | 6 | 0 | 0 | 8 | 11 | 8 | 33 | 153 | 17 | 78 | 36 | 62 | 58 | 68 | 28 | 59 | 12 | 1 | 5 | 21 |
11,011 | ray-project/ray | python/ray/util/multiprocessing/pool.py | ray.util.multiprocessing.pool.UnorderedIMapIterator | class UnorderedIMapIterator(IMapIterator):
"""Iterator to the results of tasks submitted using `imap`.
The results are returned in the order that they finish. Only one batch of
tasks per actor process is submitted at a time - the rest are submitted as
results come in.
Should not be constructed dir... | class UnorderedIMapIterator(IMapIterator):
'''Iterator to the results of tasks submitted using `imap`.
The results are returned in the order that they finish. Only one batch of
tasks per actor process is submitted at a time - the rest are submitted as
results come in.
Should not be constructed direc... | 2 | 1 | 17 | 3 | 12 | 2 | 4 | 0.62 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 6 | 27 | 6 | 13 | 4 | 11 | 8 | 11 | 4 | 9 | 4 | 1 | 2 | 4 |
11,012 | ray-project/ray | python/ray/util/placement_group.py | ray.util.placement_group.PlacementGroup | from typing import Dict, List, Optional, Union
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
from ray._raylet import PlacementGroupID
from ray.util.annotations import DeveloperAPI, PublicAPI
@PublicAPI
class PlacementGroup:
"""A handle to a placement group."""
@staticmethod
d... | @PublicAPI
class PlacementGroup:
'''A handle to a placement group.'''
@staticmethod
def empty() -> 'PlacementGroup':
pass
def __init__(self, id: 'ray._raylet.PlacementGroupID', bundle_cache: Optional[List[Dict]]=None):
pass
@property
def is_empty(self):
pass
def rea... | 16 | 4 | 7 | 1 | 4 | 2 | 1 | 0.43 | 0 | 4 | 1 | 0 | 9 | 2 | 10 | 10 | 82 | 19 | 44 | 21 | 25 | 19 | 30 | 13 | 19 | 2 | 0 | 1 | 12 |
11,013 | ray-project/ray | python/ray/util/queue.py | ray.util.queue.Empty | from ray.util.annotations import PublicAPI
import queue
@PublicAPI(stability='beta')
class Empty(queue.Empty):
pass | @PublicAPI(stability='beta')
class Empty(queue.Empty):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 0 | 0 |
11,014 | ray-project/ray | python/ray/util/queue.py | ray.util.queue.Full | from ray.util.annotations import PublicAPI
import queue
@PublicAPI(stability='beta')
class Full(queue.Full):
pass | @PublicAPI(stability='beta')
class Full(queue.Full):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
11,015 | ray-project/ray | python/ray/util/queue.py | ray.util.queue.Queue | import ray
from ray.util.annotations import PublicAPI
import asyncio
from typing import Any, Dict, List, Optional
from collections.abc import Iterable
@PublicAPI(stability='beta')
class Queue:
"""A first-in, first-out queue implementation on Ray.
The behavior and use cases are similar to those of the asyncio.... | null | 17 | 14 | 13 | 1 | 6 | 5 | 2 | 1.08 | 0 | 10 | 3 | 1 | 15 | 2 | 15 | 15 | 236 | 43 | 93 | 27 | 70 | 100 | 76 | 21 | 59 | 4 | 0 | 3 | 33 |
11,016 | ray-project/ray | python/ray/util/queue.py | ray.util.queue._QueueActor | import asyncio
class _QueueActor:
def __init__(self, maxsize):
self.maxsize = maxsize
self.queue = asyncio.Queue(self.maxsize)
def qsize(self):
return self.queue.qsize()
def empty(self):
return self.queue.empty()
def full(self):
return self.queue.full()
... |
class _QueueActor:
def __init__(self, maxsize):
pass
def qsize(self):
pass
def empty(self):
pass
def full(self):
pass
async def put(self, item, timeout=None):
pass
async def get(self, timeout=None):
pass
def put_nowait(self, item):
... | 11 | 0 | 4 | 0 | 4 | 0 | 2 | 0.03 | 0 | 4 | 2 | 2 | 10 | 2 | 10 | 10 | 48 | 9 | 38 | 15 | 27 | 1 | 33 | 14 | 22 | 3 | 0 | 1 | 15 |
11,017 | ray-project/ray | python/ray/util/rpdb.py | ray.util.rpdb._LF2CRLF_FileWrapper | import re
class _LF2CRLF_FileWrapper(object):
def __init__(self, connection):
self.connection = connection
self.stream = fh = connection.makefile('rw')
self.read = fh.read
self.readline = fh.readline
self.readlines = fh.readlines
self.close = fh.close
self.f... |
class _LF2CRLF_FileWrapper(object):
def __init__(self, connection):
pass
@property
def encoding(self):
pass
def __iter__(self):
pass
def write(self, data, nl_rex=re.compile('\r?\n')):
pass
def writelines(self, lines, nl_rex=re.compile('\r?\n')):
pass | 7 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 5 | 9 | 5 | 5 | 31 | 4 | 27 | 17 | 20 | 0 | 23 | 16 | 17 | 2 | 1 | 1 | 7 |
11,018 | ray-project/ray | python/ray/util/rpdb.py | ray.util.rpdb._PdbWrap | from pdb import Pdb
from typing import Callable
class _PdbWrap(Pdb):
"""Wrap PDB to run a custom exit hook on continue."""
def __init__(self, exit_hook: Callable[[], None]):
self._exit_hook = exit_hook
Pdb.__init__(self)
def do_continue(self, arg):
self._exit_hook()
return... |
class _PdbWrap(Pdb):
'''Wrap PDB to run a custom exit hook on continue.'''
def __init__(self, exit_hook: Callable[[], None]):
pass
def do_continue(self, arg):
pass | 3 | 1 | 3 | 0 | 3 | 0 | 1 | 0.13 | 1 | 0 | 0 | 0 | 2 | 1 | 2 | 142 | 12 | 3 | 8 | 5 | 5 | 1 | 8 | 5 | 5 | 1 | 2 | 0 | 2 |
11,019 | ray-project/ray | python/ray/util/rpdb.py | ray.util.rpdb._RemotePdb | import errno
import json
import socket
from ray._common.network_utils import build_address
import sys
from ray._private import ray_constants
import ray
from pdb import Pdb
from ray.experimental.internal_kv import _internal_kv_del, _internal_kv_put
class _RemotePdb(Pdb):
"""
This will run pdb as a ephemeral tel... |
class _RemotePdb(Pdb):
'''
This will run pdb as a ephemeral telnet service. Once you connect no one
else can connect. On construction this object will block execution till a
client has connected.
Based on https://github.com/tamentis/rpdb I think ...
To use this::
RemotePdb(host="0.0.0.0... | 10 | 3 | 12 | 0 | 11 | 1 | 2 | 0.18 | 1 | 2 | 1 | 0 | 9 | 7 | 9 | 149 | 135 | 12 | 104 | 35 | 86 | 19 | 69 | 25 | 59 | 5 | 2 | 2 | 20 |
11,020 | ray-project/ray | python/ray/util/scheduling_strategies.py | ray.util.scheduling_strategies.DoesNotExist | from ray.util.annotations import PublicAPI
@PublicAPI(stability='alpha')
class DoesNotExist:
def __init__(self):
pass | @PublicAPI(stability='alpha')
class DoesNotExist:
def __init__(self):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 0 | 0 | 1 |
11,021 | ray-project/ray | python/ray/util/scheduling_strategies.py | ray.util.scheduling_strategies.Exists | from ray.util.annotations import PublicAPI
@PublicAPI(stability='alpha')
class Exists:
def __init__(self):
pass | @PublicAPI(stability='alpha')
class Exists:
def __init__(self):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 0 | 0 | 1 |
11,022 | ray-project/ray | python/ray/util/scheduling_strategies.py | ray.util.scheduling_strategies.In | from ray.util.annotations import PublicAPI
@PublicAPI(stability='alpha')
class In:
def __init__(self, *values):
_validate_label_match_operator_values(values, 'In')
self.values = list(values) | @PublicAPI(stability='alpha')
class In:
def __init__(self, *values):
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 0 | 0 | 1 |
11,023 | ray-project/ray | python/ray/util/scheduling_strategies.py | ray.util.scheduling_strategies.NodeAffinitySchedulingStrategy | from ray.util.annotations import PublicAPI
@PublicAPI
class NodeAffinitySchedulingStrategy:
"""Static scheduling strategy used to run a task or actor on a particular node.
Attributes:
node_id: the hex id of the node where the task or actor should run.
soft: whether the scheduler should run the... | @PublicAPI
class NodeAffinitySchedulingStrategy:
'''Static scheduling strategy used to run a task or actor on a particular node.
Attributes:
node_id: the hex id of the node where the task or actor should run.
soft: whether the scheduler should run the task or actor somewhere else
if ... | 4 | 1 | 15 | 1 | 13 | 1 | 2 | 1.07 | 0 | 2 | 0 | 0 | 1 | 4 | 1 | 1 | 32 | 3 | 14 | 12 | 6 | 15 | 8 | 6 | 6 | 2 | 0 | 1 | 2 |
11,024 | ray-project/ray | python/ray/util/scheduling_strategies.py | ray.util.scheduling_strategies.NodeLabelSchedulingStrategy | from ray.util.annotations import PublicAPI
@PublicAPI(stability='alpha')
class NodeLabelSchedulingStrategy:
"""
Label based node affinity scheduling strategy
scheduling_strategy=NodeLabelSchedulingStrategy({
"region": In("us"),
"gpu_type": Exists(),
})
"""
def __init__(self, h... | @PublicAPI(stability='alpha')
class NodeLabelSchedulingStrategy:
'''
Label based node affinity scheduling strategy
scheduling_strategy=NodeLabelSchedulingStrategy({
"region": In("us"),
"gpu_type": Exists(),
})
'''
def __init__(self, hard: LabelMatchExpressionsT, *, soft: LabelMa... | 4 | 1 | 6 | 0 | 6 | 0 | 2 | 0.54 | 0 | 1 | 0 | 0 | 2 | 2 | 2 | 2 | 23 | 3 | 13 | 7 | 8 | 7 | 8 | 5 | 5 | 2 | 0 | 1 | 3 |
11,025 | ray-project/ray | python/ray/util/scheduling_strategies.py | ray.util.scheduling_strategies.NotIn | from ray.util.annotations import PublicAPI
@PublicAPI(stability='alpha')
class NotIn:
def __init__(self, *values):
_validate_label_match_operator_values(values, 'NotIn')
self.values = list(values) | @PublicAPI(stability='alpha')
class NotIn:
def __init__(self, *values):
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 0 | 0 | 1 |
11,026 | ray-project/ray | python/ray/util/scheduling_strategies.py | ray.util.scheduling_strategies.PlacementGroupSchedulingStrategy | from typing import TYPE_CHECKING, Dict, Optional, Union
from ray.util.annotations import PublicAPI
@PublicAPI
class PlacementGroupSchedulingStrategy:
"""Placement group based scheduling strategy.
Attributes:
placement_group: the placement group this actor belongs to,
or None if it doesn't ... | @PublicAPI
class PlacementGroupSchedulingStrategy:
'''Placement group based scheduling strategy.
Attributes:
placement_group: the placement group this actor belongs to,
or None if it doesn't belong to any group.
placement_group_bundle_index: the index of the bundle
if the... | 3 | 1 | 9 | 0 | 9 | 0 | 1 | 1.1 | 0 | 2 | 0 | 0 | 1 | 3 | 1 | 1 | 23 | 2 | 10 | 10 | 3 | 11 | 5 | 5 | 3 | 1 | 0 | 0 | 1 |
11,027 | ray-project/ray | python/ray/util/scheduling_strategies.py | ray.util.scheduling_strategies._LabelMatchExpression | from typing import TYPE_CHECKING, Dict, Optional, Union
class _LabelMatchExpression:
"""An expression used to select node by node's labels
Attributes:
key: the key of label
operator: In、NotIn、Exists、DoesNotExist
"""
def __init__(self, key: str, operator: Union[In, NotIn, Exists, DoesNo... |
class _LabelMatchExpression:
'''An expression used to select node by node's labels
Attributes:
key: the key of label
operator: In、NotIn、Exists、DoesNotExist
'''
def __init__(self, key: str, operator: Union[In, NotIn, Exists, DoesNotExist]):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 1.25 | 0 | 5 | 4 | 0 | 1 | 2 | 1 | 1 | 10 | 1 | 4 | 4 | 2 | 5 | 4 | 4 | 2 | 1 | 0 | 0 | 1 |
11,028 | ray-project/ray | python/ray/util/serialization.py | ray.util.serialization.StandaloneSerializationContext | from ray.util.annotations import DeveloperAPI, PublicAPI
import ray.cloudpickle as pickle
@DeveloperAPI
class StandaloneSerializationContext:
def _register_cloudpickle_reducer(self, cls, reducer):
pickle.CloudPickler.dispatch[cls] = reducer
def _unregister_cloudpickle_reducer(self, cls):
pick... | @DeveloperAPI
class StandaloneSerializationContext:
def _register_cloudpickle_reducer(self, cls, reducer):
pass
def _unregister_cloudpickle_reducer(self, cls):
pass
def _register_cloudpickle_serializer(self, cls, custom_serializer, custom_deserializer):
pass
def _CloudPic... | 6 | 0 | 4 | 0 | 3 | 0 | 1 | 0.36 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 3 | 19 | 4 | 11 | 7 | 4 | 4 | 9 | 5 | 4 | 1 | 0 | 0 | 4 |
11,029 | ray-project/ray | python/ray/util/spark/cluster_init.py | ray.util.spark.cluster_init.AutoscalingCluster | import os
import ray._private.services
import copy
from ray.autoscaler._private.spark.node_provider import HEAD_NODE_ID
import ray
import json
import yaml
from ray.util.annotations import DeveloperAPI, PublicAPI
import sys
@DeveloperAPI
class AutoscalingCluster:
"""Create a ray on spark autoscaling cluster."""
... | @DeveloperAPI
class AutoscalingCluster:
'''Create a ray on spark autoscaling cluster.'''
def __init__(self, head_resources: dict, worker_node_types: dict, extra_provider_config: dict, upscaling_speed: float, idle_timeout_minutes: float):
'''Create the cluster.
Args:
head_resources: ... | 5 | 3 | 49 | 5 | 41 | 3 | 3 | 0.08 | 0 | 3 | 0 | 0 | 3 | 3 | 3 | 3 | 152 | 18 | 124 | 45 | 91 | 10 | 39 | 14 | 34 | 7 | 0 | 1 | 9 |
11,030 | ray-project/ray | python/ray/util/spark/cluster_init.py | ray.util.spark.cluster_init.RayClusterOnSpark | import time
from .utils import _get_cpu_cores, _get_local_ray_node_slots, _get_num_physical_gpus, _wait_service_up, calc_mem_ray_head_node, exec_cmd, gen_cmd_exec_failure_msg, get_avail_mem_per_ray_worker_node, get_configured_spark_executor_memory_bytes, get_max_num_concurrent_tasks, get_random_unused_port, get_spark_a... |
class RayClusterOnSpark:
'''
This class is the type of instance returned by the `_setup_ray_cluster` interface.
Its main functionality is to:
Connect to, disconnect from, and shutdown the Ray cluster running on Apache Spark.
Serve as a Python context manager for the `RayClusterOnSpark` instance.
... | 8 | 2 | 24 | 2 | 21 | 2 | 3 | 0.16 | 0 | 2 | 0 | 0 | 7 | 15 | 7 | 7 | 192 | 23 | 147 | 49 | 124 | 23 | 84 | 33 | 74 | 11 | 0 | 6 | 22 |
11,031 | ray-project/ray | python/ray/util/spark/databricks_hook.py | ray.util.spark.databricks_hook.DefaultDatabricksRayOnSparkStartHook | import os
import threading
from .utils import get_spark_session
from .start_hook_base import RayOnSparkStartHook
import time
class DefaultDatabricksRayOnSparkStartHook(RayOnSparkStartHook):
def get_default_temp_root_dir(self):
return _DATABRICKS_DEFAULT_TMP_ROOT_DIR
def on_ray_dashboard_created(self,... |
class DefaultDatabricksRayOnSparkStartHook(RayOnSparkStartHook):
def get_default_temp_root_dir(self):
pass
def on_ray_dashboard_created(self, port):
pass
def on_cluster_created(self, ray_cluster_handler):
pass
def auto_shutdown_watcher():
pass
def on... | 7 | 0 | 25 | 3 | 19 | 4 | 3 | 0.21 | 1 | 5 | 0 | 0 | 5 | 0 | 5 | 11 | 135 | 15 | 99 | 15 | 91 | 21 | 49 | 15 | 41 | 5 | 1 | 4 | 16 |
11,032 | ray-project/ray | python/ray/util/spark/start_hook_base.py | ray.util.spark.start_hook_base.RayOnSparkStartHook | class RayOnSparkStartHook:
def __init__(self, is_global):
self.is_global = is_global
def get_default_temp_root_dir(self):
return '/tmp'
def on_ray_dashboard_created(self, port):
pass
def on_cluster_created(self, ray_cluster_handler):
pass
def on_spark_job_created... | class RayOnSparkStartHook:
def __init__(self, is_global):
pass
def get_default_temp_root_dir(self):
pass
def on_ray_dashboard_created(self, port):
pass
def on_cluster_created(self, ray_cluster_handler):
pass
def on_spark_job_created(self, job_group_id):
p... | 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 6 | 1 | 6 | 6 | 18 | 5 | 13 | 8 | 6 | 0 | 13 | 8 | 6 | 1 | 0 | 0 | 6 |
11,033 | ray-project/ray | python/ray/util/state/api.py | ray.util.state.api.StateApiClient | from typing import Any, Dict, Generator, List, Optional, Tuple, Union
from ray.util.annotations import DeveloperAPI
import warnings
from ray.util.state.exception import RayStateApiException, ServerUnavailable
import requests
from ray.dashboard.modules.dashboard_sdk import SubmissionClient
from dataclasses import fields... | @DeveloperAPI
class StateApiClient(SubmissionClient):
'''State API Client issues REST GET requests to the server for resource states.'''
def __init__(self, address: Optional[str]=None, cookies: Optional[Dict[str, Any]]=None, headers: Optional[Dict[str, Any]]=None):
'''Initialize a StateApiClient and ch... | 11 | 7 | 54 | 5 | 32 | 17 | 5 | 0.53 | 1 | 24 | 16 | 0 | 7 | 1 | 8 | 20 | 441 | 45 | 259 | 101 | 189 | 137 | 116 | 38 | 107 | 10 | 1 | 4 | 40 |
11,034 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.ActorState | from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorkerExitType, TypeWorkerType
from ray._common.pydantic_compat import IS_PYDANTIC_2
@dataclass(init=not ... | @dataclass(init=not IS_PYDANTIC_2)
class ActorState(StateSchema):
'''Actor State'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 56 | 1 | 20 | 18 | 19 | 35 | 18 | 18 | 17 | 0 | 5 | 0 | 0 |
11,035 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.ActorSummaries | from typing import Any, Dict, List, Optional, Set, Tuple, Union
@dataclass
class ActorSummaries:
summary: Dict[str, ActorSummaryPerClass]
total_actors: int
summary_by: str = 'class'
@classmethod
def to_summary(cls, *, actors: List[Dict]):
summary = {}
total_actors = 0
for a... | @dataclass
class ActorSummaries:
@classmethod
def to_summary(cls, *, actors: List[Dict]):
pass | 4 | 0 | 25 | 4 | 19 | 2 | 4 | 0.17 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 33 | 5 | 24 | 10 | 21 | 4 | 18 | 9 | 16 | 4 | 0 | 2 | 4 |
11,036 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.ActorSummaryPerClass | from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._common.pydantic_compat import IS_PYDANTIC_2
from dataclasses import asdict, field, fields
from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorker... | @dataclass(init=not IS_PYDANTIC_2)
class ActorSummaryPerClass:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 3 | 2 | 2 | 3 | 3 | 2 | 2 | 0 | 0 | 0 | 0 |
11,037 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.ClusterEventState | from ray._common.pydantic_compat import IS_PYDANTIC_2
from typing import Any, Dict, List, Optional, Set, Tuple, Union
@dataclass(init=not IS_PYDANTIC_2)
class ClusterEventState(StateSchema):
severity: str = state_column(filterable=True)
time: str = state_column(filterable=False)
source_type: str = state_co... | @dataclass(init=not IS_PYDANTIC_2)
class ClusterEventState(StateSchema):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 5 | 0 | 0 |
11,038 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.GetApiOptions | from ray._common.pydantic_compat import IS_PYDANTIC_2
@dataclass(init=not IS_PYDANTIC_2)
class GetApiOptions:
timeout: int = DEFAULT_RPC_TIMEOUT
server_timeout_multiplier: float = 0.8
def __post_init__(self):
self.timeout = max(1, int(self.timeout * self.server_timeout_multiplier))
assert ... | @dataclass(init=not IS_PYDANTIC_2)
class GetApiOptions:
def __post_init__(self):
pass | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 0 | 0 | 0 | 0 |
11,039 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.GetLogOptions | from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._common.pydantic_compat import IS_PYDANTIC_2
@dataclass(init=not IS_PYDANTIC_2)
class GetLogOptions:
timeout: int
node_id: Optional[str] = None
node_ip: Optional[str] = None
media_type: str = 'file'
filename: Optional[str] = N... | @dataclass(init=not IS_PYDANTIC_2)
class GetLogOptions:
def __post_init__(self):
pass | 3 | 0 | 37 | 2 | 35 | 0 | 9 | 0.29 | 0 | 3 | 0 | 0 | 1 | 0 | 1 | 1 | 66 | 3 | 49 | 14 | 47 | 14 | 32 | 14 | 30 | 9 | 0 | 1 | 9 |
11,040 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.Humanify | from typing import Any, Dict, List, Optional, Set, Tuple, Union
import datetime
class Humanify:
"""A class containing default methods to
convert units into a human readable string."""
def timestamp(x: float):
"""Converts milliseconds to a datetime object."""
return str(datetime.datetime.fr... |
class Humanify:
'''A class containing default methods to
convert units into a human readable string.'''
def timestamp(x: float):
'''Converts milliseconds to a datetime object.'''
pass
def memory(x: int):
'''Converts raw bytes to a human readable memory size.'''
pas... | 6 | 6 | 5 | 0 | 4 | 1 | 2 | 0.3 | 0 | 6 | 0 | 0 | 5 | 0 | 5 | 5 | 35 | 5 | 23 | 8 | 17 | 7 | 21 | 8 | 15 | 4 | 0 | 2 | 12 |
11,041 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.JobState | from ray.dashboard.modules.job.pydantic_models import JobDetails
from typing import Any, Dict, List, Optional, Set, Tuple, Union
class JobState(StateSchema, JobDetails if JobDetails is not None else object):
"""The state of the job that's submitted by Ray's Job APIs or driver jobs"""
def __init__(self, **kwar... |
class JobState(StateSchema, JobDetails if JobDetails is not None else object):
'''The state of the job that's submitted by Ray's Job APIs or driver jobs'''
def __init__(self, **kwargs):
pass
@classmethod
def filterable_columns(cls) -> Set[str]:
pass
@classmethod
def humanify(cl... | 11 | 1 | 7 | 0 | 5 | 1 | 2 | 0.24 | 1 | 6 | 1 | 0 | 2 | 0 | 6 | 36 | 53 | 7 | 37 | 12 | 26 | 9 | 18 | 8 | 11 | 4 | 5 | 1 | 9 |
11,042 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.Link | @dataclass
class Link:
type: str
id: str | @dataclass
class Link:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0.67 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 3 | 1 | 2 | 2 | 3 | 1 | 2 | 0 | 0 | 0 | 0 |
11,043 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.ListApiOptions | import warnings
from ray._common.pydantic_compat import IS_PYDANTIC_2
from typing import Any, Dict, List, Optional, Set, Tuple, Union
from dataclasses import asdict, field, fields
@dataclass(init=not IS_PYDANTIC_2)
class ListApiOptions:
limit: int = DEFAULT_LIMIT
timeout: int = DEFAULT_RPC_TIMEOUT
detail: ... | @dataclass(init=not IS_PYDANTIC_2)
class ListApiOptions:
def __post_init__(self):
pass
def has_conflicting_filters(self) -> bool:
pass | 4 | 0 | 21 | 1 | 16 | 4 | 5 | 0.51 | 0 | 4 | 0 | 0 | 2 | 0 | 2 | 2 | 66 | 4 | 41 | 14 | 38 | 21 | 26 | 14 | 23 | 5 | 0 | 3 | 9 |
11,044 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.ListApiResponse | import warnings
from ray._common.pydantic_compat import IS_PYDANTIC_2
from typing import Any, Dict, List, Optional, Set, Tuple, Union
@dataclass(init=not IS_PYDANTIC_2)
class ListApiResponse:
total: int
num_after_truncation: int
num_filtered: int
result: List[Dict]
partial_failure_warning: Optional... | @dataclass(init=not IS_PYDANTIC_2)
class ListApiResponse:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 1 | 7 | 3 | 6 | 28 | 7 | 3 | 6 | 0 | 0 | 0 | 0 |
11,045 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.NestedTaskSummary | from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorkerExitType, TypeWorkerType
from dataclasses import asdict, field, fields
from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._common.pydantic_com... | @dataclass(init=not IS_PYDANTIC_2)
class NestedTaskSummary:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1.13 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0 | 8 | 5 | 7 | 9 | 8 | 5 | 7 | 0 | 0 | 0 | 0 |
11,046 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.NodeState | from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorkerExitType, TypeWorkerType
from ray._common.pydantic_compat import IS_PYDANTIC_2
from typing import Any, Dict, List, Optional, Set, Tuple, Union
@dataclass(init=not ... | @dataclass(init=not IS_PYDANTIC_2)
class NodeState(StateSchema):
'''Node State'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 35 | 1 | 17 | 11 | 16 | 17 | 11 | 11 | 10 | 0 | 5 | 0 | 0 |
11,047 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.ObjectState | from ray._common.pydantic_compat import IS_PYDANTIC_2
from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorkerExitType, TypeWorkerType
@dataclass(init=not IS_PYDANTIC_2)
class ObjectState(StateSchema):
"""Object Sta... | @dataclass(init=not IS_PYDANTIC_2)
class ObjectState(StateSchema):
'''Object State'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 4.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 55 | 1 | 10 | 10 | 9 | 44 | 10 | 10 | 9 | 0 | 5 | 0 | 0 |
11,048 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.ObjectSummaries | from typing import Any, Dict, List, Optional, Set, Tuple, Union
@dataclass
class ObjectSummaries:
summary: Dict[str, ObjectSummaryPerKey]
total_objects: int
total_size_mb: float
callsite_enabled: bool
summary_by: str = 'callsite'
@classmethod
def to_summary(cls, *, objects: List[Dict]):
... | @dataclass
class ObjectSummaries:
@classmethod
def to_summary(cls, *, objects: List[Dict]):
pass | 4 | 0 | 65 | 9 | 51 | 5 | 10 | 0.16 | 0 | 3 | 1 | 0 | 0 | 0 | 1 | 1 | 77 | 10 | 58 | 19 | 55 | 9 | 47 | 18 | 45 | 10 | 0 | 2 | 10 |
11,049 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.ObjectSummaryPerKey | from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorkerExitType, TypeWorkerType
from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._common.pydantic_compat import IS_PYDANTIC_2
from dataclasses impo... | @dataclass(init=not IS_PYDANTIC_2)
class ObjectSummaryPerKey:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0 | 8 | 4 | 7 | 10 | 8 | 4 | 7 | 0 | 0 | 0 | 0 |
11,050 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.PlacementGroupState | from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._common.pydantic_compat import IS_PYDANTIC_2
from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorkerExitType, TypeWorkerType
@dataclass(init=not ... | @dataclass(init=not IS_PYDANTIC_2)
class PlacementGroupState(StateSchema):
'''PlacementGroup State'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 2.13 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 26 | 1 | 8 | 8 | 7 | 17 | 8 | 8 | 7 | 0 | 5 | 0 | 0 |
11,051 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.RuntimeEnvState | from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._common.pydantic_compat import IS_PYDANTIC_2
@dataclass(init=not IS_PYDANTIC_2)
class RuntimeEnvState(StateSchema):
"""Runtime Environment State"""
runtime_env: dict = state_column(filterable=True)
success: bool = state_column(filtera... | @dataclass(init=not IS_PYDANTIC_2)
class RuntimeEnvState(StateSchema):
'''Runtime Environment State'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 19 | 1 | 9 | 7 | 8 | 9 | 7 | 7 | 6 | 0 | 5 | 0 | 0 |
11,052 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.StateResource | from enum import Enum, unique
@unique
class StateResource(Enum):
ACTORS = 'actors'
JOBS = 'jobs'
PLACEMENT_GROUPS = 'placement_groups'
NODES = 'nodes'
WORKERS = 'workers'
TASKS = 'tasks'
OBJECTS = 'objects'
RUNTIME_ENVS = 'runtime_envs'
CLUSTER_EVENTS = 'cluster_events' | @unique
class StateResource(Enum):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 10 | 0 | 10 | 10 | 9 | 0 | 10 | 10 | 9 | 0 | 4 | 0 | 0 |
11,053 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.StateSchema | from abc import ABC
from typing import Any, Dict, List, Optional, Set, Tuple, Union
from dataclasses import asdict, field, fields
class StateSchema(ABC):
"""Schema class for Ray resource abstraction.
The child class must be dataclass. All child classes
- perform runtime type checking upon initialization.
... |
class StateSchema(ABC):
'''Schema class for Ray resource abstraction.
The child class must be dataclass. All child classes
- perform runtime type checking upon initialization.
- are supposed to use `state_column` instead of `field`.
It will allow the class to return filterable/detail columns.
... | 17 | 7 | 5 | 0 | 4 | 1 | 2 | 0.83 | 1 | 5 | 0 | 10 | 4 | 0 | 10 | 30 | 105 | 19 | 47 | 23 | 30 | 39 | 36 | 16 | 25 | 4 | 4 | 3 | 18 |
11,054 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.StateSummary | from ray._common.pydantic_compat import IS_PYDANTIC_2
from typing import Any, Dict, List, Optional, Set, Tuple, Union
@dataclass(init=not IS_PYDANTIC_2)
class StateSummary:
node_id_to_summary: Dict[str, Union[TaskSummaries, ActorSummaries, ObjectSummaries]] | @dataclass(init=not IS_PYDANTIC_2)
class StateSummary:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 0 | 0 | 0 |
11,055 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.SummaryApiOptions | from dataclasses import asdict, field, fields
from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._common.pydantic_compat import IS_PYDANTIC_2
@dataclass(init=not IS_PYDANTIC_2)
class SummaryApiOptions:
timeout: int = DEFAULT_RPC_TIMEOUT
filters: Optional[List[Tuple[str, PredicateType, Sup... | @dataclass(init=not IS_PYDANTIC_2)
class SummaryApiOptions:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1.67 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 2 | 6 | 4 | 5 | 10 | 4 | 4 | 3 | 0 | 0 | 0 | 0 |
11,056 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.SummaryApiResponse | from typing import Any, Dict, List, Optional, Set, Tuple, Union
import warnings
from ray._common.pydantic_compat import IS_PYDANTIC_2
@dataclass(init=not IS_PYDANTIC_2)
class SummaryApiResponse:
total: int
num_after_truncation: int
num_filtered: int
result: StateSummary = None
partial_failure_warni... | @dataclass(init=not IS_PYDANTIC_2)
class SummaryApiResponse:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0.86 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0 | 7 | 4 | 6 | 6 | 7 | 4 | 6 | 0 | 0 | 0 | 0 |
11,057 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.SummaryResource | from enum import Enum, unique
@unique
class SummaryResource(Enum):
ACTORS = 'actors'
TASKS = 'tasks'
OBJECTS = 'objects' | @unique
class SummaryResource(Enum):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
11,058 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.TaskState | from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorkerExitType, TypeWorkerType
from ray._common.pydantic_compat import IS_PYDANTIC_2
@dataclass(init=not ... | @dataclass(init=not IS_PYDANTIC_2)
class TaskState(StateSchema):
'''Task State'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1.21 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 87 | 1 | 39 | 27 | 38 | 47 | 27 | 27 | 26 | 0 | 5 | 0 | 0 |
11,059 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.TaskSummaries | import sys
from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray.core.generated.common_pb2 import TaskStatus, TaskType
@dataclass
class TaskSummaries:
summary: Union[Dict[str, TaskSummaryPerFuncOrClassName], List[NestedTaskSummary]]
total_tasks: int
total_actor_tasks: int
total_actor... | @dataclass
class TaskSummaries:
@classmethod
def to_summary_by_func_name(cls, *, tasks: List[Dict]) -> 'TaskSummaries':
pass
@classmethod
def to_summary_by_lineage(cls, *, tasks: List[Dict], actors: List[Dict]) -> 'TaskSummaries':
'''
This summarizes tasks by lineage.
i.... | 13 | 5 | 61 | 8 | 39 | 14 | 5 | 0.37 | 0 | 5 | 3 | 0 | 0 | 0 | 2 | 2 | 354 | 49 | 222 | 62 | 202 | 83 | 137 | 52 | 127 | 9 | 0 | 3 | 45 |
11,060 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.TaskSummaryPerFuncOrClassName | from ray._common.pydantic_compat import IS_PYDANTIC_2
from dataclasses import asdict, field, fields
from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorker... | @dataclass(init=not IS_PYDANTIC_2)
class TaskSummaryPerFuncOrClassName:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0 | 4 | 2 | 3 | 4 | 4 | 2 | 3 | 0 | 0 | 0 | 0 |
11,061 | ray-project/ray | python/ray/util/state/common.py | ray.util.state.common.WorkerState | from typing import Any, Dict, List, Optional, Set, Tuple, Union
from ray._private.custom_types import TypeActorStatus, TypeNodeStatus, TypePlacementGroupStatus, TypeReferenceType, TypeTaskStatus, TypeTaskType, TypeWorkerExitType, TypeWorkerType
from ray._common.pydantic_compat import IS_PYDANTIC_2
@dataclass(init=not ... | @dataclass(init=not IS_PYDANTIC_2)
class WorkerState(StateSchema):
'''Worker State'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1.44 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 30 | 67 | 1 | 27 | 15 | 26 | 39 | 15 | 15 | 14 | 0 | 5 | 0 | 0 |
11,062 | ray-project/ray | python/ray/util/state/exception.py | ray.util.state.exception.DataSourceUnavailable | class DataSourceUnavailable(Exception):
pass | class DataSourceUnavailable(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
11,063 | ray-project/ray | python/ray/util/state/exception.py | ray.util.state.exception.RayStateApiException | class RayStateApiException(Exception):
pass | class RayStateApiException(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
11,064 | ray-project/ray | python/ray/util/state/exception.py | ray.util.state.exception.ServerUnavailable | class ServerUnavailable(RayStateApiException):
"""Thrown when failing to connect to dashboard server"""
pass | class ServerUnavailable(RayStateApiException):
'''Thrown when failing to connect to dashboard server'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
11,065 | ray-project/ray | python/ray/util/state/state_cli.py | ray.util.state.state_cli.AvailableFormat | from enum import Enum, unique
@unique
class AvailableFormat(Enum):
DEFAULT = 'default'
JSON = 'json'
YAML = 'yaml'
TABLE = 'table' | @unique
class AvailableFormat(Enum):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
11,066 | ray-project/ray | python/ray/util/state/state_cli.py | ray.util.state.state_cli.LogCommandGroup | import click
class LogCommandGroup(click.Group):
def resolve_command(self, ctx, args):
"""Try resolve the command line args assuming users omitted the subcommand.
This overrides the default `resolve_command` for the parent class.
This will allow command alias of `ray <glob>` to `ray clust... |
class LogCommandGroup(click.Group):
def resolve_command(self, ctx, args):
'''Try resolve the command line args assuming users omitted the subcommand.
This overrides the default `resolve_command` for the parent class.
This will allow command alias of `ray <glob>` to `ray cluster <glob>`.
... | 2 | 1 | 13 | 1 | 7 | 5 | 2 | 0.63 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 14 | 1 | 8 | 4 | 6 | 5 | 8 | 4 | 6 | 2 | 0 | 1 | 2 |
11,067 | ray-project/ray | python/ray/util/state/state_manager.py | ray.util.state.state_manager.StateDataSourceClient | from grpc.aio._call import UnaryStreamCall
from ray.core.generated.reporter_pb2_grpc import LogServiceStub
import grpc
import json
from ray.dashboard.modules.job.common import JobInfoStorageClient
from ray.util.state.exception import DataSourceUnavailable
import aiohttp
import ray.dashboard.modules.log.log_consts as lo... |
class StateDataSourceClient:
'''The client to query states from various data sources such as Raylet, GCS, Agents.
Note that it doesn't directly query core workers. They are proxied through raylets.
The module is not in charge of service discovery. The caller is responsible for
finding services and regi... | 24 | 3 | 20 | 2 | 17 | 1 | 3 | 0.13 | 0 | 13 | 5 | 0 | 18 | 11 | 18 | 18 | 396 | 49 | 309 | 135 | 235 | 39 | 176 | 79 | 157 | 10 | 0 | 3 | 54 |
11,068 | ray-project/ray | python/ray/util/timer.py | ray.util.timer._Timer | import time
class _Timer:
"""A running stat for conveniently logging the duration of a code block.
Example:
wait_timer = TimerStat()
with wait_timer:
ray.wait(...)
Note that this class is *not* thread-safe.
"""
def __init__(self, window_size=10):
self._window_... |
class _Timer:
'''A running stat for conveniently logging the duration of a code block.
Example:
wait_timer = TimerStat()
with wait_timer:
ray.wait(...)
Note that this class is *not* thread-safe.
'''
def __init__(self, window_size=10):
pass
def __enter__... | 13 | 1 | 4 | 0 | 4 | 0 | 2 | 0.16 | 0 | 1 | 0 | 0 | 9 | 6 | 9 | 9 | 62 | 11 | 44 | 21 | 31 | 7 | 41 | 18 | 31 | 2 | 0 | 1 | 14 |
11,069 | ray-project/ray | python/ray/util/tracing/tracing_helper.py | ray.util.tracing.tracing_helper._DictPropagator | from typing import Any, Callable, Dict, Generator, List, MutableMapping, Optional, Sequence, Union, cast
class _DictPropagator:
def inject_current_context() -> Dict[Any, Any]:
"""Inject trace context into otel propagator."""
context_dict: Dict[Any, Any] = {}
_opentelemetry.propagate.inject... |
class _DictPropagator:
def inject_current_context() -> Dict[Any, Any]:
'''Inject trace context into otel propagator.'''
pass
def extract(context_dict: Dict[Any, Any]) -> '_opentelemetry.Context':
'''Given a trace context, extract as a Context.'''
pass | 3 | 2 | 5 | 0 | 4 | 1 | 1 | 0.22 | 0 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 12 | 1 | 9 | 4 | 6 | 2 | 7 | 4 | 4 | 1 | 0 | 0 | 2 |
11,070 | ray-project/ray | python/ray/util/tracing/tracing_helper.py | ray.util.tracing.tracing_helper._ImportFromStringError | class _ImportFromStringError(Exception):
pass | class _ImportFromStringError(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
11,071 | ray-project/ray | python/ray/util/tracing/tracing_helper.py | ray.util.tracing.tracing_helper._OpenTelemetryProxy | import os
import importlib
class _OpenTelemetryProxy:
"""
This proxy makes it possible for tracing to be disabled when opentelemetry
is not installed on the cluster, but is installed locally.
The check for `opentelemetry`'s existence must happen where the functions
are executed because `openteleme... |
class _OpenTelemetryProxy:
'''
This proxy makes it possible for tracing to be disabled when opentelemetry
is not installed on the cluster, but is installed locally.
The check for `opentelemetry`'s existence must happen where the functions
are executed because `opentelemetry` may be present where th... | 8 | 1 | 5 | 0 | 5 | 0 | 2 | 0.23 | 0 | 2 | 0 | 0 | 7 | 0 | 7 | 7 | 52 | 9 | 35 | 10 | 27 | 8 | 28 | 10 | 20 | 3 | 0 | 2 | 11 |
11,072 | ray-project/ray | python/ray/widgets/render.py | ray.widgets.render.Template | from typing import List
from ray.util.annotations import DeveloperAPI
import pathlib
@DeveloperAPI
class Template:
"""Class which provides basic HTML templating."""
def __init__(self, file: str):
with open(pathlib.Path(__file__).parent / 'templates' / file, 'r') as f:
self.template = f.rea... | @DeveloperAPI
class Template:
'''Class which provides basic HTML templating.'''
def __init__(self, file: str):
pass
def render(self, **kwargs) -> str:
'''Render an HTML template with the given data.
This is done by replacing instances of `{{ key }}` with `value`
from the ke... | 6 | 3 | 9 | 1 | 4 | 4 | 2 | 0.86 | 0 | 2 | 0 | 0 | 2 | 1 | 3 | 3 | 32 | 6 | 14 | 9 | 9 | 12 | 13 | 7 | 9 | 4 | 0 | 2 | 6 |
11,073 | ray-project/ray | ci/ray_ci/ray_docker_container.py | ray_docker_container.RayDockerContainer | from typing import List, Optional
from ci.ray_ci.docker_container import DockerContainer, RayType
from ci.ray_ci.utils import RAY_VERSION, docker_pull
import os
from ci.ray_ci.builder_container import DEFAULT_ARCHITECTURE, PYTHON_VERSIONS
from ci.ray_ci.container import _DOCKER_ECR_REPO
from ray_release.configs.global_... |
class RayDockerContainer(DockerContainer):
'''
Container for building and publishing ray docker images
'''
def run(self, base: Optional[str]=None) -> None:
'''
Build and publish ray docker images
'''
pass
def _should_upload(self) -> bool:
pass
def _get... | 4 | 2 | 20 | 2 | 17 | 1 | 3 | 0.11 | 1 | 2 | 0 | 0 | 3 | 0 | 3 | 43 | 67 | 8 | 53 | 16 | 49 | 6 | 32 | 16 | 28 | 4 | 7 | 2 | 9 |
11,074 | ray-project/ray | doc/source/ray-core/doc_code/ray_oom_prevention.py | ray_oom_prevention.MemoryHogger | import ray
import ray
import ray
from math import ceil
@ray.remote
class MemoryHogger:
def __init__(self):
self.allocations = []
def allocate(self, bytes_to_allocate: float) -> None:
new_list = [0] * ceil(bytes_to_allocate / 8)
self.allocations.append(new_list) | @ray.remote
class MemoryHogger:
def __init__(self):
pass
def allocate(self, bytes_to_allocate: float) -> None:
pass | 4 | 0 | 3 | 0 | 3 | 1 | 1 | 0.17 | 0 | 1 | 0 | 0 | 2 | 1 | 2 | 2 | 8 | 1 | 6 | 5 | 3 | 1 | 6 | 5 | 3 | 1 | 0 | 0 | 2 |
11,075 | ray-project/ray | doc/source/ray-core/examples/lm/ray_train.py | ray_train.RayDistributedActor | import fairseq
from contextlib import closing
from fairseq_cli.train import main
import ray
import socket
class RayDistributedActor:
"""Actor to perform distributed training."""
def run(self, url, world_rank, args):
"""Runs the fairseq training.
We set args for different ray actors for commun... |
class RayDistributedActor:
'''Actor to perform distributed training.'''
def run(self, url, world_rank, args):
'''Runs the fairseq training.
We set args for different ray actors for communication,
add a checkpoint hook, and call the main function of fairseq.
'''
pass
... | 7 | 5 | 13 | 2 | 9 | 2 | 2 | 0.39 | 0 | 4 | 0 | 0 | 4 | 2 | 4 | 4 | 67 | 14 | 38 | 14 | 31 | 15 | 31 | 13 | 24 | 2 | 0 | 1 | 9 |
11,076 | ray-project/ray | release/ray_release/buildkite/settings.py | release.ray_release.buildkite.settings.Frequency | import enum
class Frequency(enum.Enum):
MANUAL = enum.auto()
ANY = enum.auto()
NIGHTLY = enum.auto()
NIGHTLY_3x = enum.auto()
WEEKLY = enum.auto()
MONTHTLY = enum.auto() |
class Frequency(enum.Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 4 | 0 | 0 |
11,077 | ray-project/ray | release/ray_release/buildkite/settings.py | release.ray_release.buildkite.settings.Priority | import enum
class Priority(enum.Enum):
DEFAULT = 0
MANUAL = 10
HIGH = 50
HIGHEST = 100 |
class Priority(enum.Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
11,078 | ray-project/ray | release/ray_release/cluster_manager/cluster_manager.py | release.ray_release.cluster_manager.cluster_manager.ClusterManager | from ray_release.anyscale_util import get_project_name, LAST_LOGS_LENGTH
from typing import TYPE_CHECKING, Any, Dict, Optional
from ray_release.util import anyscale_cluster_url, dict_hash, get_anyscale_sdk
import time
from ray_release.logger import logger
import abc
from ray_release.config import DEFAULT_AUTOSUSPEND_MI... |
class ClusterManager(abc.ABC):
def __init__(self, test: Test, project_id: str, sdk: Optional['AnyscaleSDK']=None, smoke_test: bool=False, log_streaming_limit: int=LAST_LOGS_LENGTH):
pass
def set_cluster_env(self):
pass
def set_cluster_compute(self, cluster_compute: Dict[str, Any], extra_... | 13 | 0 | 10 | 1 | 9 | 0 | 2 | 0 | 1 | 10 | 2 | 1 | 12 | 18 | 12 | 32 | 127 | 18 | 109 | 51 | 80 | 0 | 66 | 33 | 53 | 3 | 4 | 1 | 19 |
11,079 | ray-project/ray | release/ray_release/cluster_manager/full.py | release.ray_release.cluster_manager.full.FullClusterManager | import time
from ray_release.cluster_manager.minimal import MinimalClusterManager
from ray_release.logger import logger
from ray_release.exception import ClusterCreationError, ClusterStartupError, ClusterStartupTimeout, ClusterStartupFailed
from ray_release.util import format_link, anyscale_cluster_url, exponential_bac... |
class FullClusterManager(MinimalClusterManager):
'''Full manager.
Builds app config and compute template and starts/terminated session
using SDK.
'''
def start_cluster(self, timeout: float=600.0):
pass
def terminate_cluster_ex(self, wait: bool=False):
pass | 3 | 1 | 52 | 7 | 43 | 3 | 6 | 0.12 | 1 | 9 | 4 | 1 | 2 | 5 | 2 | 42 | 112 | 16 | 86 | 22 | 83 | 10 | 54 | 17 | 51 | 7 | 6 | 2 | 12 |
11,080 | ray-project/ray | release/ray_release/cluster_manager/minimal.py | release.ray_release.cluster_manager.minimal.MinimalClusterManager | import time
from ray_release.retry import retry
from ray_release.util import format_link, anyscale_cluster_env_build_url, create_cluster_env_from_image
from ray_release.cluster_manager.cluster_manager import ClusterManager
from ray_release.logger import logger
from ray_release.exception import ClusterEnvBuildError, Clu... |
class MinimalClusterManager(ClusterManager):
'''Minimal manager.
Builds app config and compute template but does not start or stop session.
'''
@retry(init_delay_sec=10, jitter_sec=5, max_retry_count=2, exceptions=(ClusterEnvCreateError,))
def create_cluster_env(self):
pass
def build_c... | 10 | 1 | 34 | 4 | 29 | 1 | 6 | 0.04 | 1 | 11 | 4 | 1 | 8 | 6 | 8 | 40 | 289 | 41 | 239 | 41 | 224 | 9 | 144 | 29 | 135 | 10 | 5 | 4 | 44 |
11,081 | ray-project/ray | release/ray_release/command_runner/_prometheus_metrics.py | release.ray_release.command_runner._prometheus_metrics.PrometheusClient | import aiohttp
import os
from urllib.parse import quote
import time
class PrometheusClient:
def __init__(self) -> None:
self.http_session = aiohttp.ClientSession()
self.prometheus_host = os.environ.get(PROMETHEUS_HOST_ENV_VAR, DEFAULT_PROMETHEUS_HOST)
async def query_prometheus(self, query_ty... |
class PrometheusClient:
def __init__(self) -> None:
pass
async def query_prometheus(self, query_type, **kwargs):
pass
async def close(self):
pass | 4 | 0 | 6 | 0 | 6 | 0 | 2 | 0 | 0 | 3 | 0 | 0 | 3 | 2 | 3 | 3 | 22 | 2 | 20 | 10 | 16 | 0 | 16 | 9 | 12 | 3 | 0 | 3 | 5 |
11,082 | ray-project/ray | release/ray_release/command_runner/_prometheus_metrics.py | release.ray_release.command_runner._prometheus_metrics.PrometheusQueryError | class PrometheusQueryError(Exception):
def __init__(self, status, message):
self.message = f'Error fetching data from prometheus. status: {status}, message: {message}'
super().__init__(self.message) | class PrometheusQueryError(Exception):
def __init__(self, status, message):
pass | 2 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 11 | 7 | 0 | 7 | 3 | 5 | 0 | 4 | 3 | 2 | 1 | 3 | 0 | 1 |
11,083 | ray-project/ray | release/ray_release/command_runner/anyscale_job_runner.py | release.ray_release.command_runner.anyscale_job_runner.AnyscaleJobRunner | import json
import re
from ray_release.cluster_manager.cluster_manager import ClusterManager
from ray_release.job_manager import AnyscaleJobManager
from ray_release.util import join_cloud_storage_paths, generate_tmp_cloud_storage_path, get_anyscale_sdk, S3_CLOUD_STORAGE
from ray_release.command_runner.job_runner import... |
class AnyscaleJobRunner(JobRunner):
def __init__(self, cluster_manager: ClusterManager, file_manager: JobFileManager, working_dir: str, sdk: Optional['AnyscaleSDK']=None, artifact_path: Optional[str]=None):
pass
def prepare_remote_env(self):
pass
def run_prepare_command(self, command: st... | 16 | 1 | 21 | 2 | 17 | 3 | 3 | 0.15 | 1 | 21 | 13 | 0 | 14 | 12 | 14 | 58 | 310 | 38 | 237 | 70 | 203 | 36 | 124 | 49 | 109 | 13 | 6 | 3 | 35 |
11,084 | ray-project/ray | release/ray_release/command_runner/command_runner.py | release.ray_release.command_runner.command_runner.CommandRunner | from typing import Dict, Any, Optional, List
from ray_release.reporter.artifacts import DEFAULT_ARTIFACTS_DIR
from click.exceptions import ClickException
import os
from ray_release.file_manager.file_manager import FileManager
import abc
from ray_release.cluster_manager.cluster_manager import ClusterManager
from ray_rel... |
class CommandRunner(abc.ABC):
'''This is run on Buildkite runners.'''
def __init__(self, cluster_manager: ClusterManager, file_manager: FileManager, working_dir: str, artifact_path: Optional[str]=None):
pass
@property
def command_env(self):
pass
def get_full_command_env(self, env:... | 15 | 6 | 7 | 1 | 5 | 2 | 1 | 0.54 | 1 | 10 | 2 | 2 | 13 | 3 | 13 | 33 | 125 | 25 | 65 | 39 | 35 | 35 | 40 | 22 | 26 | 2 | 4 | 1 | 15 |
11,085 | ray-project/ray | release/ray_release/command_runner/job_runner.py | release.ray_release.command_runner.job_runner.JobRunner | from ray_release.logger import logger
from ray_release.cluster_manager.cluster_manager import ClusterManager
import os
from ray_release.job_manager import JobManager
from ray_release.util import format_link, get_anyscale_sdk
import shutil
import tempfile
import json
from typing import TYPE_CHECKING, Any, Dict, Optional... |
class JobRunner(CommandRunner):
def __init__(self, cluster_manager: ClusterManager, file_manager: FileManager, working_dir: str, sdk: Optional['AnyscaleSDK']=None, artifact_path: Optional[str]=None):
pass
def _copy_script_to_working_dir(self, script_name):
pass
def prepare_remote_env(sel... | 12 | 0 | 9 | 1 | 8 | 0 | 1 | 0.05 | 1 | 16 | 8 | 1 | 11 | 3 | 11 | 44 | 109 | 20 | 85 | 39 | 60 | 4 | 53 | 22 | 41 | 3 | 5 | 2 | 16 |
11,086 | ray-project/ray | release/ray_release/configs/global_config.py | release.ray_release.configs.global_config.GlobalConfig | from typing import List
from typing_extensions import TypedDict
class GlobalConfig(TypedDict):
byod_ray_ecr: str
byod_ray_cr_repo: str
byod_ray_ml_cr_repo: str
byod_ray_llm_cr_repo: str
byod_ecr: str
byod_ecr_region: str
byod_aws_cr: str
byod_gcp_cr: str
state_machine_pr_aws_bucket:... |
class GlobalConfig(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0 | 14 | 1 | 13 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 0 |
11,087 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.CloudInfoError | from ray_release.result import ExitCode
class CloudInfoError(ClusterManagerError):
exit_code = ExitCode.CLUSTER_RESOURCE_ERROR |
class CloudInfoError(ClusterManagerError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
11,088 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterComputeCreateError | from ray_release.result import ExitCode
class ClusterComputeCreateError(ClusterManagerError):
exit_code = ExitCode.CLUSTER_RESOURCE_ERROR |
class ClusterComputeCreateError(ClusterManagerError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
11,089 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterCreationError | from ray_release.result import ExitCode
class ClusterCreationError(ClusterManagerError):
exit_code = ExitCode.CLUSTER_RESOURCE_ERROR |
class ClusterCreationError(ClusterManagerError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
11,090 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterEnvBuildError | from ray_release.result import ExitCode
class ClusterEnvBuildError(ClusterManagerError):
exit_code = ExitCode.CLUSTER_ENV_BUILD_ERROR |
class ClusterEnvBuildError(ClusterManagerError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
11,091 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterEnvBuildTimeout | from ray_release.result import ExitCode
class ClusterEnvBuildTimeout(ClusterManagerError):
exit_code = ExitCode.CLUSTER_ENV_BUILD_TIMEOUT |
class ClusterEnvBuildTimeout(ClusterManagerError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
11,092 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterEnvCreateError | from ray_release.result import ExitCode
class ClusterEnvCreateError(ClusterManagerError):
exit_code = ExitCode.CLUSTER_RESOURCE_ERROR |
class ClusterEnvCreateError(ClusterManagerError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
11,093 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterManagerError | from ray_release.result import ExitCode
class ClusterManagerError(ReleaseTestError):
exit_code = ExitCode.CLUSTER_RESOURCE_ERROR |
class ClusterManagerError(ReleaseTestError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 9 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
11,094 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterNodesWaitTimeout | from ray_release.result import ExitCode
class ClusterNodesWaitTimeout(ReleaseTestError):
exit_code = ExitCode.CLUSTER_WAIT_TIMEOUT |
class ClusterNodesWaitTimeout(ReleaseTestError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
11,095 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterStartupError | from ray_release.result import ExitCode
class ClusterStartupError(ClusterManagerError):
exit_code = ExitCode.CLUSTER_STARTUP_ERROR |
class ClusterStartupError(ClusterManagerError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
11,096 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterStartupFailed | from ray_release.result import ExitCode
class ClusterStartupFailed(ClusterManagerError):
exit_code = ExitCode.CLUSTER_STARTUP_ERROR |
class ClusterStartupFailed(ClusterManagerError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
11,097 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.ClusterStartupTimeout | from ray_release.result import ExitCode
class ClusterStartupTimeout(ClusterManagerError):
exit_code = ExitCode.CLUSTER_STARTUP_TIMEOUT |
class ClusterStartupTimeout(ClusterManagerError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
11,098 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.CommandError | from ray_release.result import ExitCode
class CommandError(ReleaseTestError):
exit_code = ExitCode.COMMAND_ERROR |
class CommandError(ReleaseTestError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 4 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
11,099 | ray-project/ray | release/ray_release/exception.py | release.ray_release.exception.CommandTimeout | from ray_release.result import ExitCode
class CommandTimeout(ReleaseTestError):
exit_code = ExitCode.COMMAND_TIMEOUT |
class CommandTimeout(ReleaseTestError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.