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
10,800
ray-project/ray
python/ray/tune/logger/csv.py
ray.tune.logger.csv.CSVLogger
from typing import TYPE_CHECKING, Dict, TextIO from pathlib import Path from ray.tune.logger.logger import _LOGGER_DEPRECATION_WARNING, Logger, LoggerCallback from ray.util.annotations import Deprecated, PublicAPI from ray.air.constants import EXPR_PROGRESS_FILE import csv from ray.tune.utils import flatten_dict @Depr...
@Deprecated(message=_LOGGER_DEPRECATION_WARNING.format(old='CSVLogger', new='ray.tune.csv.CSVLoggerCallback'), warning=True) @PublicAPI class CSVLogger(Logger): '''Logs results to progress.csv under the trial directory. Automatically flattens nested dicts in the result dict before writing to csv: {"...
8
2
7
0
6
0
2
0.19
1
2
0
0
5
4
5
31
47
9
32
12
26
6
28
12
22
4
5
2
11
10,801
ray-project/ray
python/ray/tune/logger/csv.py
ray.tune.logger.csv.CSVLoggerCallback
from pathlib import Path import csv from ray.tune.logger.logger import _LOGGER_DEPRECATION_WARNING, Logger, LoggerCallback from ray.tune.utils import flatten_dict from typing import TYPE_CHECKING, Dict, TextIO from ray.util.annotations import Deprecated, PublicAPI from ray.air.constants import EXPR_PROGRESS_FILE @Publ...
@PublicAPI class CSVLoggerCallback(LoggerCallback): '''Logs results to progress.csv under the trial directory. Automatically flattens nested dicts in the result dict before writing to csv: {"a": {"b": 1, "c": 2}} -> {"a/b": 1, "a/c": 2} ''' def __init__(self): pass def _setup_t...
6
1
12
2
9
1
2
0.18
1
5
0
0
4
3
4
54
62
16
39
11
34
7
33
11
28
4
6
2
9
10,802
ray-project/ray
python/ray/tune/logger/json.py
ray.tune.logger.json.JsonLogger
import json from ray.tune.logger.logger import _LOGGER_DEPRECATION_WARNING, Logger, LoggerCallback from ray.util.annotations import Deprecated, PublicAPI from typing import TYPE_CHECKING, Dict, TextIO from ray.air.constants import EXPR_PARAM_FILE, EXPR_PARAM_PICKLE_FILE, EXPR_RESULT_FILE from pathlib import Path from r...
@Deprecated(message=_LOGGER_DEPRECATION_WARNING.format(old='JsonLogger', new='ray.tune.json.JsonLoggerCallback'), warning=True) @PublicAPI class JsonLogger(Logger): '''Logs trial results in json format. Also writes to a results file and param.json file when results or configurations are updated. Experiments...
9
1
4
0
4
0
1
0.21
1
2
1
0
6
2
6
6
36
7
24
13
17
5
24
12
17
2
1
1
7
10,803
ray-project/ray
python/ray/tune/logger/json.py
ray.tune.logger.json.JsonLoggerCallback
from pathlib import Path from typing import TYPE_CHECKING, Dict, TextIO import ray.cloudpickle as cloudpickle import json from ray.air.constants import EXPR_PARAM_FILE, EXPR_PARAM_PICKLE_FILE, EXPR_RESULT_FILE from ray.tune.utils.util import SafeFallbackEncoder from ray.tune.logger.logger import _LOGGER_DEPRECATION_WAR...
@PublicAPI class JsonLoggerCallback(LoggerCallback): '''Logs trial results in json format. Also writes to a results file and param.json file when results or configurations are updated. Experiments must be executed with the JsonLoggerCallback to be compatible with the ExperimentAnalysis tool. ''' ...
7
1
9
1
7
1
2
0.21
1
5
1
0
5
2
5
5
60
14
38
13
32
8
32
12
26
2
1
1
8
10,804
ray-project/ray
python/ray/tune/logger/logger.py
ray.tune.logger.logger.LegacyLoggerCallback
from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Set, Type from ray.util.annotations import Deprecated, DeveloperAPI, PublicAPI @DeveloperAPI class LegacyLoggerCallback(LoggerCallback): """Supports logging to trial-specific `Logger` classes. Previously, Ray Tune logging was handled via `Logge...
@DeveloperAPI class LegacyLoggerCallback(LoggerCallback): '''Supports logging to trial-specific `Logger` classes. Previously, Ray Tune logging was handled via `Logger` classes that have been instantiated per-trial. This callback is a fallback to these `Logger`-classes, instantiating each `Logger` class ...
8
1
5
0
5
0
3
0.32
1
4
1
0
6
2
6
56
47
10
28
16
21
9
28
16
21
3
6
2
16
10,805
ray-project/ray
python/ray/tune/logger/logger.py
ray.tune.logger.logger.Logger
from ray.util.annotations import Deprecated, DeveloperAPI, PublicAPI import abc from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Set, Type @Deprecated(message=_LOGGER_DEPRECATION_WARNING.format(old='Logger', new='ray.tune.logger.LoggerCallback')) @DeveloperAPI class Logger(abc.ABC): """Logging int...
@Deprecated(message=_LOGGER_DEPRECATION_WARNING.format(old='Logger', new='ray.tune.logger.LoggerCallback')) @DeveloperAPI class Logger(abc.ABC): '''Logging interface for ray.tune. By default, the UnifiedLogger implementation is used which logs results in multiple formats (TensorBoard, rllab/viskit, plain js...
9
5
4
1
3
1
1
0.81
1
2
0
9
6
3
6
26
41
12
16
10
9
13
16
10
9
1
4
0
6
10,806
ray-project/ray
python/ray/tune/logger/logger.py
ray.tune.logger.logger.LoggerCallback
import pyarrow from pathlib import Path from ray.util.annotations import Deprecated, DeveloperAPI, PublicAPI from ray.tune.callback import Callback from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Set, Type @PublicAPI class LoggerCallback(Callback): """Base class for experiment-level logger callba...
@PublicAPI class LoggerCallback(Callback): '''Base class for experiment-level logger callbacks This base class defines a general interface for logging events, like trial starts, restores, ends, checkpoint saves, and receiving trial results. Callbacks implementing this interface should make sure that...
14
6
7
1
5
2
1
0.59
1
6
0
10
12
0
12
50
110
21
56
32
26
33
35
15
22
4
5
1
15
10,807
ray-project/ray
python/ray/tune/logger/logger.py
ray.tune.logger.logger._RayDumper
import yaml class _RayDumper(yaml.SafeDumper): def represent_sequence(self, tag, sequence, flow_style=None): if len(sequence) > _SEQUENCE_LEN_FLOW_STYLE: return super().represent_sequence(tag, sequence, flow_style=True) return super().represent_sequence(tag, sequence, flow_style=flow_s...
class _RayDumper(yaml.SafeDumper): def represent_sequence(self, tag, sequence, flow_style=None): pass
2
0
4
0
4
0
2
0
1
1
0
0
1
0
1
1
5
0
5
2
3
0
5
2
3
2
1
1
2
10,808
ray-project/ray
python/ray/tune/logger/noop.py
ray.tune.logger.noop.NoopLogger
from ray.util.annotations import Deprecated, PublicAPI from ray.tune.logger.logger import Logger @Deprecated(message='`NoopLogger` will be removed in Ray 2.7.') @PublicAPI class NoopLogger(Logger): def on_result(self, result): pass
@Deprecated(message='`NoopLogger` will be removed in Ray 2.7.') @PublicAPI class NoopLogger(Logger): def on_result(self, result): pass
4
0
2
0
2
0
1
0
1
0
0
0
1
0
1
27
3
0
3
2
1
0
3
2
1
1
5
0
1
10,809
ray-project/ray
python/ray/tune/logger/tensorboardX.py
ray.tune.logger.tensorboardX.TBXLogger
from ray.util.annotations import Deprecated, PublicAPI from ray.tune.logger.logger import _LOGGER_DEPRECATION_WARNING, Logger, LoggerCallback from ray.util.debug import log_once import numpy as np from ray.tune.result import TIME_TOTAL_S, TIMESTEPS_TOTAL from typing import TYPE_CHECKING, Dict from ray.air.constants imp...
@Deprecated(message=_LOGGER_DEPRECATION_WARNING.format(old='TBXLogger', new='ray.tune.tensorboardx.TBXLoggerCallback'), warning=True) @PublicAPI class TBXLogger(Logger): '''TensorBoardX Logger. Note that hparams will be written only after a trial has terminated. This logger automatically flattens nested dic...
8
1
25
3
21
1
4
0.11
1
7
0
0
5
3
5
31
141
21
109
27
101
12
69
27
61
11
5
4
22
10,810
ray-project/ray
python/ray/tune/logger/tensorboardX.py
ray.tune.logger.tensorboardX.TBXLoggerCallback
from ray.tune.result import TIME_TOTAL_S, TIMESTEPS_TOTAL from ray.air.constants import TRAINING_ITERATION import numpy as np from ray.tune.utils import flatten_dict from ray.util.annotations import Deprecated, PublicAPI from typing import TYPE_CHECKING, Dict from ray.tune.logger.logger import _LOGGER_DEPRECATION_WARNI...
@PublicAPI class TBXLoggerCallback(LoggerCallback): '''TensorBoardX Logger. Note that hparams will be written only after a trial has terminated. This logger automatically flattens nested dicts to show on TensorBoard: {"a": {"b": 1, "c": 2}} -> {"a/b": 1, "a/c": 2} ''' def __init__(self): ...
7
1
28
3
24
1
5
0.1
1
9
0
0
5
3
5
55
157
24
122
29
114
12
78
29
70
12
6
4
23
10,811
ray-project/ray
python/ray/tune/logger/tensorboardx.py
ray.tune.logger.tensorboardx.TBXLogger
import numpy as np from typing import TYPE_CHECKING, Dict from ray.tune.utils import flatten_dict from ray.util.debug import log_once from ray.tune.result import TIME_TOTAL_S, TIMESTEPS_TOTAL from ray.air.constants import TRAINING_ITERATION from ray.tune.logger.logger import _LOGGER_DEPRECATION_WARNING, Logger, LoggerC...
@Deprecated(message=_LOGGER_DEPRECATION_WARNING.format(old='TBXLogger', new='ray.tune.tensorboardx.TBXLoggerCallback'), warning=True) @PublicAPI class TBXLogger(Logger): '''TensorBoardX Logger. Note that hparams will be written only after a trial has terminated. This logger automatically flattens nested dic...
8
1
25
3
21
1
4
0.11
1
7
0
0
5
3
5
31
141
21
109
27
101
12
69
27
61
11
5
4
22
10,812
ray-project/ray
python/ray/tune/logger/tensorboardx.py
ray.tune.logger.tensorboardx.TBXLoggerCallback
from typing import TYPE_CHECKING, Dict import numpy as np from ray.tune.result import TIME_TOTAL_S, TIMESTEPS_TOTAL from ray.util.debug import log_once from ray.util.annotations import Deprecated, PublicAPI from ray.air.constants import TRAINING_ITERATION from ray.tune.utils import flatten_dict from ray.tune.logger.log...
@PublicAPI class TBXLoggerCallback(LoggerCallback): '''TensorBoardX Logger. Note that hparams will be written only after a trial has terminated. This logger automatically flattens nested dicts to show on TensorBoard: {"a": {"b": 1, "c": 2}} -> {"a/b": 1, "a/c": 2} ''' def __init__(self): ...
7
1
28
3
24
1
5
0.1
1
9
0
0
5
3
5
55
157
24
122
29
114
12
78
29
70
12
6
4
23
10,813
ray-project/ray
python/ray/tune/logger/unified.py
ray.tune.logger.unified.UnifiedLogger
from ray.util.annotations import Deprecated, PublicAPI from ray.util import log_once from ray.tune.logger.json import JsonLogger from ray.tune.logger.logger import Logger from ray.tune.logger import DEFAULT_LOGGERS from typing import TYPE_CHECKING, Dict, List, Optional, Type @Deprecated(message='`UnifiedLogger` will b...
@Deprecated(message='`UnifiedLogger` will be removed in Ray 2.7.', warning=True) @PublicAPI class UnifiedLogger(Logger): '''Unified result logger for TensorBoard, rllab/viskit, plain json. Arguments: config: Configuration passed to all logger creators. logdir: Directory for all logger creators t...
9
1
7
0
7
0
3
0.17
1
4
1
0
6
2
6
32
56
8
41
21
28
7
29
14
22
4
5
3
16
10,814
ray-project/ray
python/ray/tune/progress_reporter.py
ray.tune.progress_reporter.CLIReporter
from typing import Any, Callable, Collection, Dict, List, Optional, Tuple, Union from ray.tune.experiment.trial import DEBUG_PRINT_INTERVAL, Trial, _Location from ray.util.annotations import DeveloperAPI, PublicAPI from ray.experimental.tqdm_ray import safe_print @PublicAPI class CLIReporter(TuneReporterBase): """...
@PublicAPI class CLIReporter(TuneReporterBase): '''Command-line reporter Args: metric_columns: Names of metrics to include in progress table. If this is a dict, the keys should be metric names and the values should be the displayed names. If this is a list, the metric...
5
1
11
0
11
0
1
1
1
5
1
3
3
0
3
17
74
4
35
19
16
35
7
4
3
1
2
0
3
10,815
ray-project/ray
python/ray/tune/progress_reporter.py
ray.tune.progress_reporter.JupyterNotebookReporter
from ray.tune.experiment.trial import DEBUG_PRINT_INTERVAL, Trial, _Location from ray.util.annotations import DeveloperAPI, PublicAPI from ray.widgets import Template import warnings from ray._private.thirdparty.tabulate.tabulate import tabulate from typing import Any, Callable, Collection, Dict, List, Optional, Tuple,...
@PublicAPI class JupyterNotebookReporter(TuneReporterBase, RemoteReporterMixin): '''Jupyter notebook-friendly Reporter that can update display in-place. Args: overwrite: Flag for overwriting the cell contents before initialization. metric_columns: Names of metrics to include in progr...
6
2
32
3
25
4
3
0.51
2
6
2
0
4
8
4
21
169
16
102
40
80
52
35
18
29
5
2
2
12
10,816
ray-project/ray
python/ray/tune/progress_reporter.py
ray.tune.progress_reporter.ProgressReporter
from ray.tune.experiment.trial import DEBUG_PRINT_INTERVAL, Trial, _Location from ray.util.annotations import DeveloperAPI, PublicAPI from typing import Any, Callable, Collection, Dict, List, Optional, Tuple, Union @PublicAPI class ProgressReporter: """Abstract class for experiment progress reporting. `should...
@PublicAPI class ProgressReporter: '''Abstract class for experiment progress reporting. `should_report()` is called to determine whether or not `report()` should be called. Tune will call these functions after trial state transitions, receiving training results, and so on. ''' def setup(self, s...
5
4
14
2
4
8
1
2
0
6
1
2
3
0
3
3
51
9
14
11
3
28
7
4
3
1
0
0
3
10,817
ray-project/ray
python/ray/tune/progress_reporter.py
ray.tune.progress_reporter.RemoteReporterMixin
from ray.util.annotations import DeveloperAPI, PublicAPI from ray.util.queue import Empty, Queue @DeveloperAPI class RemoteReporterMixin: """Remote reporter abstract mixin class. Subclasses of this class will use a Ray Queue to display output on the driver side when running Ray Client.""" @property ...
@DeveloperAPI class RemoteReporterMixin: '''Remote reporter abstract mixin class. Subclasses of this class will use a Ray Queue to display output on the driver side when running Ray Client.''' @property def output_queue(self) -> Queue: pass @output_queue.setter def output_queue(s...
7
2
4
0
2
1
1
0.78
0
3
1
1
3
1
3
3
21
5
9
7
3
7
7
5
3
1
0
0
3
10,818
ray-project/ray
python/ray/tune/progress_reporter.py
ray.tune.progress_reporter.TrialProgressCallback
from pathlib import Path import collections from ray.tune.logger import pretty_print from ray.experimental.tqdm_ray import safe_print from ray.tune.result import AUTO_RESULT_KEYS, DEFAULT_METRIC, DONE, EPISODE_REWARD_MEAN, EXPERIMENT_TAG, MEAN_ACCURACY, MEAN_LOSS, NODE_IP, PID, TIME_TOTAL_S, TIMESTEPS_TOTAL, TRIAL_ID f...
@DeveloperAPI class TrialProgressCallback(Callback): '''Reports (prints) intermediate trial progress. This callback is automatically added to the callback stack. When a result is obtained, this callback will print the results according to the specified verbosity level. For ``Verbosity.V3_TRIAL_DETAI...
12
4
20
3
15
3
3
0.29
1
10
3
0
10
8
10
48
232
44
146
58
119
42
91
43
79
8
5
2
32
10,819
ray-project/ray
python/ray/tune/progress_reporter.py
ray.tune.progress_reporter.TuneReporterBase
import numpy as np import time import pandas as pd import collections from ray.tune.utils import unflattened_lookup from ray.tune.experiment.trial import DEBUG_PRINT_INTERVAL, Trial, _Location from ray.util.annotations import DeveloperAPI, PublicAPI from ray.air.constants import EXPR_ERROR_FILE, TRAINING_ITERATION from...
@DeveloperAPI class TuneReporterBase(ProgressReporter): '''Abstract base class for the default Tune reporters. If metric_columns is not overridden, Tune will attempt to automatically infer the metrics being outputted, up to 'infer_limit' number of metrics. Args: metric_columns: Names of metr...
13
5
22
2
18
3
4
0.32
1
10
2
2
11
16
11
14
316
34
213
74
170
69
123
43
111
10
1
5
46
10,820
ray-project/ray
python/ray/tune/registry.py
ray.tune.registry._ParameterRegistry
import ray import ray.cloudpickle as pickle class _ParameterRegistry: def __init__(self): self.to_flush = {} self.references = {} def put(self, k, v): self.to_flush[k] = v if ray.is_initialized(): self.flush() def get(self, k): if not ray.is_initialize...
class _ParameterRegistry: def __init__(self): pass def put(self, k, v): pass def get(self, k): pass def flush(self): pass
5
0
5
0
5
0
2
0
0
0
0
0
4
2
4
4
22
3
19
8
14
0
18
8
13
3
0
2
8
10,821
ray-project/ray
python/ray/tune/registry.py
ray.tune.registry._Registry
import ray from typing import Callable, Optional, Type, Union from ray.experimental.internal_kv import _internal_kv_del, _internal_kv_get, _internal_kv_initialized, _internal_kv_put from ray.tune.error import TuneError import ray.cloudpickle as pickle import atexit class _Registry: def __init__(self, prefix: Opti...
class _Registry: def __init__(self, prefix: Optional[str]=None): '''If no prefix is given, use runtime context job ID.''' pass @property def prefix(self): pass def _register_atexit(self): pass def register(self, category, key, value): '''Registers the valu...
11
2
8
0
7
1
2
0.11
0
4
1
0
9
4
9
9
83
12
64
21
52
7
53
20
42
3
0
2
21
10,822
ray-project/ray
python/ray/tune/resources.py
ray.tune.resources.Resources
from ray.util.annotations import Deprecated, DeveloperAPI from typing import Optional from collections import namedtuple @Deprecated class Resources(namedtuple('Resources', ['cpu', 'gpu', 'memory', 'object_store_memory', 'extra_cpu', 'extra_gpu', 'extra_memory', 'extra_object_store_memory', 'custom_resources', 'extra_...
@Deprecated class Resources(namedtuple('Resources', ['cpu', 'gpu', 'memory', 'object_store_memory', 'extra_cpu', 'extra_gpu', 'extra_memory', 'extra_object_store_memory', 'custom_resources', 'extra_custom_resources', 'has_placement_group'])): def __new__(cls, cpu: float, gpu: float, memory: float=0, object_store_m...
3
0
17
0
17
0
1
0
1
4
0
0
1
0
1
6
37
1
36
33
4
0
4
3
2
1
1
0
1
10,823
ray-project/ray
python/ray/tune/result_grid.py
ray.tune.result_grid.ResultGrid
from ray.tune.experiment import Trial from ray.air.result import Result from ray.tune.analysis import ExperimentAnalysis import pandas as pd from typing import Optional, Union import pyarrow from ray.tune.error import TuneError from ray.exceptions import RayTaskError from ray.util import PublicAPI @PublicAPI(stability...
@PublicAPI(stability='beta') class ResultGrid: '''A set of ``Result`` objects for interacting with Ray Tune results. You can use it to inspect the trials and obtain the best result. The constructor is a private API. This object can only be created as a result of ``Tuner.fit()``. Example: .. test...
21
9
15
2
8
5
2
0.97
0
9
4
0
12
2
13
13
271
44
115
44
82
112
51
25
37
6
0
1
20
10,824
ray-project/ray
python/ray/tune/schedulers/async_hyperband.py
ray.tune.schedulers.async_hyperband.AsyncHyperBandScheduler
import pickle from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler from ray.tune.result import DEFAULT_METRIC from typing import TYPE_CHECKING, Dict, Optional, Union import numpy as np from ray.tune.experiment import Trial from ray.util import PublicAPI @PublicAPI class AsyncHyperBandScheduler...
@PublicAPI class AsyncHyperBandScheduler(FIFOScheduler): '''Implements the Async Successive Halving. This should provide similar theoretical performance as HyperBand but avoid straggler issues that HyperBand faces. One implementation detail is when using multiple brackets, trial allocation to bracket is...
11
1
14
1
13
0
3
0.26
1
8
1
0
9
11
9
30
166
20
117
49
91
31
78
31
68
8
2
1
24
10,825
ray-project/ray
python/ray/tune/schedulers/async_hyperband.py
ray.tune.schedulers.async_hyperband._Bracket
import numpy as np from typing import TYPE_CHECKING, Dict, Optional, Union from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler from ray.tune.experiment import Trial class _Bracket: """Bookkeeping system to track the cutoffs. Rungs are created in reversed order so that we can more eas...
class _Bracket: '''Bookkeeping system to track the cutoffs. Rungs are created in reversed order so that we can more easily find the correct rung corresponding to the current iteration of the result. Example: >>> trial1, trial2, trial3 = ... # doctest: +SKIP >>> b = _Bracket(1, 10, 2, 0)...
5
1
14
0
13
1
3
0.41
0
9
1
0
4
3
4
4
78
6
51
20
39
21
28
13
23
6
0
3
10
10,826
ray-project/ray
python/ray/tune/schedulers/hb_bohb.py
ray.tune.schedulers.hb_bohb.HyperBandForBOHB
from ray.tune.schedulers.hyperband import HyperBandScheduler from ray.tune.schedulers.trial_scheduler import TrialScheduler from ray.tune.experiment import Trial from typing import TYPE_CHECKING, Dict, Optional from ray.util import PublicAPI @PublicAPI class HyperBandForBOHB(HyperBandScheduler): """Extends HyperBa...
@PublicAPI class HyperBandForBOHB(HyperBandScheduler): '''Extends HyperBand early stopping algorithm for BOHB. This implementation removes the ``HyperBandScheduler`` pipelining. This class introduces key changes: 1. Trials are now placed so that the bracket with the largest size is filled first. ...
6
4
36
4
22
11
5
0.6
1
3
0
0
4
0
4
39
161
22
87
20
78
52
58
16
53
10
3
5
21
10,827
ray-project/ray
python/ray/tune/schedulers/hyperband.py
ray.tune.schedulers.hyperband.HyperBandScheduler
from ray.tune.error import TuneError from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler import numpy as np from typing import TYPE_CHECKING, Dict, List, Optional, Tuple from ray.tune.result import DEFAULT_METRIC from ray.util.annotations import PublicAPI from ray.tune.experiment import Trial ...
null
16
11
22
2
14
6
4
0.56
1
9
2
1
14
14
14
35
371
56
204
64
173
114
141
48
126
13
2
4
50
10,828
ray-project/ray
python/ray/tune/schedulers/hyperband.py
ray.tune.schedulers.hyperband._Bracket
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple import collections from ray.tune.experiment import Trial import numpy as np class _Bracket: """Logical object for tracking Hyperband bracket progress. Keeps track of proper parameters as designated by HyperBand. Also keeps track of progress to ...
class _Bracket: '''Logical object for tracking Hyperband bracket progress. Keeps track of proper parameters as designated by HyperBand. Also keeps track of progress to ensure good scheduling. ''' def __init__(self, time_attr: str, max_trials: int, init_t_attr: int, max_t_attr: int, eta: float, s: ...
16
8
11
1
8
2
2
0.33
0
8
0
0
15
16
15
15
192
35
120
54
93
39
89
43
73
3
0
2
25
10,829
ray-project/ray
python/ray/tune/schedulers/median_stopping_rule.py
ray.tune.schedulers.median_stopping_rule.MedianStoppingRule
from ray.tune.result import DEFAULT_METRIC import numpy as np from ray.util.annotations import PublicAPI from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler from typing import TYPE_CHECKING, Dict, List, Optional from ray.tune.experiment import Trial import collections @PublicAPI class MedianS...
@PublicAPI class MedianStoppingRule(FIFOScheduler): '''Implements the median stopping rule as described in the Vizier paper: https://research.google.com/pubs/pub46180.html Args: time_attr: The training result attr to use for comparing time. Note that you can pass in something non-tempora...
13
2
14
1
12
1
3
0.26
1
8
0
0
11
13
11
32
199
28
136
53
107
35
88
36
76
8
2
2
30
10,830
ray-project/ray
python/ray/tune/schedulers/pb2.py
ray.tune.schedulers.pb2.PB2
from ray.tune import TuneError from ray.tune.experiment import Trial import pandas as pd from ray.tune.schedulers.pbt import _PBTTrialState from typing import TYPE_CHECKING, Callable, Dict, Optional, Tuple, Union from ray.tune.utils.util import flatten_dict, unflatten_dict import numpy as np from ray.tune.schedulers im...
class PB2(PopulationBasedTraining): '''Implements the Population Based Bandit (PB2) algorithm. PB2 trains a group of models (or agents) in parallel. Periodically, poorly performing models clone the state of the top performers, and the hyper- parameters are re-selected using GP-bandit optimization. The ...
6
3
31
5
20
6
3
1.09
1
12
2
0
5
5
5
41
252
38
103
39
83
112
56
25
50
4
3
2
14
10,831
ray-project/ray
python/ray/tune/schedulers/pb2_utils.py
ray.tune.schedulers.pb2_utils.TV_SquaredExp
import numpy as np from sklearn.metrics import pairwise_distances from GPy.core import Param from sklearn.metrics.pairwise import euclidean_distances from GPy.kern import Kern class TV_SquaredExp(Kern): """Time varying squared exponential kernel. For more info see the TV-GP-UCB paper: http://proceedings.ml...
class TV_SquaredExp(Kern): '''Time varying squared exponential kernel. For more info see the TV-GP-UCB paper: http://proceedings.mlr.press/v51/bogunovic16.pdf ''' def __init__(self, input_dim, variance=1.0, lengthscale=1.0, epsilon=0.0, active_dims=None): pass def K(self, X, X2): ...
5
1
12
2
11
1
2
0.14
1
1
0
0
4
3
4
4
58
10
43
22
36
6
37
20
32
3
1
1
7
10,832
ray-project/ray
python/ray/tune/schedulers/pbt.py
ray.tune.schedulers.pbt.PopulationBasedTraining
from ray.air.constants import TRAINING_ITERATION from ray.tune.experiment import Trial from ray.tune.search.sample import Domain, Function from ray.train._internal.session import _FutureTrainingResult, _TrainingResult import shutil from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler import jso...
@PublicAPI class PopulationBasedTraining(FIFOScheduler): '''Implements the Population Based Training (PBT) algorithm. https://www.deepmind.com/blog/population-based-training-of-neural-networks PBT trains a group of models (or agents) in parallel. Periodically, poorly performing models clone the state of...
17
9
43
3
33
7
5
0.43
1
18
7
1
15
18
15
36
788
76
500
133
437
214
257
85
241
19
2
4
82
10,833
ray-project/ray
python/ray/tune/schedulers/pbt.py
ray.tune.schedulers.pbt.PopulationBasedTrainingReplay
from ray.air.constants import TRAINING_ITERATION import os from ray.tune.experiment import Trial from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, Union from pathlib import Path from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler from ray.util import PublicAPI import jso...
@PublicAPI class PopulationBasedTrainingReplay(FIFOScheduler): '''Replays a Population Based Training run. Population Based Training does not return a single hyperparameter configuration, but rather a schedule of configurations. For instance, PBT might discover that a larger learning rate leads to good ...
7
1
24
4
18
2
3
0.46
1
8
0
0
5
10
5
26
171
35
93
30
85
43
67
27
61
5
2
3
17
10,834
ray-project/ray
python/ray/tune/schedulers/pbt.py
ray.tune.schedulers.pbt._PBTTrialState
from ray.tune.experiment import Trial class _PBTTrialState: """Internal PBT state tracked per-trial.""" def __init__(self, trial: Trial): self.orig_tag = trial.experiment_tag self.last_score = None self.last_checkpoint = None self.last_perturbation_time = 0 self.last_tr...
class _PBTTrialState: '''Internal PBT state tracked per-trial.''' def __init__(self, trial: Trial): pass def __repr__(self) -> str: pass
3
1
8
0
8
1
1
0.18
0
1
0
0
2
6
2
2
20
2
17
9
14
3
10
9
7
1
0
0
2
10,835
ray-project/ray
python/ray/tune/schedulers/resource_changing_scheduler.py
ray.tune.schedulers.resource_changing_scheduler.DistributeResources
from ray.air.execution.resources.request import _sum_bundles from ray.tune.execution.placement_groups import PlacementGroupFactory from ray.tune.experiment import Trial import numpy as np from ray.util.annotations import PublicAPI from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Set, Tuple, Union ...
@PublicAPI(stability='beta') class DistributeResources: '''This class creates a basic uniform resource allocation function. The function naively balances free resources (CPUs and GPUs) between trials, giving them all equal priority, ensuring that all resources are always being used. The free resources w...
17
13
26
2
21
3
3
0.25
0
11
1
1
15
4
15
15
442
45
318
120
235
79
143
52
127
7
0
2
48
10,836
ray-project/ray
python/ray/tune/schedulers/resource_changing_scheduler.py
ray.tune.schedulers.resource_changing_scheduler.DistributeResourcesToTopJob
from ray.util.annotations import PublicAPI from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Set, Tuple, Union import numpy as np from ray.tune.experiment import Trial @PublicAPI(stability='beta') class DistributeResourcesToTopJob(DistributeResources): """This class creates a "TopJob" resource...
@PublicAPI(stability='beta') class DistributeResourcesToTopJob(DistributeResources): '''This class creates a "TopJob" resource allocation function. The function will assign all of the free resources to the best performing trial (as defined by ``metric`` and ``mode``). The previous best trials will not h...
6
1
24
2
22
0
2
0.55
1
6
0
0
3
2
3
18
118
14
67
30
44
37
22
11
18
3
1
1
7
10,837
ray-project/ray
python/ray/tune/schedulers/resource_changing_scheduler.py
ray.tune.schedulers.resource_changing_scheduler.ResourceChangingScheduler
from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler from ray.util.annotations import PublicAPI import warnings from ray.tune.execution.placement_groups import PlacementGroupFactory import pickle from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Set, Tuple, Union from ray.t...
@PublicAPI(stability='beta') class ResourceChangingScheduler(TrialScheduler): '''A utility scheduler to dynamically change resources of live trials. .. versionadded:: 1.5.0 .. note:: Experimental. API may change in future releases. The ResourceChangingScheduler works by wrapping around any other...
20
4
12
1
10
1
2
0.44
1
10
2
0
16
7
16
29
280
36
169
73
114
75
89
33
72
5
1
2
31
10,838
ray-project/ray
python/ray/tune/schedulers/trial_scheduler.py
ray.tune.schedulers.trial_scheduler.FIFOScheduler
from typing import TYPE_CHECKING, Dict, Optional from ray.util.annotations import DeveloperAPI, PublicAPI from ray.tune.experiment import Trial @PublicAPI class FIFOScheduler(TrialScheduler): """Simple scheduler that just runs trials in submission order.""" def __init__(self): super().__init__() ...
@PublicAPI class FIFOScheduler(TrialScheduler): '''Simple scheduler that just runs trials in submission order.''' def __init__(self): pass def on_trial_add(self, tune_controller: 'TuneController', trial: Trial): pass def on_trial_error(self, tune_controller: 'TuneController', trial: T...
10
1
3
0
3
0
2
0.04
1
2
0
14
8
0
8
21
36
8
27
14
14
1
23
10
14
5
1
2
12
10,839
ray-project/ray
python/ray/tune/schedulers/trial_scheduler.py
ray.tune.schedulers.trial_scheduler.TrialScheduler
from ray.tune.result import DEFAULT_METRIC from typing import TYPE_CHECKING, Dict, Optional from ray.tune.experiment import Trial from ray.util.annotations import DeveloperAPI, PublicAPI from ray.air._internal.usage import tag_scheduler @DeveloperAPI class TrialScheduler: """Interface for implementing a Trial Sche...
@DeveloperAPI class TrialScheduler: '''Interface for implementing a Trial Scheduler class. Note to Tune developers: If a new scheduler is added, please update `air/_internal/usage.py`. ''' def __init__(self): pass @property def metric(self): pass @property def suppor...
17
11
7
1
3
2
1
0.87
0
3
0
2
13
0
13
13
119
34
47
28
25
41
39
20
25
4
0
1
16
10,840
ray-project/ray
python/ray/tune/search/_mock.py
ray.tune.search._mock._MockSearcher
from ray.tune.search import ConcurrencyLimiter, Searcher from typing import Dict, List, Optional class _MockSearcher(Searcher): def __init__(self, **kwargs): self.live_trials = {} self.counter = {'result': 0, 'complete': 0} self.final_results = [] self.stall = False self.re...
class _MockSearcher(Searcher): def __init__(self, **kwargs): pass def suggest(self, trial_id: str): pass def on_trial_result(self, trial_id: str, result: Dict): pass def on_trial_complete(self, trial_id: str, result: Optional[Dict]=None, error: bool=False): pass ...
6
0
5
0
5
0
2
0
1
3
0
0
5
5
5
21
30
4
26
13
18
0
24
11
18
3
1
1
8
10,841
ray-project/ray
python/ray/tune/search/_mock.py
ray.tune.search._mock._MockSuggestionAlgorithm
from ray.tune.search import ConcurrencyLimiter, Searcher from typing import Dict, List, Optional from ray.tune.experiment import Trial from ray.tune.search.search_generator import SearchGenerator class _MockSuggestionAlgorithm(SearchGenerator): def __init__(self, max_concurrent: Optional[int]=None, **kwargs): ...
class _MockSuggestionAlgorithm(SearchGenerator): def __init__(self, max_concurrent: Optional[int]=None, **kwargs): pass @property def live_trials(self) -> List[Trial]: pass @property def results(self) -> List[Dict]: pass
6
0
4
0
4
0
1
0
1
4
2
1
3
1
3
30
16
2
14
7
8
0
10
5
6
2
2
1
4
10,842
ray-project/ray
python/ray/tune/search/ax/ax_search.py
ray.tune.search.ax.ax_search.AxSearch
import numpy as np from ray.tune.result import DEFAULT_METRIC from ray.tune.search import UNDEFINED_METRIC_MODE, UNDEFINED_SEARCH_SPACE, UNRESOLVED_SEARCH_SPACE, Searcher from ray import cloudpickle from ray.tune.search.variant_generator import parse_spec_vars from ray.tune.utils.util import flatten_dict, unflatten_lis...
class AxSearch(Searcher): '''Uses `Ax <https://ax.dev/>`_ to optimize hyperparameters. Ax is a platform for understanding, managing, deploying, and automating adaptive experiments. Ax provides an easy to use interface with BoTorch, a flexible, modern library for Bayesian optimization in PyTorch. Mo...
12
2
33
3
29
1
4
0.39
1
14
6
0
8
10
9
25
390
54
241
54
217
95
121
39
110
10
1
2
44
10,843
ray-project/ray
python/ray/tune/search/basic_variant.py
ray.tune.search.basic_variant.BasicVariantGenerator
from pathlib import Path import os import itertools from ray.tune.search.variant_generator import _count_spec_samples, _count_variants, _flatten_resolved_vars, _get_preset_variants, format_vars, generate_variants from typing import TYPE_CHECKING, Dict, List, Optional, Union from ray.util import PublicAPI from ray.air._...
@PublicAPI class BasicVariantGenerator(SearchAlgorithm): '''Uses Tune's variant generation for resolving variables. This is the default search algorithm used if no other search algorithm is specified. Args: points_to_evaluate: Initial parameter suggestions to be run first. This is f...
13
5
13
1
11
1
2
0.8
1
10
2
2
10
11
10
22
233
37
109
49
84
87
75
36
63
5
1
2
22
10,844
ray-project/ray
python/ray/tune/search/basic_variant.py
ray.tune.search.basic_variant._TrialIterator
from ray.tune.experiment.config_parser import _create_trial_from_spec, _make_parser from ray.tune.search.variant_generator import _count_spec_samples, _count_variants, _flatten_resolved_vars, _get_preset_variants, format_vars, generate_variants from ray.tune.error import TuneError from typing import TYPE_CHECKING, Dict...
class _TrialIterator: '''Generates trials from the spec. Args: uuid_prefix: Used in creating the trial name. num_samples: Number of samples from distribution (same as tune.TuneConfig). unresolved_spec: Experiment specification that might have unresolved distribu...
5
2
23
2
19
3
2
0.4
0
7
2
0
4
12
4
4
116
11
75
33
58
30
40
21
35
5
0
1
9
10,845
ray-project/ray
python/ray/tune/search/basic_variant.py
ray.tune.search.basic_variant._VariantIterator
class _VariantIterator: """Iterates over generated variants from the search space. This object also toggles between lazy evaluation and eager evaluation of samples. If lazy evaluation is enabled, this object cannot be serialized. """ def __init__(self, iterable, lazy_eval=False): self....
class _VariantIterator: '''Iterates over generated variants from the search space. This object also toggles between lazy evaluation and eager evaluation of samples. If lazy evaluation is enabled, this object cannot be serialized. ''' def __init__(self, iterable, lazy_eval=False): pass ...
5
1
6
0
6
0
2
0.2
0
3
0
0
4
4
4
4
35
5
25
10
20
5
24
10
19
2
0
1
7
10,846
ray-project/ray
python/ray/tune/search/bayesopt/bayesopt_search.py
ray.tune.search.bayesopt.bayesopt_search.BayesOptSearch
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple from collections import defaultdict from ray.tune.result import DEFAULT_METRIC from ray.tune.utils.util import is_nan_or_inf, unflatten_dict from ray.tune.utils import flatten_dict import pickle from ray.tune.search.sample import Domain, Float, Quantize...
class BayesOptSearch(Searcher): '''Uses bayesian-optimization/BayesianOptimization to optimize hyperparameters. bayesian-optimization/BayesianOptimization is a library for Bayesian Optimization. More info can be found here: https://github.com/bayesian-optimization/BayesianOptimization. This searcher wi...
15
7
25
3
17
5
4
0.67
1
15
4
0
11
17
12
28
409
68
204
66
172
137
134
46
120
9
1
2
48
10,847
ray-project/ray
python/ray/tune/search/bohb/bohb_search.py
ray.tune.search.bohb.bohb_search.TuneBOHB
from ray.tune.result import DEFAULT_METRIC from ray.tune.search.variant_generator import parse_spec_vars from typing import Dict, List, Optional, Union from ray.tune.utils.util import flatten_dict, unflatten_list_dict import math import copy from ray.tune.search import UNDEFINED_METRIC_MODE, UNDEFINED_SEARCH_SPACE, UNR...
null
16
1
23
2
20
1
4
0.32
1
19
9
0
12
12
13
29
335
54
213
64
181
68
141
46
125
15
1
3
49
10,848
ray-project/ray
python/ray/tune/search/bohb/bohb_search.py
ray.tune.search.bohb.bohb_search._BOHBJobWrapper
from typing import Dict, List, Optional, Union class _BOHBJobWrapper: """Mock object for HpBandSter to process.""" def __init__(self, loss: float, budget: float, config: Dict): self.result = {'loss': loss} self.kwargs = {'budget': budget, 'config': config.copy()} self.exception = None
class _BOHBJobWrapper: '''Mock object for HpBandSter to process.''' def __init__(self, loss: float, budget: float, config: Dict): pass
2
1
4
0
4
0
1
0.2
0
1
0
0
1
3
1
1
7
1
5
5
3
1
5
5
3
1
0
0
1
10,849
ray-project/ray
python/ray/tune/search/concurrency_limiter.py
ray.tune.search.concurrency_limiter.ConcurrencyLimiter
from ray.util.annotations import PublicAPI from ray.tune.search.util import _set_search_properties_backwards_compatible import copy from ray.tune.search.searcher import Searcher from typing import Dict, List, Optional @PublicAPI class ConcurrencyLimiter(Searcher): """A wrapper algorithm for limiting the number of ...
@PublicAPI class ConcurrencyLimiter(Searcher): '''A wrapper algorithm for limiting the number of concurrent trials. Certain Searchers have their own internal logic for limiting the number of concurrent trials. If such a Searcher is passed to a ``ConcurrencyLimiter``, the ``max_concurrent`` of the ``...
16
1
8
0
7
0
2
0.34
1
8
0
0
14
7
14
30
164
25
104
35
78
35
69
24
54
6
1
3
23
10,850
ray-project/ray
python/ray/tune/search/hebo/hebo_search.py
ray.tune.search.hebo.hebo_search.HEBOSearch
from ray.tune.result import DEFAULT_METRIC from ray.tune.search.sample import Categorical, Domain, Float, Integer, LogUniform, Quantized, Uniform from ray.tune.utils.util import is_nan_or_inf, unflatten_dict, validate_warmstart from ray.tune.search.variant_generator import parse_spec_vars from typing import Dict, List,...
null
14
4
31
3
28
1
5
0.31
1
18
7
0
10
14
11
27
428
54
287
70
250
89
147
44
134
9
1
2
57
10,851
ray-project/ray
python/ray/tune/search/hyperopt/hyperopt_search.py
ray.tune.search.hyperopt.hyperopt_search.HyperOptSearch
import numpy as np from functools import partial from ray.tune.search import UNDEFINED_METRIC_MODE, UNDEFINED_SEARCH_SPACE, UNRESOLVED_SEARCH_SPACE, Searcher from ray.tune.error import TuneError from ray import cloudpickle from ray.tune.search.sample import Categorical, Domain, Float, Integer, LogUniform, Normal, Quant...
class HyperOptSearch(Searcher): '''A wrapper around HyperOpt to provide trial suggestions. HyperOpt a Python library for serial and parallel optimization over awkward search spaces, which may include real-valued, discrete, and conditional dimensions. More info can be found at http://hyperopt.github...
19
3
30
2
27
1
4
0.26
1
28
9
0
14
10
15
31
509
69
348
79
315
92
196
60
177
19
1
5
74
10,852
ray-project/ray
python/ray/tune/search/nevergrad/nevergrad_search.py
ray.tune.search.nevergrad.nevergrad_search.NevergradSearch
from ray.tune.search.sample import Categorical, Domain, Float, Integer, LogUniform, Quantized import math from ray.tune.search.variant_generator import parse_spec_vars from typing import Dict, List, Optional, Sequence, Type, Union from ray.tune.result import DEFAULT_METRIC from ray.tune.search import UNDEFINED_METRIC_M...
null
12
2
28
3
24
2
5
0.38
1
16
6
0
8
10
9
25
335
55
205
48
179
78
116
31
105
14
1
3
48
10,853
ray-project/ray
python/ray/tune/search/optuna/optuna_search.py
ray.tune.search.optuna.optuna_search.OptunaSearch
from typing import Any, Callable, Dict, List, Optional, Tuple, Union from ray.tune.result import DEFAULT_METRIC from ray.tune.search import UNDEFINED_METRIC_MODE, UNDEFINED_SEARCH_SPACE, UNRESOLVED_SEARCH_SPACE, Searcher from ray.tune.utils.util import flatten_dict, unflatten_dict, validate_warmstart from ray.tune.sear...
null
14
1
38
3
33
2
6
0.61
1
24
8
1
10
12
11
27
651
91
349
88
303
213
179
52
166
13
1
3
73
10,854
ray-project/ray
python/ray/tune/search/optuna/optuna_search.py
ray.tune.search.optuna.optuna_search._OptunaTrialSuggestCaptor
from typing import Any, Callable, Dict, List, Optional, Tuple, Union import functools class _OptunaTrialSuggestCaptor: """Utility to capture returned values from Optuna's suggest_ methods. This will wrap around the ``optuna.Trial` object and decorate all `suggest_` callables with a function capturing the ...
class _OptunaTrialSuggestCaptor: '''Utility to capture returned values from Optuna's suggest_ methods. This will wrap around the ``optuna.Trial` object and decorate all `suggest_` callables with a function capturing the returned value, which will be saved in the ``captured_values`` dict. ''' d...
6
1
6
0
5
1
1
0.35
0
2
0
0
3
2
3
3
28
5
17
11
11
6
16
10
11
2
0
1
5
10,855
ray-project/ray
python/ray/tune/search/repeater.py
ray.tune.search.repeater.Repeater
from ray.util import PublicAPI import numpy as np from ray.tune.search.util import _set_search_properties_backwards_compatible from typing import Dict, List, Optional from ray.tune.search.searcher import Searcher import copy @PublicAPI class Repeater(Searcher): """A wrapper algorithm for repeating trials of same p...
@PublicAPI class Repeater(Searcher): '''A wrapper algorithm for repeating trials of same parameters. Set tune.TuneConfig(num_samples=...) to be a multiple of `repeat`. For example, set num_samples=15 if you intend to obtain 3 search algorithm suggestions and repeat each suggestion 5 times. Any leftover ...
10
2
9
1
8
1
2
0.61
1
6
1
0
8
6
8
24
125
22
64
23
53
39
47
21
38
4
1
2
14
10,856
ray-project/ray
python/ray/tune/search/repeater.py
ray.tune.search.repeater._TrialGroup
from typing import Dict, List, Optional class _TrialGroup: """Internal class for grouping trials of same parameters. This is used when repeating trials for reducing training variance. Args: primary_trial_id: Trial ID of the "primary trial". This trial is the one that the Searcher is a...
class _TrialGroup: '''Internal class for grouping trials of same parameters. This is used when repeating trials for reducing training variance. Args: primary_trial_id: Trial ID of the "primary trial". This trial is the one that the Searcher is aware of. config: Suggested configu...
8
1
3
0
3
0
1
0.36
0
8
0
0
7
4
7
7
44
10
25
12
17
9
23
12
15
2
0
1
8
10,857
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.BaseSampler
from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning @DeveloperAPI class BaseSampler(Sampler): def __str__(self): return 'Base'
@DeveloperAPI class BaseSampler(Sampler): def __str__(self): pass
3
0
2
0
2
0
1
0
1
0
0
1
1
0
1
2
3
0
3
2
1
0
3
2
1
1
1
0
1
10,858
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Categorical
from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning from typing import Any, Callable, Dict, List, Optional, Sequence, Union import numpy as np from copy import copy @DeveloperAPI class Categorical(Domain): class _Uniform(Uniform): def sample(self, domain: 'Categorical', config...
@DeveloperAPI class Categorical(Domain): class _Uniform(Uniform): def sample(self, domain: 'Categorical', config: Optional[Union[List[Dict], Dict]]=None, size: int=1, random_state: 'RandomState'=None): pass def __init__(self, categories: Sequence): pass def uniform(self):...
12
0
4
0
4
0
1
0.06
1
4
2
0
7
1
7
15
46
8
36
23
19
2
27
16
17
3
1
1
10
10,859
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Domain
from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning from typing import Any, Callable, Dict, List, Optional, Sequence, Union @DeveloperAPI class Domain: """Base class to specify a type and valid range to sample parameters from. This base class is implemented by parameter spaces, lik...
@DeveloperAPI class Domain: '''Base class to specify a type and valid range to sample parameters from. This base class is implemented by parameter spaces, like float ranges (``Float``), integer ranges (``Integer``), or categorical variables (``Categorical``). The ``Domain`` object contains information a...
11
3
5
0
4
0
1
0.26
0
6
2
4
8
0
8
8
60
11
39
19
24
10
27
13
18
2
0
1
11
10,860
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Float
from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning from copy import copy from math import isclose import numpy as np from typing import Any, Callable, Dict, List, Optional, Sequence, Union @DeveloperAPI class Float(Domain): class _Uniform(Uniform): def sample(self, domain: 'F...
@DeveloperAPI class Float(Domain): class _Uniform(Uniform): def sample(self, domain: 'Float', config: Optional[Union[List[Dict], Dict]]=None, size: int=1, random_state: 'RandomState'=None): pass class _LogUniform(LogUniform): def sample(self, domain: 'Float', config: Optional...
17
0
10
0
10
0
2
0.01
1
6
4
0
8
2
8
16
130
13
116
46
82
1
65
27
50
3
1
1
25
10,861
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Function
from typing import Any, Callable, Dict, List, Optional, Sequence, Union from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning from inspect import signature @DeveloperAPI class Function(Domain): class _CallSampler(BaseSampler): def __try_fn(self, domain: 'Function', config: Dict[...
@DeveloperAPI class Function(Domain): class _CallSampler(BaseSampler): def __try_fn(self, domain: 'Function', config: Dict[str, Any]): pass def sample(self, domain: 'Function', config: Optional[Union[List[Dict], Dict]]=None, size: int=1, random_state: 'RandomState'=None): ...
10
0
10
1
9
0
2
0.03
1
3
0
0
4
2
4
12
69
11
58
24
42
2
38
16
29
5
1
2
14
10,862
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Grid
from typing import Any, Callable, Dict, List, Optional, Sequence, Union from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning @DeveloperAPI class Grid(Sampler): """Dummy sampler used for grid search""" def sample(self, domain: Domain, config: Optional[Union[List[Dict], Dict]]=None, s...
@DeveloperAPI class Grid(Sampler): '''Dummy sampler used for grid search''' def sample(self, domain: Domain, config: Optional[Union[List[Dict], Dict]]=None, size: int=1, random_state: 'RandomState'=None): pass
3
1
8
0
8
0
1
0.11
1
3
1
0
1
0
1
2
11
1
9
8
1
1
3
2
1
1
1
0
1
10,863
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Integer
from typing import Any, Callable, Dict, List, Optional, Sequence, Union from copy import copy import numpy as np from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning @DeveloperAPI class Integer(Domain): class _Uniform(Uniform): def sample(self, domain: 'Integer', config: Option...
@DeveloperAPI class Integer(Domain): class _Uniform(Uniform): def sample(self, domain: 'Integer', config: Optional[Union[List[Dict], Dict]]=None, size: int=1, random_state: 'RandomState'=None): pass class _LogUniform(LogUniform): def sample(self, domain: 'Integer', config: Op...
14
0
7
0
7
0
2
0
1
6
3
0
7
2
7
15
79
10
69
35
44
0
44
22
32
3
1
1
15
10,864
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.LogUniform
from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning @DeveloperAPI class LogUniform(Sampler): def __init__(self, base: object=_MISSING): if base is not _MISSING: _warn_for_base() def __str__(self): return 'LogUniform'
@DeveloperAPI class LogUniform(Sampler): def __init__(self, base: object=_MISSING): pass def __str__(self): pass
4
0
3
0
3
0
1
0
1
1
0
2
2
1
2
3
7
1
6
4
3
0
6
4
3
1
1
0
2
10,865
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Normal
from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning @DeveloperAPI class Normal(Sampler): def __init__(self, mean: float=0.0, sd: float=0.0): self.mean = mean self.sd = sd assert self.sd > 0, 'SD has to be strictly greater than 0' def __str__(self): ...
@DeveloperAPI class Normal(Sampler): def __init__(self, mean: float=0.0, sd: float=0.0): pass def __str__(self): pass
4
0
4
1
3
0
1
0
1
1
0
1
2
2
2
3
9
2
7
5
4
0
7
5
4
1
1
0
2
10,866
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Quantized
from copy import copy from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning from typing import Any, Callable, Dict, List, Optional, Sequence, Union import numpy as np @DeveloperAPI class Quantized(Sampler): def __init__(self, sampler: Sampler, q: Union[float, int]): self.sampler ...
@DeveloperAPI class Quantized(Sampler): def __init__(self, sampler: Sampler, q: Union[float, int]): pass def get_sampler(self): pass def sample(self, domain: Domain, config: Optional[Union[List[Dict], Dict]]=None, size: int=1, random_state: 'RandomState'=None): pass
5
0
10
1
9
0
2
0
1
5
2
0
3
2
3
4
34
6
28
15
18
0
20
9
16
4
1
1
6
10,867
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Sampler
from typing import Any, Callable, Dict, List, Optional, Sequence, Union from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning @DeveloperAPI class Sampler: def sample(self, domain: Domain, config: Optional[Union[List[Dict], Dict]]=None, size: int=1, random_state: 'RandomState'=None): ...
@DeveloperAPI class Sampler: def sample(self, domain: Domain, config: Optional[Union[List[Dict], Dict]]=None, size: int=1, random_state: 'RandomState'=None): pass
3
0
8
0
8
0
1
0
0
3
1
6
1
0
1
1
9
0
9
8
1
0
3
2
1
1
0
0
1
10,868
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample.Uniform
from ray.util.annotations import DeveloperAPI, PublicAPI, RayDeprecationWarning @DeveloperAPI class Uniform(Sampler): def __str__(self): return 'Uniform'
@DeveloperAPI class Uniform(Sampler): def __str__(self): pass
3
0
2
0
2
0
1
0
1
0
0
3
1
0
1
2
3
0
3
2
1
0
3
2
1
1
1
0
1
10,869
ray-project/ray
python/ray/tune/search/sample.py
ray.tune.search.sample._BackwardsCompatibleNumpyRng
import numpy as np from typing import Any, Callable, Dict, List, Optional, Sequence, Union class _BackwardsCompatibleNumpyRng: """Thin wrapper to ensure backwards compatibility between new and old numpy randomness generators. """ _rng = None def __init__(self, generator_or_seed: Optional[Union['np...
class _BackwardsCompatibleNumpyRng: '''Thin wrapper to ensure backwards compatibility between new and old numpy randomness generators. ''' def __init__(self, generator_or_seed: Optional[Union['np_random_generator', np.random.RandomState, int]]=None): pass @property def legacy_rng(self)...
7
1
7
0
6
1
3
0.17
0
5
1
0
4
0
4
4
39
5
29
13
17
5
17
6
12
4
0
2
10
10,870
ray-project/ray
python/ray/tune/search/search_algorithm.py
ray.tune.search.search_algorithm.SearchAlgorithm
from ray.util.annotations import DeveloperAPI from typing import TYPE_CHECKING, Dict, List, Optional, Union @DeveloperAPI class SearchAlgorithm: """Interface of an event handler API for hyperparameter search. Unlike TrialSchedulers, SearchAlgorithms will not have the ability to modify the execution (i.e.,...
@DeveloperAPI class SearchAlgorithm: '''Interface of an event handler API for hyperparameter search. Unlike TrialSchedulers, SearchAlgorithms will not have the ability to modify the execution (i.e., stop and pause trials). Trials added manually (i.e., via the Client API) will also notify this class ...
16
12
7
1
3
4
1
1.36
0
3
0
2
12
0
12
12
118
26
39
23
18
53
31
15
18
3
0
1
14
10,871
ray-project/ray
python/ray/tune/search/search_generator.py
ray.tune.search.search_generator.SearchGenerator
from typing import Dict, List, Optional, Union from ray.tune.search.variant_generator import _resolve_nested_dict, format_vars from ray.tune.experiment import Experiment, Trial, _convert_to_experiment_list from ray.tune.utils.util import _atomic_save, _load_newest_checkpoint, flatten_dict, merge_dicts import copy from ...
@DeveloperAPI class SearchGenerator(SearchAlgorithm): '''Generates trials to be passed to the TrialRunner. Uses the provided ``searcher`` object to generate trials. This class transparently handles repeating trials with score aggregation without embedding logic into the Searcher. Args: searc...
19
6
11
1
9
2
2
0.24
1
6
2
1
15
6
15
27
193
28
135
48
111
32
91
40
75
4
1
2
24
10,872
ray-project/ray
python/ray/tune/search/searcher.py
ray.tune.search.searcher.ConcurrencyLimiter
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union from ray.tune.search.util import _set_search_properties_backwards_compatible from ray.util.annotations import DeveloperAPI, PublicAPI import copy @PublicAPI class ConcurrencyLimiter(Searcher): """A wrapper algorithm for limiting the number of concu...
@PublicAPI class ConcurrencyLimiter(Searcher): '''A wrapper algorithm for limiting the number of concurrent trials. Certain Searchers have their own internal logic for limiting the number of concurrent trials. If such a Searcher is passed to a ``ConcurrencyLimiter``, the ``max_concurrent`` of the ``...
14
1
9
1
8
1
2
0.33
1
8
0
0
12
7
12
28
157
24
100
33
76
33
65
22
52
6
1
3
21
10,873
ray-project/ray
python/ray/tune/search/searcher.py
ray.tune.search.searcher.Searcher
import os import glob from ray.util.debug import log_once from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union import warnings from ray.util.annotations import DeveloperAPI, PublicAPI from ray.air._internal.usage import tag_searcher @DeveloperAPI class Searcher: """Abstract class for wrapping suggest...
@DeveloperAPI class Searcher: '''Abstract class for wrapping suggesting algorithms. Custom algorithms can extend this class easily by overriding the `suggest` method provide generated parameters for the trials. Any subclass that implements ``__init__`` must also call the constructor of this class: `...
21
14
21
3
9
10
2
1.46
0
13
1
20
16
2
16
16
417
80
138
59
95
201
84
37
62
8
0
2
33
10,874
ray-project/ray
python/ray/tune/search/variant_generator.py
ray.tune.search.variant_generator.RecursiveDependencyError
from ray.util.annotations import DeveloperAPI, PublicAPI @DeveloperAPI class RecursiveDependencyError(Exception): def __init__(self, msg: str): Exception.__init__(self, msg)
@DeveloperAPI class RecursiveDependencyError(Exception): def __init__(self, msg: str): pass
3
0
2
0
2
0
1
0
1
1
0
0
1
0
1
11
3
0
3
2
1
0
3
2
1
1
3
0
1
10,875
ray-project/ray
python/ray/tune/search/variant_generator.py
ray.tune.search.variant_generator._UnresolvedAccessGuard
class _UnresolvedAccessGuard(dict): def __init__(self, *args, **kwds): super(_UnresolvedAccessGuard, self).__init__(*args, **kwds) self.__dict__ = self def __getattribute__(self, item): value = dict.__getattribute__(self, item) if not _is_resolved(value): raise Recu...
class _UnresolvedAccessGuard(dict): def __init__(self, *args, **kwds): pass def __getattribute__(self, item): pass
3
0
7
0
7
0
2
0
1
2
1
0
2
1
2
29
15
1
14
5
11
0
10
5
7
3
2
1
4
10,876
ray-project/ray
python/ray/tune/search/zoopt/zoopt_search.py
ray.tune.search.zoopt.zoopt_search.ZOOptSearch
from ray.tune.search import UNDEFINED_METRIC_MODE, UNDEFINED_SEARCH_SPACE, UNRESOLVED_SEARCH_SPACE, Searcher from ray.tune.result import DEFAULT_METRIC from ray.tune.utils.util import unflatten_dict import copy from typing import Dict, List, Optional, Tuple import ray.cloudpickle as pickle import ray from ray.tune.sear...
class ZOOptSearch(Searcher): '''A wrapper around ZOOpt to provide trial suggestions. ZOOptSearch is a library for derivative-free optimization. It is backed by the `ZOOpt <https://github.com/polixir/ZOOpt>`__ package. Currently, Asynchronous Sequential RAndomized COordinate Shrinking (ASRacos) is i...
11
2
28
4
23
1
5
0.58
1
16
6
0
7
13
8
24
345
59
181
61
155
105
120
44
109
8
1
2
41
10,877
ray-project/ray
python/ray/tune/stopper/experiment_plateau.py
ray.tune.stopper.experiment_plateau.ExperimentPlateauStopper
from ray.util.annotations import PublicAPI import numpy as np from ray.tune.stopper.stopper import Stopper @PublicAPI class ExperimentPlateauStopper(Stopper): """Early stop the experiment when a metric plateaued across trials. Stops the entire experiment when the metric has plateaued for more than the giv...
@PublicAPI class ExperimentPlateauStopper(Stopper): '''Early stop the experiment when a metric plateaued across trials. Stops the entire experiment when the metric has plateaued for more than the given amount of iterations specified in the patience parameter. Args: metric: The metric to be m...
6
3
14
1
11
2
3
0.63
1
4
0
0
4
7
4
26
84
9
46
19
34
29
30
12
25
5
5
1
10
10,878
ray-project/ray
python/ray/tune/stopper/function_stopper.py
ray.tune.stopper.function_stopper.FunctionStopper
from ray.util.annotations import PublicAPI from ray.tune.stopper.stopper import Stopper from typing import Callable, Dict @PublicAPI class FunctionStopper(Stopper): """Provide a custom function to check if trial should be stopped. The passed function will be called after each iteration. If it returns True...
@PublicAPI class FunctionStopper(Stopper): '''Provide a custom function to check if trial should be stopped. The passed function will be called after each iteration. If it returns True, the trial will be stopped. Args: function: Function that checks if a trial should be stopped. Must...
7
1
4
0
4
0
1
0.5
1
3
0
0
3
1
4
26
31
7
16
8
10
8
12
7
7
2
5
1
5
10,879
ray-project/ray
python/ray/tune/stopper/maximum_iteration.py
ray.tune.stopper.maximum_iteration.MaximumIterationStopper
from typing import Dict from collections import defaultdict from ray.util.annotations import PublicAPI from ray.tune.stopper.stopper import Stopper @PublicAPI class MaximumIterationStopper(Stopper): """Stop trials after reaching a maximum number of iterations Args: max_iter: Number of iterations befor...
@PublicAPI class MaximumIterationStopper(Stopper): '''Stop trials after reaching a maximum number of iterations Args: max_iter: Number of iterations before stopping a trial. ''' def __init__(self, max_iter: int): pass def __call__(self, trial_id: str, result: Dict): pass ...
5
1
3
0
3
0
1
0.44
1
2
0
0
3
2
3
25
17
4
9
6
5
4
9
6
5
1
5
0
3
10,880
ray-project/ray
python/ray/tune/stopper/noop.py
ray.tune.stopper.noop.NoopStopper
from ray.tune.stopper.stopper import Stopper from ray.util.annotations import PublicAPI @PublicAPI class NoopStopper(Stopper): def __call__(self, trial_id, result): return False def stop_all(self): return False
@PublicAPI class NoopStopper(Stopper): def __call__(self, trial_id, result): pass def stop_all(self): pass
4
0
2
0
2
0
1
0
1
0
0
0
2
0
2
24
6
1
5
3
2
0
5
3
2
1
5
0
2
10,881
ray-project/ray
python/ray/tune/stopper/stopper.py
ray.tune.stopper.stopper.CombinedStopper
from ray.util.annotations import PublicAPI from typing import Any, Dict @PublicAPI class CombinedStopper(Stopper): """Combine several stoppers via 'OR'. Args: *stoppers: Stoppers to be combined. Examples: >>> import numpy as np >>> from ray import tune >>> from ray.tune.s...
@PublicAPI class CombinedStopper(Stopper): '''Combine several stoppers via 'OR'. Args: *stoppers: Stoppers to be combined. Examples: >>> import numpy as np >>> from ray import tune >>> from ray.tune.stopper import ( ... CombinedStopper, ... MaximumIter...
5
1
2
0
2
0
1
4.14
1
3
0
0
3
1
3
25
43
7
7
5
3
29
7
5
3
1
5
0
3
10,882
ray-project/ray
python/ray/tune/stopper/stopper.py
ray.tune.stopper.stopper.Stopper
from typing import Any, Dict import abc from ray.util.annotations import PublicAPI @PublicAPI class Stopper(abc.ABC): """Base class for implementing a Tune experiment stopper. Allows users to implement experiment-level stopping via ``stop_all``. By default, this class does not stop any trials. Subclasses ...
@PublicAPI class Stopper(abc.ABC): '''Base class for implementing a Tune experiment stopper. Allows users to implement experiment-level stopping via ``stop_all``. By default, this class does not stop any trials. Subclasses need to implement ``__call__`` and ``stop_all``. Examples: >>> import...
4
3
3
0
2
1
1
7
1
4
0
7
2
0
2
22
46
6
5
3
2
35
5
3
2
1
4
0
2
10,883
ray-project/ray
python/ray/tune/stopper/timeout.py
ray.tune.stopper.timeout.TimeoutStopper
from ray.util.annotations import PublicAPI from ray.tune.stopper.stopper import Stopper import time from ray import logger from typing import Union import datetime @PublicAPI class TimeoutStopper(Stopper): """Stops all trials after a certain timeout. This stopper is automatically created when the `time_budget...
@PublicAPI class TimeoutStopper(Stopper): '''Stops all trials after a certain timeout. This stopper is automatically created when the `time_budget_s` argument is passed to `tune.RunConfig()`. Args: timeout: Either a number specifying the timeout in seconds, or a `datetime.timedelta` ...
6
1
10
2
8
1
2
0.28
1
5
0
0
4
3
4
26
54
13
32
11
26
9
24
11
18
3
5
1
8
10,884
ray-project/ray
python/ray/tune/stopper/trial_plateau.py
ray.tune.stopper.trial_plateau.TrialPlateauStopper
import numpy as np from collections import defaultdict, deque from typing import Dict, Optional from ray.util.annotations import PublicAPI from ray.tune.stopper.stopper import Stopper @PublicAPI class TrialPlateauStopper(Stopper): """Early stop single trials when they reached a plateau. When the standard devi...
@PublicAPI class TrialPlateauStopper(Stopper): '''Early stop single trials when they reached a plateau. When the standard deviation of the `metric` result of a trial is below a threshold `std`, the trial plateaued and will be stopped early. Args: metric: Metric to check for convergence. ...
5
1
19
3
15
2
4
0.58
1
5
0
0
3
8
3
25
84
13
45
22
33
26
32
14
28
7
5
2
11
10,885
ray-project/ray
python/ray/tune/syncer.py
ray.tune.syncer.SyncConfig
from ray.util.annotations import PublicAPI from ray.train._internal.syncer import SyncConfig as TrainSyncConfig from dataclasses import dataclass @PublicAPI(stability='beta') @dataclass class SyncConfig(TrainSyncConfig): """Configuration object for Tune file syncing to `RunConfig(storage_path)`. In Ray Tune, ...
@PublicAPI(stability='beta') @dataclass class SyncConfig(TrainSyncConfig): '''Configuration object for Tune file syncing to `RunConfig(storage_path)`. In Ray Tune, here is where syncing (mainly uploading) happens: The experiment driver (on the head node) syncs the experiment directory to storage (which ...
3
1
0
0
0
0
0
14.5
1
0
0
0
0
0
0
1
37
6
2
1
1
29
2
1
1
0
1
0
0
10,886
ray-project/ray
python/ray/tune/trainable/Trainable.py
ray.tune.trainable.Trainable.Trainable
from ray.tune.utils.log import disable_ipython from ray.tune.utils.util import Tee from ray.air.constants import TIME_THIS_ITER_S, TIMESTAMP, TRAINING_ITERATION from ray._common.utils import try_to_create_directory from ray.tune.utils import UtilMonitor from ray.tune.execution.placement_groups import PlacementGroupFact...
null
46
31
25
4
12
9
3
0.83
0
22
6
0
32
26
34
34
937
194
408
132
339
337
302
95
266
14
0
4
86
10,887
ray-project/ray
python/ray/tune/trainable/function_trainable.py
ray.tune.trainable.function_trainable.FunctionTrainable
import os from ray.air.constants import _ERROR_FETCH_TIMEOUT from ray.train._internal.session import TrialInfo, _TrainSession, get_session, init_session, shutdown_session from ray.tune.result import DEFAULT_METRIC, RESULT_DUPLICATE, SHOULD_CHECKPOINT from ray.train._internal.checkpoint_manager import _TrainingResult im...
@DeveloperAPI class FunctionTrainable(Trainable): '''Trainable that runs a user function reporting results. This mode of execution does not support checkpoint/restore.''' def setup(self, config): pass def _trainable_func(self, config: Dict[str, Any]): '''Subclasses can override this to...
13
3
15
1
10
4
2
0.42
1
9
2
0
10
8
10
44
172
24
104
30
92
44
64
24
52
5
1
1
20
10,888
ray-project/ray
python/ray/tune/trainable/metadata.py
ray.tune.trainable.metadata._TrainingRunMetadata
import json from ray.tune.utils.serialization import TuneFunctionDecoder, TuneFunctionEncoder from ray.train._internal.checkpoint_manager import _CheckpointManager from collections import deque from numbers import Number from typing import Optional, Tuple class _TrainingRunMetadata: """Serializable struct for hold...
class _TrainingRunMetadata: '''Serializable struct for holding runtime trial metadata. Runtime metadata is data that changes and is updated on runtime. This includes e.g. the last result, the currently available checkpoints, and the number of errors encountered for a trial. ''' def __init__(se...
8
1
13
2
10
1
2
0.19
0
8
3
0
5
12
6
6
93
17
64
25
56
12
49
24
42
4
0
2
11
10,889
ray-project/ray
python/ray/tune/trainable/trainable.py
ray.tune.trainable.trainable.Trainable
from ray.tune.utils import UtilMonitor from ray.air._internal.util import exception_cause, skip_exceptions from ray.tune.result import DEBUG_METRICS, DONE, EPISODES_THIS_ITER, EPISODES_TOTAL, HOSTNAME, NODE_IP, PID, RESULT_DUPLICATE, SHOULD_CHECKPOINT, STDERR_FILE, STDOUT_FILE, TIME_TOTAL_S, TIMESTEPS_THIS_ITER, TIMEST...
null
46
31
25
4
12
9
3
0.83
0
22
6
1
32
26
34
34
937
194
408
132
339
337
302
95
266
14
0
4
86
10,890
ray-project/ray
python/ray/tune/trainable/trainable_fn_utils.py
ray.tune.trainable.trainable_fn_utils.Checkpoint
from ray.train._checkpoint import Checkpoint as TrainCheckpoint from ray.train.utils import _copy_doc, _log_deprecation_warning @_copy_doc(TrainCheckpoint) class Checkpoint(TrainCheckpoint): pass
@_copy_doc(TrainCheckpoint) class Checkpoint(TrainCheckpoint): pass
2
0
0
0
0
0
0
1
1
0
0
0
0
0
0
24
4
0
2
1
1
2
2
1
1
0
4
0
0
10,891
ray-project/ray
python/ray/tune/tune.py
ray.tune.tune._Config
import abc class _Config(abc.ABC): def to_dict(self) -> dict: """Converts this configuration to a dict format.""" raise NotImplementedError
class _Config(abc.ABC): def to_dict(self) -> dict: '''Converts this configuration to a dict format.''' pass
2
1
3
0
2
1
1
0.33
1
2
0
1
1
0
1
21
4
0
3
2
1
1
3
2
1
1
4
0
1
10,892
ray-project/ray
python/ray/tune/tune_config.py
ray.tune.tune_config.ResumeConfig
from enum import Enum from ray.util.annotations import DeveloperAPI, PublicAPI from dataclasses import dataclass @DeveloperAPI @dataclass class ResumeConfig: """[Experimental] This config is used to specify how to resume Tune trials.""" class ResumeType(Enum): """An enumeration to define resume types ...
@DeveloperAPI @dataclass class ResumeConfig: '''[Experimental] This config is used to specify how to resume Tune trials.''' class ResumeType(Enum): '''An enumeration to define resume types for various trial states. Members: RESUME: Resume from the latest checkpoint. REST...
4
2
0
0
0
0
0
0.88
0
0
0
0
0
0
0
0
19
4
8
8
6
7
8
8
6
0
0
0
0
10,893
ray-project/ray
python/ray/tune/tune_config.py
ray.tune.tune_config.TuneConfig
from ray.tune.schedulers import TrialScheduler import datetime from typing import Callable, Optional, Union from ray.tune.search import SearchAlgorithm, Searcher from ray.tune.experiment.trial import Trial from ray.util.annotations import DeveloperAPI, PublicAPI from ray.train.constants import _DEPRECATED_VALUE from da...
@dataclass @PublicAPI(stability='beta') class TuneConfig: '''Tune specific configs. Args: metric: Metric to optimize. This metric should be reported with `tune.report()`. If set, will be passed to the search algorithm and scheduler. mode: Must be one of [min, max]. Determ...
3
1
0
0
0
0
0
4
0
0
0
0
0
0
0
0
62
2
12
12
11
48
12
12
11
0
0
0
0
10,894
ray-project/ray
python/ray/tune/tuner.py
ray.tune.tuner.Tuner
import os from ray.tune.tune_config import TuneConfig from ray.air.util.node import _force_on_current_node from ray.tune import ResumeConfig, RunConfig from pathlib import Path from ray.util import PublicAPI from ray.train._internal.storage import _exists_at_fs_path, get_fs_and_path from ray.air._internal.usage import ...
@PublicAPI(stability='beta') class Tuner: '''Tuner is the recommended way of launching hyperparameter tuning jobs with Ray Tune. Args: trainable: The trainable to be tuned. param_space: Search space of the tuning job. See :ref:`tune-search-space-tutorial`. tune_config: Tuning specific co...
11
6
43
5
20
18
3
1.33
0
13
6
0
5
1
7
7
391
58
144
52
108
191
58
22
50
6
0
2
19
10,895
ray-project/ray
python/ray/tune/utils/file_transfer.py
ray.tune.utils.file_transfer._PackActor
import ray from typing import Dict, Generator, List, Optional, Tuple, Union @ray.remote class _PackActor: """Actor wrapping around a packing job. This actor is used for chunking the packed data into smaller chunks that can be transferred via the object store more efficiently. The actor will start pac...
@ray.remote class _PackActor: '''Actor wrapping around a packing job. This actor is used for chunking the packed data into smaller chunks that can be transferred via the object store more efficiently. The actor will start packing the directory when initialized, and separate chunks can be received by...
6
1
11
1
10
0
2
0.42
0
6
0
0
4
4
4
4
66
9
40
18
28
17
25
11
20
3
0
1
8
10,896
ray-project/ray
python/ray/tune/utils/log.py
ray.tune.utils.log.Verbosity
from ray.util import PublicAPI from enum import Enum @PublicAPI class Verbosity(Enum): V0_MINIMAL = 0 V1_EXPERIMENT = 1 V2_TRIAL_NORM = 2 V3_TRIAL_DETAILS = 3 def __int__(self): return self.value
@PublicAPI class Verbosity(Enum): def __int__(self): pass
3
0
2
0
2
0
1
0
1
0
0
0
1
0
1
50
8
1
7
6
5
0
7
6
5
1
4
0
1
10,897
ray-project/ray
python/ray/tune/utils/mock.py
ray.tune.utils.mock.FailureInjectorCallback
from pathlib import Path from ray.tune.callback import Callback import os import random import time class FailureInjectorCallback(Callback): """Adds random failure injection to the TrialExecutor.""" def __init__(self, config_path='~/ray_bootstrap_config.yaml', probability=0.1, time_between_checks=0, disable=F...
class FailureInjectorCallback(Callback): '''Adds random failure injection to the TrialExecutor.''' def __init__(self, config_path='~/ray_bootstrap_config.yaml', probability=0.1, time_between_checks=0, disable=False): pass def on_step_begin(self, **info): pass
3
1
24
2
21
2
4
0.09
1
2
0
0
2
5
2
40
52
5
43
19
32
4
26
13
21
6
5
3
7
10,898
ray-project/ray
python/ray/tune/utils/mock.py
ray.tune.utils.mock.TrialStatusSnapshot
from ray.tune.experiment import Trial from typing import Dict class TrialStatusSnapshot: """A sequence of statuses of trials as they progress. If all trials keep previous status, no snapshot is taken. """ def __init__(self): self._snapshot = [] def append(self, new_snapshot: Dict[str, st...
class TrialStatusSnapshot: '''A sequence of statuses of trials as they progress. If all trials keep previous status, no snapshot is taken. ''' def __init__(self): pass def append(self, new_snapshot: Dict[str, str]): '''May append a new snapshot to the sequence.''' pass ...
5
4
8
1
6
2
3
0.38
0
3
0
0
4
1
4
4
40
7
24
11
19
9
22
11
17
4
0
3
10
10,899
ray-project/ray
python/ray/tune/utils/mock.py
ray.tune.utils.mock.TrialStatusSnapshotTaker
from ray.tune.callback import Callback from collections import defaultdict class TrialStatusSnapshotTaker(Callback): """Collects a sequence of statuses of trials as they progress. If all trials keep previous status, no snapshot is taken. """ def __init__(self, snapshot: TrialStatusSnapshot): ...
class TrialStatusSnapshotTaker(Callback): '''Collects a sequence of statuses of trials as they progress. If all trials keep previous status, no snapshot is taken. ''' def __init__(self, snapshot: TrialStatusSnapshot): pass def on_step_end(self, iteration, trials, **kwargs): pass
3
1
4
0
4
0
2
0.38
1
2
1
0
2
1
2
40
14
3
8
6
5
3
8
6
5
2
5
1
3