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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19,200 | iterative/dvc | dvc/logger.py | dvc.logger.ColorFormatter | from typing import ClassVar
import colorama
import logging.handlers
import logging
import logging.config
class ColorFormatter(logging.Formatter):
"""Spit out colored text in supported terminals.
colorama__ makes ANSI escape character sequences work under Windows.
See the colorama documentation for details... |
class ColorFormatter(logging.Formatter):
'''Spit out colored text in supported terminals.
colorama__ makes ANSI escape character sequences work under Windows.
See the colorama documentation for details.
__ https://pypi.python.org/pypi/colorama
If record has an extra `tb_only` attribute, it will not... | 3 | 1 | 21 | 2 | 19 | 1 | 8 | 0.17 | 1 | 3 | 0 | 0 | 2 | 2 | 2 | 9 | 64 | 10 | 47 | 15 | 44 | 8 | 41 | 15 | 38 | 15 | 2 | 3 | 16 |
19,201 | iterative/dvc | dvc/logger.py | dvc.logger.LoggerHandler | import logging
import logging.config
from dvc.progress import Tqdm
import logging.handlers
class LoggerHandler(logging.StreamHandler):
def handleError(self, record):
super().handleError(record)
raise LoggingException(record)
def emit_pretty_exception(self, exc, verbose: bool=False):
r... |
class LoggerHandler(logging.StreamHandler):
def handleError(self, record):
pass
def emit_pretty_exception(self, exc, verbose: bool=False):
pass
def emit_pretty_exception(self, exc, verbose: bool=False):
'''Write to Tqdm's stream so as to not break progress-bars'''
pass | 4 | 1 | 8 | 0 | 8 | 1 | 3 | 0.17 | 1 | 6 | 2 | 0 | 3 | 1 | 3 | 28 | 28 | 3 | 24 | 7 | 20 | 4 | 24 | 6 | 20 | 7 | 4 | 5 | 9 |
19,202 | iterative/dvc | dvc/logger.py | dvc.logger.LoggingException | class LoggingException(Exception):
def __init__(self, record):
msg = f'failed to log {record!s}'
super().__init__(msg) | class LoggingException(Exception):
def __init__(self, record):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 11 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 3 | 0 | 1 |
19,203 | iterative/dvc | dvc/output.py | dvc.output.CheckoutCallback | from .fs.callbacks import DEFAULT_CALLBACK, Callback, TqdmCallback
class CheckoutCallback(TqdmCallback):
branch = Callback.branch |
class CheckoutCallback(TqdmCallback):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 3 | 0 | 2 | 2 | 1 | 2 | 2 | 2 | 1 | 0 | 2 | 0 | 0 |
19,204 | iterative/dvc | dvc/output.py | dvc.output.Output | from dvc.exceptions import CacheLinkError, CheckoutError, CollectCacheError, ConfirmRemoveError, DvcException, MergeError
from .fs import LocalFileSystem, RemoteMissingDepsError, Schemes, get_cloud_fs
from .fs.callbacks import DEFAULT_CALLBACK, Callback, TqdmCallback
from dvc.log import logger
from dvc.utils import for... |
class Output:
def __init__(self, stage, path, info=None, cache=True, metric=False, plot=False, persist=False, desc=None, type=None, labels=None, meta=None, remote=None, repo=None, fs_config=None, files: Optional[list[dict[str, Any]]]=None, push: bool=True, hash_name: Optional[str]=DEFAULT_ALGORITHM):
pass... | 84 | 4 | 17 | 2 | 14 | 1 | 3 | 0.05 | 0 | 18 | 5 | 0 | 65 | 18 | 65 | 65 | 1,197 | 194 | 966 | 279 | 824 | 49 | 679 | 208 | 598 | 17 | 0 | 3 | 226 |
19,205 | iterative/dvc | dvc/output.py | dvc.output.OutputAlreadyTrackedError | from dvc.exceptions import CacheLinkError, CheckoutError, CollectCacheError, ConfirmRemoveError, DvcException, MergeError
class OutputAlreadyTrackedError(DvcException):
def __init__(self, path):
msg = f""" output '{path}' is already tracked by SCM (e.g. Git).\n You can remove it from Git, then add to D... |
class OutputAlreadyTrackedError(DvcException):
def __init__(self, path):
pass | 2 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 8 | 0 | 8 | 3 | 6 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
19,206 | iterative/dvc | dvc/output.py | dvc.output.OutputDoesNotExistError | from dvc.exceptions import CacheLinkError, CheckoutError, CollectCacheError, ConfirmRemoveError, DvcException, MergeError
class OutputDoesNotExistError(DvcException):
def __init__(self, path):
msg = f"output '{path}' does not exist"
super().__init__(msg) |
class OutputDoesNotExistError(DvcException):
def __init__(self, path):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
19,207 | iterative/dvc | dvc/output.py | dvc.output.OutputIsIgnoredError | from dvc.exceptions import CacheLinkError, CheckoutError, CollectCacheError, ConfirmRemoveError, DvcException, MergeError
class OutputIsIgnoredError(DvcException):
def __init__(self, result: 'CheckIgnoreResult'):
pi = result.pattern_infos[-1]
super().__init__(f'Path {result.file!r} is ignored by {... |
class OutputIsIgnoredError(DvcException):
def __init__(self, result: 'CheckIgnoreResult'):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
19,208 | iterative/dvc | dvc/output.py | dvc.output.OutputIsNotFileOrDirError | from dvc.exceptions import CacheLinkError, CheckoutError, CollectCacheError, ConfirmRemoveError, DvcException, MergeError
class OutputIsNotFileOrDirError(DvcException):
def __init__(self, path):
msg = f"output '{path}' is not a file or directory"
super().__init__(msg) |
class OutputIsNotFileOrDirError(DvcException):
def __init__(self, path):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
19,209 | iterative/dvc | dvc/output.py | dvc.output.OutputIsStageFileError | from dvc.exceptions import CacheLinkError, CheckoutError, CollectCacheError, ConfirmRemoveError, DvcException, MergeError
class OutputIsStageFileError(DvcException):
def __init__(self, path):
super().__init__(f"DVC file '{path}' cannot be an output.") |
class OutputIsStageFileError(DvcException):
def __init__(self, path):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
19,210 | iterative/dvc | dvc/parsing/__init__.py | dvc.parsing.ArtifactDefinition | from .interpolate import check_expression, check_recursive_parse_errors, is_interpolated_string, recurse, to_str
from .context import Context, ContextError, KeyNotInContext, MergeError, Node, VarsAlreadyLoaded
from typing import TYPE_CHECKING, Any, NamedTuple, Optional, Union
from dvc.parsing.interpolate import ParseEr... |
class ArtifactDefinition(TopDefinition):
def resolve(self) -> dict[str, Optional[dict[str, Any]]]:
pass | 2 | 0 | 13 | 0 | 13 | 0 | 3 | 0 | 1 | 8 | 3 | 0 | 1 | 0 | 1 | 3 | 14 | 0 | 14 | 5 | 12 | 0 | 11 | 4 | 9 | 3 | 1 | 2 | 3 |
19,211 | iterative/dvc | dvc/parsing/__init__.py | dvc.parsing.DataResolver | from funcy import collecting, first, isa, join, reraise
import os
from typing import TYPE_CHECKING, Any, NamedTuple, Optional, Union
from .context import Context, ContextError, KeyNotInContext, MergeError, Node, VarsAlreadyLoaded
from dvc.log import logger
from collections.abc import Mapping, Sequence
class DataResolv... |
class DataResolver:
def __init__(self, repo: 'Repo', wdir: str, d: dict):
pass
def resolve_one(self, name: str):
pass
def resolve_one(self, name: str):
'''Used for testing purposes, otherwise use resolve_one().'''
pass
def resolve_artifacts(self) -> dict[str, Optiona... | 14 | 1 | 9 | 1 | 7 | 1 | 2 | 0.16 | 0 | 16 | 8 | 0 | 12 | 12 | 12 | 12 | 124 | 23 | 88 | 37 | 74 | 14 | 69 | 35 | 56 | 4 | 0 | 2 | 22 |
19,212 | iterative/dvc | dvc/parsing/__init__.py | dvc.parsing.EntryDefinition | from copy import deepcopy
from dvc.parsing.interpolate import ParseError
from dvc.log import logger
from typing import TYPE_CHECKING, Any, NamedTuple, Optional, Union
from .context import Context, ContextError, KeyNotInContext, MergeError, Node, VarsAlreadyLoaded
from .interpolate import check_expression, check_recursi... |
class EntryDefinition:
def __init__(self, resolver: DataResolver, context: Context, name: str, definition: 'DictStrAny', where: str=STAGES_KWD):
pass
def _resolve_wdir(self, context: Context, name: str, wdir: Optional[str]=None) -> str:
pass
def resolve(self, **kwargs):
pass
... | 6 | 0 | 17 | 1 | 13 | 3 | 2 | 0.21 | 0 | 9 | 6 | 0 | 5 | 7 | 5 | 5 | 92 | 11 | 67 | 36 | 50 | 14 | 48 | 20 | 42 | 4 | 0 | 1 | 12 |
19,213 | iterative/dvc | dvc/parsing/__init__.py | dvc.parsing.EntryNotFound | from dvc.exceptions import DvcException
class EntryNotFound(DvcException):
pass |
class EntryNotFound(DvcException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
19,214 | iterative/dvc | dvc/parsing/__init__.py | dvc.parsing.ForeachDefinition | from dvc.parsing.interpolate import ParseError
from dvc.utils.objects import cached_property
from .context import Context, ContextError, KeyNotInContext, MergeError, Node, VarsAlreadyLoaded
from funcy import collecting, first, isa, join, reraise
from .interpolate import check_expression, check_recursive_parse_errors, i... |
class ForeachDefinition:
def __init__(self, resolver: DataResolver, context: Context, name: str, definition: 'DictStrAny', where: str=STAGES_KWD):
pass
@cached_property
def template(self):
pass
@cached_property
def resolved_iterable(self):
pass
def _resolve_foreach_dat... | 18 | 1 | 9 | 1 | 7 | 1 | 2 | 0.21 | 0 | 18 | 9 | 0 | 14 | 8 | 14 | 14 | 137 | 20 | 97 | 49 | 72 | 20 | 74 | 37 | 59 | 3 | 0 | 2 | 24 |
19,215 | iterative/dvc | dvc/parsing/__init__.py | dvc.parsing.IterationPair | from typing import TYPE_CHECKING, Any, NamedTuple, Optional, Union
class IterationPair(NamedTuple):
key: str = 'key'
value: str = 'item' |
class IterationPair(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 1 | 0 | 0 |
19,216 | iterative/dvc | dvc/parsing/__init__.py | dvc.parsing.MatrixDefinition | from dvc.utils.objects import cached_property
from collections.abc import Mapping, Sequence
from funcy import collecting, first, isa, join, reraise
from itertools import product
from dvc.parsing.interpolate import ParseError
from dvc.log import logger
from .context import Context, ContextError, KeyNotInContext, MergeEr... |
class MatrixDefinition:
def __init__(self, resolver: DataResolver, context: Context, name: str, definition: 'DictStrAny', where: str=STAGES_KWD):
pass
@cached_property
def template(self) -> 'DictStrAny':
pass
@cached_property
def resolved_iterable(self) -> dict[str, list]:
... | 16 | 1 | 8 | 1 | 7 | 1 | 2 | 0.14 | 0 | 17 | 7 | 0 | 12 | 8 | 12 | 12 | 116 | 18 | 86 | 48 | 63 | 12 | 66 | 36 | 53 | 4 | 0 | 2 | 19 |
19,217 | iterative/dvc | dvc/parsing/__init__.py | dvc.parsing.ResolveError | from dvc.exceptions import DvcException
class ResolveError(DvcException):
pass |
class ResolveError(DvcException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
19,218 | iterative/dvc | dvc/parsing/__init__.py | dvc.parsing.TopDefinition | from dvc.parsing.interpolate import ParseError
from .context import Context, ContextError, KeyNotInContext, MergeError, Node, VarsAlreadyLoaded
from .interpolate import check_expression, check_recursive_parse_errors, is_interpolated_string, recurse, to_str
class TopDefinition:
def __init__(self, resolver: DataRes... |
class TopDefinition:
def __init__(self, resolver: DataResolver, context: Context, name: str, definition: 'Any', where: str):
pass
def resolve(self):
pass | 3 | 0 | 10 | 0 | 10 | 0 | 2 | 0 | 0 | 5 | 4 | 1 | 2 | 6 | 2 | 2 | 22 | 1 | 21 | 17 | 11 | 0 | 14 | 9 | 11 | 2 | 0 | 1 | 3 |
19,219 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.Container | from typing import Any, Optional, Union
from abc import ABC, abstractmethod
from funcy import identity, lfilter, nullcontext, select
class Container(Node, ABC):
meta: Meta
data: Union[list, dict]
_key_transform = staticmethod(identity)
def __init__(self, meta=None) -> None:
self.meta = meta or... |
class Container(Node, ABC):
def __init__(self, meta=None) -> None:
pass
def _convert(self, key, value):
pass
@staticmethod
def _convert_with_meta(value, meta: Optional[Meta]=None):
pass
def __repr__(self):
pass
def __getitem__(self, key):
pass
de... | 14 | 0 | 5 | 0 | 4 | 0 | 2 | 0.02 | 2 | 10 | 4 | 2 | 11 | 0 | 12 | 34 | 72 | 14 | 58 | 22 | 44 | 1 | 55 | 20 | 42 | 5 | 4 | 2 | 20 |
19,220 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.Context | from typing import Any, Optional, Union
from copy import deepcopy
from dvc.parsing.interpolate import get_expression, get_matches, is_exact_string, normalize_key, recurse, str_interpolate, validate_value
from funcy import identity, lfilter, nullcontext, select
from collections import defaultdict
from contextlib import ... |
class Context(CtxDict):
def __init__(self, *args, **kwargs):
'''
Top level mutable dict, with some helpers to create context and track
'''
pass
@contextmanager
def track(self):
pass
def _track_data(self, node):
pass
def select(self, key: str, unwra... | 21 | 6 | 16 | 1 | 12 | 3 | 3 | 0.23 | 1 | 16 | 5 | 0 | 13 | 4 | 15 | 75 | 260 | 34 | 184 | 81 | 139 | 43 | 136 | 50 | 119 | 7 | 8 | 2 | 46 |
19,221 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.ContextError | from dvc.exceptions import DvcException
class ContextError(DvcException):
pass |
class ContextError(DvcException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
19,222 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.CtxDict | from typing import Any, Optional, Union
from copy import deepcopy
from collections.abc import Mapping, MutableMapping, MutableSequence, Sequence
class CtxDict(Container, MutableMapping):
def __init__(self, mapping: Optional[Mapping]=None, meta: Optional[Meta]=None, **kwargs):
super().__init__(meta=meta)
... |
class CtxDict(Container, MutableMapping):
def __init__(self, mapping: Optional[Mapping]=None, meta: Optional[Meta]=None, **kwargs):
pass
def __setitem__(self, key, value):
pass
def merge_update(self, other, overwrite=False):
pass
@property
def value(self):
pass
... | 7 | 0 | 6 | 0 | 5 | 1 | 2 | 0.11 | 2 | 4 | 1 | 1 | 5 | 1 | 5 | 60 | 35 | 5 | 28 | 15 | 16 | 3 | 20 | 9 | 14 | 3 | 7 | 1 | 9 |
19,223 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.CtxList | from typing import Any, Optional, Union
from collections.abc import Mapping, MutableMapping, MutableSequence, Sequence
class CtxList(Container, MutableSequence):
_key_transform = staticmethod(int)
def __init__(self, values: Sequence, meta: Optional[Meta]=None):
super().__init__(meta=meta)
self... |
class CtxList(Container, MutableSequence):
def __init__(self, values: Sequence, meta: Optional[Meta]=None):
pass
def insert(self, index: int, value):
pass
def get_sources(self):
pass
@property
def value(self):
pass
def __deepcopy__(self, _):
pass | 7 | 0 | 3 | 0 | 3 | 0 | 1 | 0.12 | 2 | 4 | 1 | 0 | 5 | 1 | 5 | 64 | 23 | 5 | 17 | 10 | 10 | 2 | 16 | 9 | 10 | 1 | 7 | 0 | 5 |
19,224 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.KeyNotInContext | class KeyNotInContext(ContextError, KeyError):
def __init__(self, key: str) -> None:
self.key: str = key
super().__init__(f"Could not find '{key}'")
def __str__(self):
return self.msg | class KeyNotInContext(ContextError, KeyError):
def __init__(self, key: str) -> None:
pass
def __str__(self):
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 2 | 2 | 0 | 0 | 2 | 1 | 2 | 15 | 7 | 1 | 6 | 4 | 3 | 0 | 6 | 4 | 3 | 1 | 5 | 0 | 2 |
19,225 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.MergeError | class MergeError(ContextError):
def __init__(self, key, new, into):
self.key = key
to_node = into[key]
if not isinstance(to_node, Node) or not isinstance(new, Node):
super().__init__(f"cannot merge '{key}' as it already exists in {into}")
return
assert isinst... | class MergeError(ContextError):
def __init__(self, key, new, into):
pass | 2 | 0 | 16 | 1 | 15 | 0 | 2 | 0 | 1 | 2 | 1 | 0 | 1 | 1 | 1 | 1 | 17 | 1 | 16 | 7 | 14 | 0 | 13 | 7 | 11 | 2 | 2 | 1 | 2 |
19,226 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.Meta | from dataclasses import dataclass, field, replace
from typing import Any, Optional, Union
@dataclass
class Meta:
source: Optional[str] = None
dpaths: list[str] = field(default_factory=list)
local: bool = True
@staticmethod
def update_path(meta: 'Meta', path: Union[str, int]):
dpaths = [*me... | @dataclass
class Meta:
@staticmethod
def update_path(meta: 'Meta', path: Union[str, int]):
pass
def __str__(self):
pass
def path(self):
pass | 6 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 2 | 0 | 3 | 3 | 17 | 3 | 14 | 10 | 9 | 0 | 13 | 9 | 9 | 1 | 0 | 0 | 3 |
19,227 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.Node | from abc import ABC, abstractmethod
class Node:
meta: Meta
def get_sources(self):
raise NotImplementedError
@property
@abstractmethod
def value(self):
pass |
class Node:
def get_sources(self):
pass
@property
@abstractmethod
def value(self):
pass | 5 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 1 | 0 | 2 | 2 | 0 | 2 | 2 | 10 | 2 | 8 | 4 | 3 | 0 | 6 | 3 | 3 | 1 | 0 | 0 | 2 |
19,228 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.ParamsLoadError | class ParamsLoadError(ContextError):
pass | class ParamsLoadError(ContextError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
19,229 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.ReservedKeyError | class ReservedKeyError(ContextError):
def __init__(self, keys, path=None):
from dvc.utils.humanize import join
self.keys = keys
self.path = path
n = 'key' + ('s' if len(keys) > 1 else '')
msg = f'attempted to modify reserved {n} {join(keys)}'
if path:
msg... | class ReservedKeyError(ContextError):
def __init__(self, keys, path=None):
pass | 2 | 0 | 11 | 2 | 9 | 0 | 3 | 0 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 1 | 12 | 2 | 10 | 7 | 7 | 0 | 10 | 7 | 7 | 3 | 2 | 1 | 3 |
19,230 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.Value | from dataclasses import dataclass, field, replace
from typing import Any, Optional, Union
@dataclass
class Value(Node):
_value: Any
meta: Meta = field(compare=False, default_factory=_default_meta, repr=False)
def __repr__(self):
return repr(self._value)
def __str__(self) -> str:
retur... | @dataclass
class Value(Node):
def __repr__(self):
pass
def __str__(self) -> str:
pass
def get_sources(self):
pass
@property
def value(self):
pass | 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 4 | 0 | 4 | 6 | 16 | 4 | 12 | 7 | 6 | 0 | 11 | 6 | 6 | 1 | 1 | 0 | 4 |
19,231 | iterative/dvc | dvc/parsing/context.py | dvc.parsing.context.VarsAlreadyLoaded | class VarsAlreadyLoaded(ContextError):
pass | class VarsAlreadyLoaded(ContextError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
19,232 | iterative/dvc | dvc/parsing/interpolate.py | dvc.parsing.interpolate.ParseError | from dvc.exceptions import DvcException
class ParseError(DvcException):
pass |
class ParseError(DvcException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
19,233 | iterative/dvc | dvc/progress.py | dvc.progress.Tqdm | import logging
from typing import TYPE_CHECKING, Any, ClassVar
import sys
from dvc.utils import env2bool
from tqdm import tqdm
from dvc.env import DVC_IGNORE_ISATTY
class Tqdm(tqdm):
"""
maximum-compatibility tqdm-based progressbars
"""
BAR_FMT_DEFAULT = '{percentage:3.0f}% {desc}|{bar}|{postfix[info]}... |
class Tqdm(tqdm):
'''
maximum-compatibility tqdm-based progressbars
'''
def __init__(self, iterable=None, disable=None, level=logging.ERROR, desc=None, leave=False, bar_format=None, bytes=False, file=None, total=None, postfix=None, **kwargs):
'''
bytes : shortcut for
`uni... | 11 | 5 | 14 | 0 | 11 | 3 | 2 | 0.28 | 1 | 4 | 1 | 0 | 8 | 3 | 8 | 53 | 151 | 12 | 110 | 36 | 85 | 31 | 58 | 22 | 47 | 9 | 3 | 2 | 20 |
19,234 | iterative/dvc | dvc/render/converter/__init__.py | dvc.render.converter.Converter | from typing import Any, Optional
class Converter:
def __init__(self, plot_id: str, data: Optional[dict[str, Any]]=None, properties: Optional[dict]=None):
self.plot_id = plot_id
self.properties = properties or {}
self.data = data or {}
def convert(self) -> tuple[list[tuple[str, str, An... |
class Converter:
def __init__(self, plot_id: str, data: Optional[dict[str, Any]]=None, properties: Optional[dict]=None):
pass
def convert(self) -> tuple[list[tuple[str, str, Any]], dict]:
pass
def flat_datapoints(self, revision: str) -> tuple[list[dict], dict]:
pass | 4 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 6 | 0 | 2 | 3 | 3 | 3 | 3 | 16 | 2 | 14 | 12 | 5 | 0 | 9 | 7 | 5 | 1 | 0 | 0 | 3 |
19,235 | iterative/dvc | dvc/render/converter/image.py | dvc.render.converter.image.ImageConverter | from typing import TYPE_CHECKING, Any
from . import Converter
import base64
from dvc.render import FILENAME, REVISION, SRC
import os
class ImageConverter(Converter):
@staticmethod
def _write_image(path: 'StrPath', revision: str, filename: str, image_data: bytes) -> 'StrPath':
img_path = os.path.join(p... |
class ImageConverter(Converter):
@staticmethod
def _write_image(path: 'StrPath', revision: str, filename: str, image_data: bytes) -> 'StrPath':
pass
@staticmethod
def _encode_image(image_data: bytes) -> str:
pass
def convert(self) -> tuple[list[tuple[str, str, Any]], dict]:
... | 7 | 1 | 11 | 0 | 9 | 1 | 2 | 0.1 | 1 | 6 | 0 | 0 | 2 | 0 | 4 | 7 | 48 | 4 | 40 | 23 | 28 | 4 | 27 | 15 | 22 | 4 | 1 | 3 | 8 |
19,236 | iterative/dvc | dvc/render/converter/vega.py | dvc.render.converter.vega.FieldNotFoundError | from dvc.exceptions import DvcException
class FieldNotFoundError(DvcException):
def __init__(self, expected_field, found_fields):
found_str = ', '.join(found_fields)
super().__init__(f"Could not find provided field ('{expected_field}') in data fields ('{found_str}').") |
class FieldNotFoundError(DvcException):
def __init__(self, expected_field, found_fields):
pass | 2 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 7 | 0 | 7 | 3 | 5 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
19,237 | iterative/dvc | dvc/render/converter/vega.py | dvc.render.converter.vega.VegaConverter | from typing import Any, Optional, Union
import os
from funcy import first, last
from . import Converter
from dvc.exceptions import DvcException
from dvc.render import FIELD, FILENAME, INDEX, REVISION
class VegaConverter(Converter):
"""
Class that takes care of converting unspecified data blob
(Dict or List... |
class VegaConverter(Converter):
'''
Class that takes care of converting unspecified data blob
(Dict or List[Dict]) into datapoints (List[Dict]).
If some properties that are required by Template class are missing
('x', 'y') it will attempt to fill in the blanks.
'''
def __init__(self, plot_... | 11 | 2 | 24 | 4 | 19 | 2 | 5 | 0.14 | 1 | 9 | 1 | 0 | 6 | 1 | 8 | 11 | 211 | 37 | 154 | 51 | 138 | 22 | 113 | 44 | 104 | 14 | 1 | 4 | 39 |
19,238 | iterative/dvc | dvc/render/match.py | dvc.render.match.PlotsData | from collections import defaultdict
from dvc.utils.plots import group_definitions_by_id
from dvc.repo.plots import _normpath, infer_data_sources
import os
class PlotsData:
def __init__(self, data: dict):
self.data = data
def group_definitions(self):
groups = defaultdict(list)
for rev,... |
class PlotsData:
def __init__(self, data: dict):
pass
def group_definitions(self):
pass
def get_definition_data(self, target_files, rev):
pass | 4 | 0 | 9 | 0 | 9 | 0 | 3 | 0 | 0 | 2 | 0 | 0 | 3 | 1 | 3 | 3 | 29 | 2 | 27 | 13 | 23 | 0 | 20 | 13 | 16 | 4 | 0 | 2 | 8 |
19,239 | iterative/dvc | dvc/render/match.py | dvc.render.match.RendererWithErrors | from typing import TYPE_CHECKING, NamedTuple, Optional
class RendererWithErrors(NamedTuple):
renderer: 'Renderer'
source_errors: dict[str, dict[str, Exception]]
definition_errors: dict[str, Exception] |
class RendererWithErrors(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
19,240 | iterative/dvc | dvc/repo/__init__.py | dvc.repo.Repo | from dvc.log import logger
from typing import TYPE_CHECKING, Callable, Optional, Union
import os
from dvc.exceptions import DvcException, NotDvcRepoError, OutputNotFoundError, RevCollectionError
from dvc.utils.objects import cached_property
from collections import defaultdict
from dvc.ignore import DvcIgnoreFilter
from... |
class Repo:
def _get_repo_dirs(self, root_dir: Optional[str]=None, fs: Optional['FileSystem']=None, uninitialized: bool=False, scm: Optional[Union['Git', 'NoSCM']]=None) -> tuple[str, Optional[str]]:
pass
def __init__(self, root_dir: Optional[str]=None, fs: Optional['FileSystem']=None, rev: Optional[... | 60 | 1 | 13 | 2 | 11 | 1 | 2 | 0.13 | 0 | 32 | 19 | 0 | 34 | 25 | 38 | 38 | 611 | 115 | 467 | 241 | 299 | 59 | 359 | 173 | 253 | 7 | 0 | 4 | 93 |
19,241 | iterative/dvc | dvc/repo/add.py | dvc.repo.add.StageInfo | from typing import TYPE_CHECKING, NamedTuple, Optional, Union
class StageInfo(NamedTuple):
stage: 'Stage'
output_exists: bool |
class StageInfo(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
19,242 | iterative/dvc | dvc/repo/artifacts.py | dvc.repo.artifacts.Artifacts | from dvc.utils.serialize import modify_yaml
from pathlib import Path
from typing import TYPE_CHECKING, Any, Optional, Union
from dvc.utils import as_posix, relpath, resolve_output
from dvc.annotations import Artifact
from dvc.dvcfile import PROJECT_FILE
import posixpath
from dvc.exceptions import ArtifactNotFoundError,... |
class Artifacts:
def __init__(self, repo: 'Repo') -> None:
pass
@cached_property
def scm(self) -> Optional['Git']:
pass
def read(self) -> dict[str, dict[str, Artifact]]:
'''Read artifacts from dvc.yaml.'''
pass
def add(self, name: str, artifact: Artifact, dvcfile:... | 15 | 5 | 28 | 2 | 24 | 2 | 4 | 0.08 | 0 | 18 | 8 | 0 | 7 | 1 | 10 | 10 | 298 | 31 | 249 | 100 | 190 | 21 | 154 | 57 | 131 | 10 | 0 | 3 | 37 |
19,243 | iterative/dvc | dvc/repo/data.py | dvc.repo.data.GitInfo | from typing import TYPE_CHECKING, Optional, TypedDict, Union
class GitInfo(TypedDict, total=False):
staged: dict[str, list[str]]
unstaged: dict[str, list[str]]
untracked: list[str]
is_empty: bool
is_dirty: bool |
class GitInfo(TypedDict, total=False):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 1 | 5 | 0 | 6 | 1 | 5 | 0 | 1 | 0 | 0 |
19,244 | iterative/dvc | dvc/repo/data.py | dvc.repo.data.Status | from typing import TYPE_CHECKING, Optional, TypedDict, Union
class Status(TypedDict):
not_in_cache: list[str]
not_in_remote: list[str]
committed: DiffResult
uncommitted: DiffResult
untracked: list[str]
unchanged: list[str]
git: GitInfo |
class Status(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0 | 8 | 1 | 7 | 0 | 8 | 1 | 7 | 0 | 1 | 0 | 0 |
19,245 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.DVCDataset | from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
from typing import TYPE_CHECKING, Any, ClassVar, Literal, Optional, Union, cast
@frozen(kw_only=True)
class DVCDataset:
manifest_path: str
spec: DVCDatasetSpec
lock: Optional[DVCDatasetLock] = None
_invalidated: bool = fi... | @frozen(kw_only=True)
class DVCDataset:
def update(self, repo, rev: Optional[str]=None, **kwargs) -> 'Self':
pass | 3 | 0 | 20 | 3 | 17 | 1 | 2 | 0.04 | 0 | 4 | 2 | 0 | 1 | 0 | 1 | 1 | 28 | 5 | 23 | 13 | 20 | 1 | 20 | 13 | 17 | 2 | 0 | 1 | 2 |
19,246 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.DVCDatasetLock | from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
@frozen(kw_only=True)
class DVCDatasetLock(DVCDatasetSpec):
rev_lock: str | @frozen(kw_only=True)
class DVCDatasetLock(DVCDatasetSpec):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
19,247 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.DVCDatasetSpec | from typing import TYPE_CHECKING, Any, ClassVar, Literal, Optional, Union, cast
from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
@frozen(kw_only=True)
class DVCDatasetSpec(DatasetSpec):
type: Literal['dvc']
path: str = field(default='', converter=default_str)
rev: Optional[... | @frozen(kw_only=True)
class DVCDatasetSpec(DatasetSpec):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 2 | 4 | 0 | 4 | 3 | 3 | 0 | 4 | 3 | 3 | 0 | 2 | 0 | 0 |
19,248 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.DatachainDataset | from urllib.parse import urlparse
from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
from typing import TYPE_CHECKING, Any, ClassVar, Literal, Optional, Union, cast
@frozen(kw_only=True)
class DatachainDataset:
manifest_path: str
spec: 'DatasetSpec'
lock: 'Optional[DatachainD... | @frozen(kw_only=True)
class DatachainDataset:
@property
def pinned(self) -> bool:
pass
@property
def name_version(self) -> tuple[str, Optional[int]]:
pass
def update(self, repo, record: Optional['DatasetRecord']=None, version: Optional[int]=None, **kwargs) -> 'Self':
pass | 7 | 0 | 9 | 0 | 9 | 0 | 2 | 0.03 | 0 | 5 | 1 | 0 | 3 | 0 | 3 | 3 | 39 | 5 | 34 | 23 | 22 | 1 | 22 | 15 | 18 | 2 | 0 | 0 | 5 |
19,249 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.DatachainDatasetLock | from datetime import datetime
from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
@frozen(kw_only=True)
class DatachainDatasetLock(DatasetSpec):
version: int
created_at: datetime = field(converter=to_datetime) | @frozen(kw_only=True)
class DatachainDatasetLock(DatasetSpec):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 3 | 0 | 3 | 2 | 2 | 0 | 3 | 2 | 2 | 0 | 2 | 0 | 0 |
19,250 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.DatasetNotFoundError | from dvc.exceptions import DvcException
class DatasetNotFoundError(DvcException, KeyError):
def __init__(self, name, *args):
self.name = name
super().__init__('dataset not found', *args)
def __str__(self) -> str:
return self.msg |
class DatasetNotFoundError(DvcException, KeyError):
def __init__(self, name, *args):
pass
def __str__(self) -> str:
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 2 | 2 | 0 | 0 | 2 | 1 | 2 | 16 | 7 | 1 | 6 | 4 | 3 | 0 | 6 | 4 | 3 | 1 | 5 | 0 | 2 |
19,251 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.DatasetSpec | from typing import TYPE_CHECKING, Any, ClassVar, Literal, Optional, Union, cast
from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
@frozen(kw_only=True)
class DatasetSpec(SerDe):
name: str
url: str
type: Literal['dvc', 'dc', 'url'] | @frozen(kw_only=True)
class DatasetSpec(SerDe):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 | 0 | 0 | 0 | 2 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
19,252 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.Datasets | from pathlib import Path
from dvc.log import logger
from functools import cached_property
from dvc.types import StrPath
from collections.abc import Iterator, Mapping
from typing import TYPE_CHECKING, Any, ClassVar, Literal, Optional, Union, cast
import os
from dvc.dvcfile import Lockfile, ProjectFile
class Datasets(Ma... |
class Datasets(Mapping[str, Dataset]):
def __init__(self, repo: 'Repo') -> None:
pass
def __repr__(self):
pass
def __rich_repr__(self):
pass
def __getitem__(self, name: str) -> Dataset:
pass
def __setitem__(self, name: str, dataset: Dataset) -> None:
pas... | 28 | 0 | 8 | 0 | 7 | 0 | 2 | 0.05 | 1 | 23 | 12 | 0 | 17 | 1 | 20 | 54 | 183 | 26 | 154 | 59 | 114 | 7 | 105 | 38 | 83 | 5 | 6 | 2 | 36 |
19,253 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.FileInfo | from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
from dvc_data.hashfile.meta import Meta
@frozen(kw_only=True, order=True)
class FileInfo(SerDe):
relpath: str
meta: Meta = field(order=False, converter=ensure(Meta)) | @frozen(kw_only=True, order=True)
class FileInfo(SerDe):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 3 | 0 | 3 | 2 | 2 | 1 | 3 | 2 | 2 | 0 | 1 | 0 | 0 |
19,254 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.SerDe | from typing import TYPE_CHECKING, Any, ClassVar, Literal, Optional, Union, cast
from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
from datetime import datetime
class SerDe:
def to_dict(self: AttrsInstance) -> dict[str, Any]:
def filter_defaults(attr: Attribute, v: Any):
... |
class SerDe:
def to_dict(self: AttrsInstance) -> dict[str, Any]:
pass
def filter_defaults(attr: Attribute, v: Any):
pass
def value_serializer(_inst, _field, v):
pass
@classmethod
def from_dict(cls, d: dict[str, Any]) -> 'Self':
pass | 6 | 0 | 5 | 1 | 5 | 0 | 2 | 0 | 0 | 6 | 0 | 2 | 1 | 0 | 2 | 2 | 17 | 3 | 14 | 8 | 8 | 0 | 13 | 7 | 8 | 2 | 0 | 1 | 6 |
19,255 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.URLDataset | from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
from dvc_data.hashfile.meta import Meta
from typing import TYPE_CHECKING, Any, ClassVar, Literal, Optional, Union, cast
@frozen(kw_only=True)
class URLDataset:
manifest_path: str
spec: 'DatasetSpec'
lock: 'Optional[URLDataset... | @frozen(kw_only=True)
class URLDataset:
def update(self, repo, **kwargs):
pass | 3 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 0 | 3 | 3 | 0 | 1 | 0 | 1 | 1 | 22 | 3 | 19 | 10 | 16 | 0 | 14 | 10 | 11 | 1 | 0 | 0 | 1 |
19,256 | iterative/dvc | dvc/repo/datasets.py | dvc.repo.datasets.URLDatasetLock | from attrs import Attribute, AttrsInstance, asdict, evolve, field, fields, frozen
from dvc_data.hashfile.meta import Meta
@frozen(kw_only=True)
class URLDatasetLock(DatasetSpec):
meta: Meta = field(converter=ensure(Meta))
files: list[FileInfo] = field(factory=list, converter=lambda f: sorted(map(ensure(FileInf... | @frozen(kw_only=True)
class URLDatasetLock(DatasetSpec):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0.14 | 1 | 2 | 1 | 0 | 0 | 0 | 0 | 2 | 7 | 0 | 7 | 3 | 6 | 1 | 3 | 3 | 2 | 0 | 2 | 0 | 0 |
19,257 | iterative/dvc | dvc/repo/experiments/__init__.py | dvc.repo.experiments.Experiments | from .cache import ExpCache
from collections.abc import Iterable
from .exceptions import BaselineMismatchError, ExperimentExistsError, InvalidExpRefError, MultipleBranchError
from .refs import APPLY_STASH, CELERY_FAILED_STASH, CELERY_STASH, EXEC_APPLY, EXEC_NAMESPACE, EXPS_NAMESPACE, WORKSPACE_STASH, ExpRefInfo
from .s... |
class Experiments:
'''Class that manages experiments in a DVC repo.
Args:
repo (dvc.repo.Repo): repo instance that these experiments belong to.
'''
def __init__(self, repo):
pass
@property
def scm(self):
pass
@cached_property
def dvc_dir(self) -> str:
pa... | 45 | 8 | 9 | 1 | 7 | 1 | 2 | 0.11 | 0 | 21 | 14 | 0 | 34 | 1 | 34 | 34 | 347 | 71 | 248 | 120 | 168 | 28 | 203 | 94 | 149 | 10 | 0 | 4 | 73 |
19,258 | iterative/dvc | dvc/repo/experiments/cache.py | dvc.repo.experiments.cache.ExpCache | from dvc_objects.db import ObjectDB
import os
from .serialize import DeserializeError, SerializableError, SerializableExp
from typing import TYPE_CHECKING, Optional, Union
from dvc.log import logger
from .utils import EXEC_TMP_DIR
from dvc.fs import localfs
class ExpCache:
"""Serialized experiment state cache.
... |
class ExpCache:
'''Serialized experiment state cache.
ODB with git SHAs as keys. Objects can be either SerializableExp or
SerializableError.
'''
def __init__(self, repo: 'Repo'):
pass
def delete(self, rev: str):
pass
def put(self, exp: Union[SerializableExp, SerializableE... | 5 | 1 | 10 | 0 | 10 | 0 | 2 | 0.13 | 0 | 6 | 3 | 0 | 4 | 1 | 4 | 4 | 50 | 6 | 40 | 18 | 30 | 5 | 35 | 12 | 30 | 4 | 0 | 2 | 9 |
19,259 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.AmbiguousExpRefInfo | from collections.abc import Collection, Iterable
from dvc.exceptions import DvcException, InvalidArgumentError
class AmbiguousExpRefInfo(InvalidArgumentError):
def __init__(self, exp_name: str, exp_ref_list: Iterable['ExpRefInfo']):
msg = [f"Ambiguous name '{exp_name}' refers to multiple experiments. Use ... |
class AmbiguousExpRefInfo(InvalidArgumentError):
def __init__(self, exp_name: str, exp_ref_list: Iterable['ExpRefInfo']):
pass | 2 | 0 | 10 | 0 | 10 | 0 | 1 | 0 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 1 | 11 | 0 | 11 | 3 | 9 | 0 | 5 | 3 | 3 | 1 | 1 | 0 | 1 |
19,260 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.BaselineMismatchError | from dvc.exceptions import DvcException, InvalidArgumentError
class BaselineMismatchError(DvcException):
def __init__(self, rev, expected):
if hasattr(rev, 'hexsha'):
rev = rev.hexsha
rev_str = f'{rev[:7]}' if rev is not None else 'invalid commit'
super().__init__(f"Experiment ... |
class BaselineMismatchError(DvcException):
def __init__(self, rev, expected):
pass | 2 | 0 | 9 | 0 | 9 | 0 | 3 | 0 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 1 | 10 | 0 | 10 | 5 | 8 | 0 | 8 | 5 | 6 | 3 | 1 | 1 | 3 |
19,261 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.ExpNotStartedError | from dvc.exceptions import DvcException, InvalidArgumentError
class ExpNotStartedError(DvcException):
def __init__(self, name: str):
super().__init__(f"Queued experiment '{name}' exists but has not started running yet") |
class ExpNotStartedError(DvcException):
def __init__(self, name: str):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 0 | 5 | 2 | 3 | 0 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
19,262 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.ExpQueueEmptyError | from dvc.exceptions import DvcException, InvalidArgumentError
class ExpQueueEmptyError(DvcException):
pass |
class ExpQueueEmptyError(DvcException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
19,263 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.ExperimentExistsError | from dvc.exceptions import DvcException, InvalidArgumentError
class ExperimentExistsError(DvcException):
def __init__(self, name: str, command: str='run'):
msg = f"Experiment conflicts with existing experiment '{name}'. To overwrite the existing experiment run:\n\n\tdvc exp {command} -f ...\n\n"
s... |
class ExperimentExistsError(DvcException):
def __init__(self, name: str, command: str='run'):
pass | 2 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 1 | 9 | 0 | 9 | 4 | 7 | 0 | 5 | 4 | 3 | 1 | 1 | 0 | 1 |
19,264 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.InvalidExpRefError | from dvc.exceptions import DvcException, InvalidArgumentError
class InvalidExpRefError(DvcException):
def __init__(self, ref):
super().__init__(f"'{ref}' is not a valid experiment refname.")
self.ref = ref |
class InvalidExpRefError(DvcException):
def __init__(self, ref):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
19,265 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.InvalidExpRevError | from dvc.exceptions import DvcException, InvalidArgumentError
class InvalidExpRevError(InvalidArgumentError):
def __init__(self, rev):
super().__init__(f"'{rev}' does not appear to be an experiment commit.") |
class InvalidExpRevError(InvalidArgumentError):
def __init__(self, rev):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
19,266 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.MultipleBranchError | from dvc.exceptions import DvcException, InvalidArgumentError
class MultipleBranchError(DvcException):
def __init__(self, rev, ref_infos):
super().__init__(f"Ambiguous commit '{rev[:7]}' belongs to multiple experiment branches.")
self.rev = rev
self.ref_infos = ref_infos |
class MultipleBranchError(DvcException):
def __init__(self, rev, ref_infos):
pass | 2 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 1 | 7 | 0 | 7 | 4 | 5 | 0 | 5 | 4 | 3 | 1 | 1 | 0 | 1 |
19,267 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.UnresolvedExpNamesError | from typing import TYPE_CHECKING, Optional
from collections.abc import Collection, Iterable
from dvc.exceptions import DvcException, InvalidArgumentError
class UnresolvedExpNamesError(InvalidArgumentError):
NAME = 'experiment name'
def __init__(self, unresolved_list: Collection[str], *args, git_remote: Option... |
class UnresolvedExpNamesError(InvalidArgumentError):
def __init__(self, unresolved_list: Collection[str], *args, git_remote: Optional[str]=None):
pass | 2 | 0 | 16 | 0 | 16 | 0 | 3 | 0 | 1 | 3 | 0 | 2 | 1 | 0 | 1 | 1 | 19 | 1 | 18 | 9 | 11 | 0 | 9 | 4 | 7 | 3 | 1 | 2 | 3 |
19,268 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.UnresolvedQueueExpNamesError | class UnresolvedQueueExpNamesError(UnresolvedExpNamesError):
NAME = 'queued experiment name' | class UnresolvedQueueExpNamesError(UnresolvedExpNamesError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 2 | 0 | 0 |
19,269 | iterative/dvc | dvc/repo/experiments/exceptions.py | dvc.repo.experiments.exceptions.UnresolvedRunningExpNamesError | class UnresolvedRunningExpNamesError(UnresolvedExpNamesError):
NAME = 'running experiment name' | class UnresolvedRunningExpNamesError(UnresolvedExpNamesError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 2 | 0 | 0 |
19,270 | iterative/dvc | dvc/repo/experiments/executor/base.py | dvc.repo.experiments.executor.base.BaseExecutor | from collections.abc import Iterable, Iterator
from dvc.exceptions import DvcException
from dvc.repo.metrics.show import _collect_top_level_metrics
from dvc.env import DVC_EXP_AUTO_PUSH, DVC_EXP_GIT_REMOTE
from dvc.utils import dict_sha256, env2bool, relpath
import pickle
import os
from abc import ABC, abstractmethod
f... |
class BaseExecutor(ABC):
'''Base class for executing experiments in parallel.
Parameters:
root_dir: Path to SCM root.
dvc_dir: Path to .dvc dir relative to SCM root.
baseline_rev: Experiment baseline revision.
wdir: Path to exec working directory relative to SCM root.
na... | 61 | 7 | 22 | 2 | 19 | 1 | 3 | 0.09 | 1 | 20 | 8 | 1 | 9 | 8 | 29 | 49 | 713 | 75 | 591 | 229 | 431 | 54 | 310 | 110 | 265 | 10 | 4 | 3 | 92 |
19,271 | iterative/dvc | dvc/repo/experiments/executor/base.py | dvc.repo.experiments.executor.base.ExecutorInfo | from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Optional, Union
from dataclasses import asdict, dataclass
import os
from dvc.repo.experiments.refs import EXEC_BASELINE, EXEC_BRANCH, ExpRefInfo
@dataclass
class ExecutorInfo:
git_url: str
baseline_rev: str
location: str
root_dir: str
dvc... | @dataclass
class ExecutorInfo:
@classmethod
def from_dict(cls, d):
pass
def asdict(self):
pass
@property
def result(self) -> Optional['ExecutorResult']:
pass
def dump_json(self, filename: str):
pass
@classmethod
def load_json(cls, filename: str) -> 'Exe... | 10 | 0 | 5 | 0 | 4 | 0 | 2 | 0 | 0 | 4 | 3 | 0 | 3 | 0 | 5 | 5 | 44 | 7 | 37 | 18 | 26 | 0 | 30 | 14 | 22 | 3 | 0 | 1 | 8 |
19,272 | iterative/dvc | dvc/repo/experiments/executor/base.py | dvc.repo.experiments.executor.base.ExecutorResult | from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Optional, Union
class ExecutorResult(NamedTuple):
exp_hash: Optional[str]
ref_info: Optional['ExpRefInfo']
force: bool |
class ExecutorResult(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
19,273 | iterative/dvc | dvc/repo/experiments/executor/base.py | dvc.repo.experiments.executor.base.TaskStatus | from enum import IntEnum
class TaskStatus(IntEnum):
PENDING = 0
PREPARING = 1
RUNNING = 2
SUCCESS = 3
FAILED = 4
CANCELED = 5
FINISHED = 6 |
class TaskStatus(IntEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 8 | 0 | 8 | 8 | 7 | 0 | 8 | 8 | 7 | 0 | 3 | 0 | 0 |
19,274 | iterative/dvc | dvc/repo/experiments/executor/local.py | dvc.repo.experiments.executor.local.BaseLocalExecutor | from dvc.utils.objects import cached_property
from .base import BaseExecutor, TaskStatus
from typing import TYPE_CHECKING, Optional, Union
import os
from dvc.scm import SCM, Git
class BaseLocalExecutor(BaseExecutor):
"""Base local machine executor."""
@property
def git_url(self) -> str:
root_dir =... |
class BaseLocalExecutor(BaseExecutor):
'''Base local machine executor.'''
@property
def git_url(self) -> str:
pass
@cached_property
def scm(self) -> Union['Git', 'NoSCM']:
pass
def cleanup(self, infofile: Optional[str]=None):
pass
def collect_cache(self, repo: 'Rep... | 7 | 2 | 4 | 0 | 4 | 0 | 1 | 0.12 | 1 | 3 | 0 | 2 | 4 | 0 | 4 | 53 | 23 | 4 | 17 | 10 | 8 | 2 | 13 | 6 | 8 | 2 | 5 | 1 | 5 |
19,275 | iterative/dvc | dvc/repo/experiments/executor/local.py | dvc.repo.experiments.executor.local.TempDirExecutor | from dvc.utils.fs import remove
from dvc.lock import LockError
from dvc.log import logger
from tempfile import mkdtemp
from dvc.repo.experiments.refs import EXEC_BASELINE, EXEC_BRANCH, EXEC_HEAD, EXEC_MERGE, EXEC_NAMESPACE, TEMP_NAMESPACE
import os
from dvc.repo.experiments.utils import EXEC_TMP_DIR, get_exp_rwlock
fro... |
class TempDirExecutor(BaseLocalExecutor):
'''Temp directory experiment executor.'''
@retry(180, errors=LockError, timeout=1)
def init_git(self, repo: 'Repo', scm: 'Git', stash_rev: str, entry: 'ExpStashEntry', infofile: Optional[str], branch: Optional[str]=None):
pass
def _update_config(self, ... | 9 | 2 | 20 | 1 | 17 | 2 | 3 | 0.14 | 1 | 5 | 1 | 0 | 5 | 1 | 6 | 59 | 133 | 15 | 105 | 50 | 75 | 15 | 70 | 27 | 61 | 5 | 6 | 3 | 15 |
19,276 | iterative/dvc | dvc/repo/experiments/executor/local.py | dvc.repo.experiments.executor.local.WorkspaceExecutor | from contextlib import ExitStack
from dvc.utils.fs import remove
from dvc.log import logger
from dvc.repo.experiments.utils import EXEC_TMP_DIR, get_exp_rwlock
from dvc.repo.experiments.refs import EXEC_BASELINE, EXEC_BRANCH, EXEC_HEAD, EXEC_MERGE, EXEC_NAMESPACE, TEMP_NAMESPACE
from funcy import retry
from dvc.scm imp... |
class WorkspaceExecutor(BaseLocalExecutor):
def __init__(self, *args, **kwargs):
pass
@classmethod
def from_stash_entry(cls, repo: 'Repo', entry: 'ExpStashEntry', **kwargs):
pass
@retry(180, errors=LockError, timeout=1)
def init_git(self, repo: 'Repo', scm: 'Git', stash_rev: str, e... | 8 | 0 | 11 | 0 | 10 | 0 | 2 | 0 | 1 | 5 | 1 | 0 | 4 | 2 | 5 | 58 | 60 | 6 | 54 | 21 | 38 | 0 | 35 | 11 | 29 | 4 | 6 | 2 | 10 |
19,277 | iterative/dvc | dvc/repo/experiments/push.py | dvc.repo.experiments.push.UploadError | from dvc.exceptions import DvcException
class UploadError(DvcException):
def __init__(self, msg, result):
self.result = result
super().__init__(msg) |
class UploadError(DvcException):
def __init__(self, msg, result):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 12 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
19,278 | iterative/dvc | dvc/repo/experiments/queue/base.py | dvc.repo.experiments.queue.base.BaseStashQueue | from dvc.env import DVC_EXP_BASELINE_REV, DVC_EXP_NAME, DVC_ROOT
from dvc.log import logger
from dvc.repo.experiments.exceptions import ExperimentExistsError
from dvc.repo.experiments.executor.local import WorkspaceExecutor
from dvc.repo.experiments.utils import EXEC_PID_DIR, EXEC_TMP_DIR, get_exp_rwlock, get_random_ex... |
class BaseStashQueue(ABC):
'''Naive Git-stash based experiment queue.
Maps queued experiments to (Git) stash reflog entries.
'''
def __init__(self, repo: 'Repo', ref: str, failed_ref: Optional[str]=None):
'''Construct a queue.
Arguments:
scm: Git SCM instance for this queue... | 70 | 25 | 14 | 1 | 10 | 3 | 2 | 0.28 | 1 | 28 | 15 | 2 | 32 | 3 | 38 | 58 | 635 | 90 | 427 | 201 | 288 | 121 | 232 | 109 | 181 | 10 | 4 | 4 | 80 |
19,279 | iterative/dvc | dvc/repo/experiments/queue/base.py | dvc.repo.experiments.queue.base.ExpRefAndQueueEntry | from typing import TYPE_CHECKING, Any, NamedTuple, Optional, Union
class ExpRefAndQueueEntry(NamedTuple):
exp_ref_info: Optional['ExpRefInfo']
queue_entry: Optional['QueueEntry'] |
class ExpRefAndQueueEntry(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
19,280 | iterative/dvc | dvc/repo/experiments/queue/base.py | dvc.repo.experiments.queue.base.QueueDoneResult | from typing import TYPE_CHECKING, Any, NamedTuple, Optional, Union
class QueueDoneResult(NamedTuple):
entry: QueueEntry
result: Optional['ExecutorResult'] |
class QueueDoneResult(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
19,281 | iterative/dvc | dvc/repo/experiments/queue/base.py | dvc.repo.experiments.queue.base.QueueEntry | from dataclasses import asdict, dataclass
from typing import TYPE_CHECKING, Any, NamedTuple, Optional, Union
@dataclass(frozen=True)
class QueueEntry:
dvc_root: str
scm_root: str
stash_ref: str
stash_rev: str
baseline_rev: str
branch: Optional[str]
name: Optional[str]
head_rev: Optional... | @dataclass(frozen=True)
class QueueEntry:
def __eq__(self, other: object):
pass
def asdict(self) -> dict[str, Any]:
pass
@classmethod
def from_dict(cls, d: dict[str, Any]) -> 'QueueEntry':
pass | 6 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 4 | 0 | 0 | 2 | 0 | 3 | 3 | 25 | 3 | 22 | 6 | 17 | 0 | 15 | 5 | 11 | 1 | 0 | 0 | 3 |
19,282 | iterative/dvc | dvc/repo/experiments/queue/base.py | dvc.repo.experiments.queue.base.QueueGetResult | from dvc.repo.experiments.executor.base import BaseExecutor
from typing import TYPE_CHECKING, Any, NamedTuple, Optional, Union
class QueueGetResult(NamedTuple):
entry: QueueEntry
executor: BaseExecutor |
class QueueGetResult(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
19,283 | iterative/dvc | dvc/repo/experiments/queue/celery.py | dvc.repo.experiments.queue.celery.LocalCeleryQueue | from dvc.repo.experiments.refs import CELERY_STASH
from dvc.exceptions import DvcException
from collections import defaultdict
from dvc.repo.experiments.exceptions import UnresolvedQueueExpNamesError, UnresolvedRunningExpNamesError
import logging
from dvc.log import logger
import locale
from celery.result import AsyncR... |
class LocalCeleryQueue(BaseStashQueue):
'''DVC experiment queue.
Maps queued experiments to (Git) stash reflog entries.
'''
@cached_property
def wdir(self) -> str:
pass
@cached_property
def celery(self) -> 'FSApp':
pass
@cached_property
def proc(self) -> 'ProcessMana... | 44 | 9 | 14 | 1 | 12 | 1 | 3 | 0.08 | 1 | 31 | 15 | 0 | 39 | 1 | 39 | 97 | 581 | 73 | 471 | 201 | 361 | 40 | 321 | 145 | 263 | 6 | 5 | 4 | 116 |
19,284 | iterative/dvc | dvc/repo/experiments/queue/celery.py | dvc.repo.experiments.queue.celery._MessageEntry | from .base import BaseStashQueue, ExpRefAndQueueEntry, QueueDoneResult, QueueEntry
from typing import TYPE_CHECKING, NamedTuple, Optional, Union
class _MessageEntry(NamedTuple):
msg: 'Message'
entry: QueueEntry |
class _MessageEntry(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
19,285 | iterative/dvc | dvc/repo/experiments/queue/celery.py | dvc.repo.experiments.queue.celery._TaskEntry | from typing import TYPE_CHECKING, NamedTuple, Optional, Union
from .base import BaseStashQueue, ExpRefAndQueueEntry, QueueDoneResult, QueueEntry
from celery.result import AsyncResult
class _TaskEntry(NamedTuple):
async_result: AsyncResult
entry: QueueEntry |
class _TaskEntry(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
19,286 | iterative/dvc | dvc/repo/experiments/queue/exceptions.py | dvc.repo.experiments.queue.exceptions.CannotKillTasksError | from dvc.exceptions import DvcException
from collections.abc import Collection
class CannotKillTasksError(DvcException):
def __init__(self, revs: Collection[str]):
rev_str = ','.join(revs)
super().__init__(f"Task '{rev_str}' is initializing, please wait a few seconds until the experiments start ru... |
class CannotKillTasksError(DvcException):
def __init__(self, revs: Collection[str]):
pass | 2 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 1 | 7 | 0 | 7 | 3 | 5 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
19,287 | iterative/dvc | dvc/repo/experiments/queue/tempdir.py | dvc.repo.experiments.queue.tempdir.TempDirQueue | from dvc.repo.experiments.exceptions import ExpQueueEmptyError
from dvc.repo.experiments.executor.base import ExecutorInfo, TaskStatus
from .workspace import WorkspaceQueue
from dvc.repo.experiments.executor.local import TempDirExecutor
from collections import defaultdict
from dvc.exceptions import DvcException
from .b... |
class TempDirQueue(WorkspaceQueue):
'''Standalone/tempdir exp queue implementation.'''
@cached_property
def _standalone_tmp_dir(self) -> str:
pass
@cached_property
def pid_dir(self) -> str:
pass
@cached_property
def proc(self) -> 'ProcessManager':
pass
def get(s... | 13 | 1 | 18 | 0 | 17 | 1 | 2 | 0.04 | 1 | 17 | 10 | 0 | 7 | 0 | 8 | 86 | 160 | 11 | 145 | 59 | 108 | 6 | 66 | 34 | 53 | 5 | 6 | 2 | 19 |
19,288 | iterative/dvc | dvc/repo/experiments/queue/workspace.py | dvc.repo.experiments.queue.workspace.WorkspaceQueue | from collections.abc import Collection, Generator
from dvc.exceptions import DvcException
from dvc.repo.experiments.executor.local import WorkspaceExecutor
from .base import BaseStashQueue, QueueEntry, QueueGetResult
import os
from dvc.repo.experiments.executor.base import ExecutorInfo, TaskStatus
from collections impo... |
class WorkspaceQueue(BaseStashQueue):
def put(self, *args, **kwargs) -> QueueEntry:
pass
def get(self) -> QueueGetResult:
pass
def iter_queued(self) -> Generator[QueueEntry, None, None]:
pass
def iter_active(self) -> Generator[QueueEntry, None, None]:
pass
def i... | 23 | 1 | 10 | 0 | 10 | 0 | 2 | 0.03 | 1 | 21 | 9 | 1 | 19 | 1 | 20 | 78 | 224 | 27 | 194 | 82 | 142 | 6 | 123 | 53 | 98 | 5 | 5 | 2 | 36 |
19,289 | iterative/dvc | dvc/repo/experiments/refs.py | dvc.repo.experiments.refs.ExpRefInfo | from .exceptions import InvalidExpRefError
from typing import Optional
class ExpRefInfo:
namespace = EXPS_NAMESPACE
def __init__(self, baseline_sha: str, name: Optional[str]=None):
self.baseline_sha = baseline_sha
self.name: str = name if name else ''
def __str__(self):
return '/'... |
class ExpRefInfo:
def __init__(self, baseline_sha: str, name: Optional[str]=None):
pass
def __str__(self):
pass
def __repr__(self):
pass
@property
def parts(self):
pass
@classmethod
def from_ref(cls, ref: str):
pass
def __eq__(self, other):
... | 10 | 0 | 5 | 0 | 5 | 0 | 2 | 0.03 | 0 | 2 | 0 | 0 | 6 | 2 | 7 | 7 | 47 | 8 | 39 | 18 | 29 | 1 | 29 | 16 | 21 | 4 | 0 | 2 | 14 |
19,290 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize.DeserializeError | from dvc.exceptions import DvcException
class DeserializeError(DvcException):
pass |
class DeserializeError(DvcException):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
19,291 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize.ExpDep | from typing import TYPE_CHECKING, Any, Literal, Optional
from dataclasses import asdict, dataclass, field
@dataclass(frozen=True)
class ExpDep:
hash: Optional[str]
size: Optional[int]
nfiles: Optional[int] | @dataclass(frozen=True)
class ExpDep:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 0 | 0 | 0 |
19,292 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize.ExpExecutor | from typing import TYPE_CHECKING, Any, Literal, Optional
from dataclasses import asdict, dataclass, field
@dataclass
class ExpExecutor:
state: Literal['success', 'queued', 'running', 'failed']
name: Optional[str] = None
local: Optional[LocalExpExecutor] = None | @dataclass
class ExpExecutor:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 3 | 3 | 0 | 4 | 3 | 3 | 0 | 0 | 0 | 0 |
19,293 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize.ExpOut | from typing import TYPE_CHECKING, Any, Literal, Optional
from dataclasses import asdict, dataclass, field
@dataclass(frozen=True)
class ExpOut:
hash: Optional[str]
size: Optional[int]
nfiles: Optional[int]
use_cache: bool
is_data_source: bool | @dataclass(frozen=True)
class ExpOut:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 1 | 5 | 0 | 6 | 1 | 5 | 0 | 0 | 0 | 0 |
19,294 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize.ExpRange | from typing import TYPE_CHECKING, Any, Literal, Optional
from dataclasses import asdict, dataclass, field
from collections.abc import Iterator
@dataclass
class ExpRange:
revs: list['ExpState']
executor: Optional['ExpExecutor'] = None
name: Optional[str] = None
def __len__(self) -> int:
return ... | @dataclass
class ExpRange:
def __len__(self) -> int:
pass
def __iter__(self) -> Iterator['ExpState']:
pass
def __getitem__(self, index: int) -> 'ExpState':
pass
def dumpd(self) -> dict[str, Any]:
pass | 6 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 5 | 0 | 0 | 4 | 0 | 4 | 4 | 16 | 4 | 12 | 7 | 7 | 0 | 12 | 7 | 7 | 1 | 0 | 0 | 4 |
19,295 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize.ExpState | from dataclasses import asdict, dataclass, field
from typing import TYPE_CHECKING, Any, Literal, Optional
@dataclass
class ExpState:
"""Git/DVC experiment state."""
rev: str
name: Optional[str] = None
data: Optional[SerializableExp] = None
error: Optional[SerializableError] = None
experiments: ... | @dataclass
class ExpState:
'''Git/DVC experiment state.'''
def dumpd(self) -> dict[str, Any]:
pass | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.13 | 0 | 3 | 0 | 0 | 1 | 0 | 1 | 1 | 11 | 2 | 8 | 6 | 6 | 1 | 8 | 6 | 6 | 1 | 0 | 0 | 1 |
19,296 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize.LocalExpExecutor | from dataclasses import asdict, dataclass, field
from typing import TYPE_CHECKING, Any, Literal, Optional
@dataclass
class LocalExpExecutor:
root: Optional[str] = None
log: Optional[str] = None
pid: Optional[int] = None
returncode: Optional[int] = None
task_id: Optional[str] = None | @dataclass
class LocalExpExecutor:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 6 | 5 | 0 | 6 | 6 | 5 | 0 | 0 | 0 | 0 |
19,297 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize.SerializableError | from typing import TYPE_CHECKING, Any, Literal, Optional
import json
from dataclasses import asdict, dataclass, field
@dataclass(frozen=True)
class SerializableError:
msg: str
type: str = ''
def dumpd(self) -> dict[str, Any]:
return asdict(self)
def as_bytes(self) -> bytes:
return jso... | @dataclass(frozen=True)
class SerializableError:
def dumpd(self) -> dict[str, Any]:
pass
def as_bytes(self) -> bytes:
pass
@classmethod
def from_bytes(cls, data: bytes):
pass | 6 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 7 | 1 | 0 | 2 | 0 | 3 | 3 | 17 | 3 | 14 | 8 | 9 | 0 | 13 | 6 | 9 | 2 | 0 | 1 | 4 |
19,298 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize.SerializableExp | from dvc.repo.metrics.show import _gather_metrics
from typing import TYPE_CHECKING, Any, Literal, Optional
from dataclasses import asdict, dataclass, field
from dvc.utils import relpath
from datetime import datetime
from dvc.repo.params.show import _gather_params
import json
@dataclass(frozen=True)
class SerializableE... | @dataclass(frozen=True)
class SerializableExp:
'''Serializable experiment data.'''
@classmethod
def from_repo(cls, repo: 'Repo', rev: Optional[str]=None, param_deps: bool=False, **kwargs) -> 'SerializableExp':
'''Returns a SerializableExp from the current repo state.
Params, metrics, deps, o... | 10 | 2 | 15 | 1 | 13 | 1 | 3 | 0.06 | 0 | 16 | 8 | 0 | 3 | 0 | 5 | 5 | 91 | 9 | 77 | 31 | 56 | 5 | 33 | 16 | 26 | 7 | 0 | 2 | 15 |
19,299 | iterative/dvc | dvc/repo/experiments/serialize.py | dvc.repo.experiments.serialize._ISOEncoder | import json
from typing import TYPE_CHECKING, Any, Literal, Optional
from datetime import datetime
class _ISOEncoder(json.JSONEncoder):
def default(self, o: object) -> Any:
if isinstance(o, datetime):
return o.isoformat()
return super().default(o) |
class _ISOEncoder(json.JSONEncoder):
def default(self, o: object) -> Any:
pass | 2 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 4 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 0 | 5 | 2 | 3 | 0 | 5 | 2 | 3 | 2 | 1 | 1 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.