repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
clearml
clearml/router/fastapi_proxy.py
.py
import functools import threading from multiprocessing import Process from typing import Optional, Callable, Awaitable, AsyncGenerator, Union import fastapi import httpx import uvicorn from fastapi import FastAPI, Request, Response from fastapi.responses import StreamingResponse from starlette.middleware.base import B...
265
10,008
clearml
clearml/router/route.py
.py
import inspect from typing import Optional, Callable, Dict, Any from .endpoint_telemetry import EndpointTelemetry class Route: def __init__( self, target_url: str, request_callback: Optional[Callable[[Any, Dict[str, Any]], Any]] = None, response_callback: Optional[Callable[[Any, A...
103
3,888
clearml
clearml/router/router.py
.py
from typing import Optional, Callable, Dict, Union, List, Any # noqa from fastapi import Request, Response # noqa from .proxy import HttpProxy class HttpRouter: """ A router class to manage HTTP routing for an application. Allows the creation, deployment, and management of local and external endpoints...
247
11,838
clearml
clearml/router/proxy.py
.py
from typing import Callable, Dict, Optional, Any from fastapi import Request, Response from .fastapi_proxy import FastAPIProxy from .route import Route class HttpProxy: DEFAULT_PORT = 9000 def __init__( self, port: Optional[int] = None, workers: Optional[int] = None, default_...
64
1,924
clearml
clearml/router/endpoint_telemetry.py
.py
import copy import time import uuid from threading import Thread from typing import Optional, Dict, Union, List from ..task import Task from ..utilities.resource_monitor import ResourceMonitor class EndpointTelemetry: BACKEND_STAT_MAP = { "cpu_usage_*": "cpu_usage", "cpu_temperature_*": "cpu_temp...
241
9,972
clearml
clearml/backend_config/errors.py
.py
from typing import Optional, Any class ConfigurationError(Exception): """Exception class to be raised when a configuration file is invalid.""" def __init__(self, msg: str, file_path: Optional[str] = None, *args: Any) -> None: super(ConfigurationError, self).__init__(msg, *args) self.file_path...
10
333
clearml
clearml/backend_config/utils.py
.py
import base64 import os from os.path import expandvars, expanduser from pathlib2 import Path from typing import List, TYPE_CHECKING, ValuesView, Dict, Any from ..utilities.pyhocon import HOCONConverter, ConfigTree if TYPE_CHECKING: from .config import Config def get_items(cls) -> Dict[str, Any]: """get key/...
113
3,877
clearml
clearml/backend_config/environment.py
.py
from os import getenv, environ from typing import Callable, Union, Dict, Any from .converters import text_to_bool from .entry import Entry, NotSet class EnvEntry(Entry): @classmethod def default_conversions(cls) -> Dict[Any, Callable[[str], Any]]: conversions = super(EnvEntry, cls).default_conversion...
39
1,224
clearml
clearml/backend_config/bucket_config.py
.py
from abc import ABC, abstractmethod import logging import warnings from copy import copy from operator import itemgetter from os import getenv from typing import Tuple, Dict, List, Union, Optional, Any import furl from attr import attrib, attrs from .converters import strtobool def _none_to_empty_string(maybe_strin...
514
18,891
clearml
clearml/backend_config/log.py
.py
import logging.config from copy import deepcopy from types import TracebackType from typing import Optional, Dict, Union, Type, Tuple, Any from pathlib2 import Path def logger(path: Optional[str] = None) -> logging.Logger: """Get a ClearML Python logging.Logger named according to the parent path or stem of the f...
47
1,543
clearml
clearml/backend_config/entry.py
.py
from abc import ABC, abstractmethod from typing import Optional, Any, Tuple, Callable, Dict from .converters import any_to_bool NotSet = object() Converter = Callable[[Any], Any] class Entry(ABC): """ Configuration entry definition """ @classmethod def default_conversions(cls) -> Dict[Any, Con...
90
3,081
clearml
clearml/backend_config/converters.py
.py
import base64 from typing import Union, Optional, Any, TypeVar, Callable, Tuple ConverterType = TypeVar("ConverterType", bound=Callable[[Any], Any]) def strtobool(val: str) -> int: """Convert a string representation of truth to true (1) or false (0). True values are 'y', 'yes', 't', 'true', 'on', and '1'; f...
63
1,847
clearml
clearml/backend_config/config.py
.py
from __future__ import print_function import functools import json import logging import os import warnings from fnmatch import fnmatch from os.path import expanduser from typing import Any, Optional, List, Union from pathlib2 import Path from pyparsing import ( ParseFatalException, ParseException, Recurs...
421
14,665
clearml
clearml/backend_config/defs.py
.py
from os.path import expanduser, expandvars, exists from typing import Optional from pathlib2 import Path from .environment import EnvEntry ENV_VAR = "CLEARML_ENV" """ Name of system environment variable that can be used to specify the config environment name """ DEFAULT_CONFIG_FOLDER = "config" """ Default config f...
70
2,128
metrics
setup.py
.py
#!/usr/bin/env python import glob import os import re from collections.abc import Iterable, Iterator from functools import partial from importlib.util import module_from_spec, spec_from_file_location from itertools import chain from pathlib import Path from typing import Any, Optional, Union from packaging.requirement...
261
11,154
metrics
docs/source/conf.py
.py
# # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or ...
469
17,199
metrics
docs/source/pyplots/confusion_matrix.py
.py
import matplotlib.pyplot as plt import torch import torchmetrics N = 10 num_updates = 10 num_steps = 5 fig, ax = plt.subplots(1, 1, figsize=(6.8, 4.8), dpi=500) metric = torchmetrics.ConfusionMatrix(task="multiclass", num_classes=3) for _ in range(N): metric.update(torch.randint(3, (10,)), torch.randint(3, (10,...
17
354
metrics
docs/source/pyplots/multiclass_accuracy.py
.py
import matplotlib.pyplot as plt import torch import torchmetrics N = 10 num_updates = 10 num_steps = 5 fig, ax = plt.subplots(1, 1, figsize=(6.8, 4.8), dpi=500) metric = torchmetrics.Accuracy(task="multiclass", num_classes=3, average=None) for _ in range(N): metric.update(torch.randint(3, (10,)), torch.randint(...
17
361
metrics
docs/source/pyplots/binary_accuracy_multistep.py
.py
import matplotlib.pyplot as plt import torch import torchmetrics N = 10 num_updates = 10 num_steps = 5 w = torch.tensor([0.2, 0.8]) target = lambda it: torch.multinomial((it * w).softmax(dim=-1), 100, replacement=True) preds = lambda it: torch.multinomial((it * w).softmax(dim=-1), 100, replacement=True) fig, ax = p...
25
635
metrics
docs/source/pyplots/binary_accuracy.py
.py
import matplotlib.pyplot as plt import torch import torchmetrics N = 10 num_updates = 10 num_steps = 5 fig, ax = plt.subplots(1, 1, figsize=(6.8, 4.8), dpi=500) metric = torchmetrics.Accuracy(task="binary") for _ in range(N): metric.update(torch.rand(10), torch.randint(2, (10,))) metric.plot(ax=ax) fig.show()
16
318
metrics
docs/source/pyplots/tracker_binary.py
.py
import matplotlib.pyplot as plt import torch import torchmetrics N = 10 num_updates = 10 num_steps = 5 w = torch.tensor([0.2, 0.8]) target = lambda it: torch.multinomial((it * w).softmax(dim=-1), 100, replacement=True) preds = lambda it: (it * torch.randn(100)).sigmoid() confmat = torchmetrics.ConfusionMatrix(task=...
46
1,328
metrics
docs/source/pyplots/collection_binary_together.py
.py
import matplotlib.pyplot as plt import torch import torchmetrics N = 10 num_updates = 10 num_steps = 5 w = torch.tensor([0.2, 0.8]) target = lambda it: torch.multinomial((it * w).softmax(dim=-1), 100, replacement=True) preds = lambda it: torch.multinomial((it * w).softmax(dim=-1), 100, replacement=True) collection ...
30
800
metrics
docs/source/pyplots/collection_binary.py
.py
import matplotlib.pyplot as plt import torch import torchmetrics N = 10 num_updates = 10 num_steps = 5 w = torch.tensor([0.2, 0.8]) target = lambda it: torch.multinomial((it * w).softmax(dim=-1), 100, replacement=True) preds = lambda it: torch.multinomial((it * w).softmax(dim=-1), 100, replacement=True) collection ...
30
797
metrics
tests/unittests/__init__.py
.py
import os.path import warnings from typing import NamedTuple import numpy import torch from cachier import cachier from torch import Tensor from unittests.conftest import ( BATCH_SIZE, EXTRA_DIM, NUM_BATCHES, NUM_CLASSES, NUM_PROCESSES, THRESHOLD, USE_PYTEST_POOL, setup_ddp, ) # addin...
67
1,595
metrics
tests/unittests/conftest.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
90
2,852
metrics
tests/unittests/text/test_perplexity.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
105
4,435
metrics
tests/unittests/text/test_sacre_bleu.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
155
6,949
metrics
tests/unittests/text/test_mer.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
73
2,575
metrics
tests/unittests/text/test_rouge.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
328
11,821
metrics
tests/unittests/text/test_wer.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
71
2,504
metrics
tests/unittests/text/test_cer.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
71
2,453
metrics
tests/unittests/text/test_edit.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
148
5,499
metrics
tests/unittests/text/test_wip.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
71
2,567
metrics
tests/unittests/text/test_infolm.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
215
8,364
metrics
tests/unittests/text/test_ter.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
179
6,359
metrics
tests/unittests/text/test_bertscore.py
.py
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
353
12,977
metrics
tests/unittests/text/test_squad.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
121
4,461
metrics
tests/unittests/text/_helpers.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
465
19,499
metrics
tests/unittests/text/_inputs.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
140
5,195
metrics
tests/unittests/text/test_wil.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
71
2,527
metrics
tests/unittests/text/test_eed.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
132
4,680
metrics
tests/unittests/text/test_chrf.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
164
5,609
metrics
tests/unittests/text/test_bleu.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
144
5,602
metrics
tests/unittests/classification/test_exact_match.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
299
12,133
metrics
tests/unittests/classification/test_hamming_distance.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
534
23,167
metrics
tests/unittests/classification/test_jaccard.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
447
19,002
metrics
tests/unittests/classification/test_confusion_matrix.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
438
18,225
metrics
tests/unittests/classification/test_group_fairness.py
.py
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
316
12,418
metrics
tests/unittests/classification/test_eer.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
376
15,157
metrics
tests/unittests/classification/test_roc.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
414
17,481
metrics
tests/unittests/classification/test_precision_recall.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
787
32,722
metrics
tests/unittests/classification/test_sensitivity_specificity.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
497
22,800
metrics
tests/unittests/classification/test_hinge.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
252
10,042
metrics
tests/unittests/classification/test_cohen_kappa.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
254
10,369
metrics
tests/unittests/classification/test_matthews_corrcoef.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
418
17,204
metrics
tests/unittests/classification/test_accuracy.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
777
32,626
metrics
tests/unittests/classification/test_calibration_error.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
291
11,933
metrics
tests/unittests/classification/test_f_beta.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
768
30,654
metrics
tests/unittests/classification/test_stat_scores.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
668
28,215
metrics
tests/unittests/classification/test_logauc.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
417
17,201
metrics
tests/unittests/classification/test_specificity.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
621
24,825
metrics
tests/unittests/classification/test_auc.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
101
2,975
metrics
tests/unittests/classification/test_average_precision.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
437
19,064
metrics
tests/unittests/classification/test_recall_fixed_precision.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
472
20,997
metrics
tests/unittests/classification/_inputs.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
333
11,927
metrics
tests/unittests/classification/test_precision_fixed_recall.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
466
20,654
metrics
tests/unittests/classification/test_negative_predictive_value.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
602
25,003
metrics
tests/unittests/classification/test_specificity_sensitivity.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
487
21,757
metrics
tests/unittests/classification/test_auroc.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
435
18,459
metrics
tests/unittests/classification/test_ranking.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
149
6,220
metrics
tests/unittests/classification/test_precision_recall_curve.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
492
21,988
metrics
tests/unittests/audio/test_pit.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
255
9,840
metrics
tests/unittests/audio/test_si_snr.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
150
5,475
metrics
tests/unittests/audio/test_si_sdr.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
151
5,714
metrics
tests/unittests/audio/test_nisqa.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
203
8,629
metrics
tests/unittests/audio/__init__.py
.py
import os from typing import Callable, Optional from torch import Tensor from unittests import _PATH_ALL_TESTS _SAMPLE_AUDIO_SPEECH = os.path.join(_PATH_ALL_TESTS, "_data", "audio", "audio_speech.wav") _SAMPLE_AUDIO_SPEECH_BAB_DB = os.path.join(_PATH_ALL_TESTS, "_data", "audio", "audio_speech_bab_0dB.wav") _SAMPLE_N...
31
1,008
metrics
tests/unittests/audio/test_sdr.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
163
5,639
metrics
tests/unittests/audio/test_stoi.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
129
5,293
metrics
tests/unittests/audio/test_c_si_snr.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
96
3,963
metrics
tests/unittests/audio/test_dnsmos.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
272
10,206
metrics
tests/unittests/audio/test_pesq.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
137
5,764
metrics
tests/unittests/audio/test_sa_sdr.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
150
6,034
metrics
tests/unittests/audio/test_snr.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
120
4,480
metrics
tests/unittests/audio/test_srmr.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
126
5,053
metrics
tests/unittests/image/test_ms_ssim.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
137
4,995
metrics
tests/unittests/image/test_tv.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
121
4,091
metrics
tests/unittests/image/test_perceptual_path_length.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
208
7,972
metrics
tests/unittests/image/test_ssim.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
391
14,536
metrics
tests/unittests/image/test_inception.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
148
5,018
metrics
tests/unittests/image/test_arniqa.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
175
7,802
metrics
tests/unittests/image/test_rmse_sw.py
.py
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
86
3,101
metrics
tests/unittests/image/test_kid.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
223
8,450
metrics
tests/unittests/image/test_sam.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
133
5,403
metrics
tests/unittests/image/test_qnr.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
221
8,004
metrics
tests/unittests/image/test_d_lambda.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
152
5,987
metrics
tests/unittests/image/test_ergas.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
148
5,993
metrics
tests/unittests/image/test_mifid.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
225
9,167
metrics
tests/unittests/image/test_dists.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
107
3,704
metrics
tests/unittests/image/test_psnr.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
174
7,026
metrics
tests/unittests/image/test_d_s.py
.py
# Copyright The Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
430
14,085