diff --git a/examples/nehar/benchmark.py b/examples/nehar/benchmark.py index b32cb274..a54603e5 100644 --- a/examples/nehar/benchmark.py +++ b/examples/nehar/benchmark.py @@ -53,8 +53,7 @@ benchmark = Benchmark( model, test_set_loader, [], postprocessors, [static_metrics, workload_metrics] ) - results = benchmark.run(verbose=False) - print(results) + results = benchmark.run(verbose=True) results_path = os.path.join(file_path, "results") benchmark.save_benchmark_results(results_path) diff --git a/neurobench/benchmarks/benchmark.py b/neurobench/benchmarks/benchmark.py index 3ea9ccfe..af3d13e9 100644 --- a/neurobench/benchmarks/benchmark.py +++ b/neurobench/benchmarks/benchmark.py @@ -1,7 +1,5 @@ import sys from contextlib import redirect_stdout -from os import mkdir -from tqdm import tqdm from snntorch import utils from neurobench.metrics.manager.static_manager import StaticMetricManager from neurobench.metrics.manager.workload_manager import WorkloadMetricManager @@ -16,13 +14,18 @@ import json import csv import os -from typing import Literal, List, Type, Optional, Dict, Any, Callable, Tuple +from typing import Literal, List, Type, Optional, Dict, Any import pathlib import snntorch from torch import Tensor - +from rich.console import Console +from rich.panel import Panel +from rich.table import Table import torch import nir +from rich.live import Live +import rich +from .utils import make_layout, create_progress_bar, create_content_panel class Benchmark: @@ -36,25 +39,18 @@ def __init__( self, model: NeuroBenchModel, dataloader: Optional[DataLoader], - preprocessors: Optional[ - List[ - NeuroBenchPreProcessor - | Callable[[Tuple[Tensor, Tensor]], Tuple[Tensor, Tensor]] - ] - ], - postprocessors: Optional[ - List[NeuroBenchPostProcessor | Callable[[Tensor], Tensor]] - ], + preprocessors: Optional[List[NeuroBenchPreProcessor]], + postprocessors: Optional[List[NeuroBenchPostProcessor]], metric_list: List[List[Type[StaticMetric | WorkloadMetric]]], ): """ Args: model: A NeuroBenchModel. dataloader: A PyTorch DataLoader. - preprocessors: A list of NeuroBenchPreProcessors or callable functions (e.g. lambda) with matching interfaces. - postprocessors: A list of NeuroBenchPostProcessors or callable functions (e.g. lambda) with matching interfaces. - metric_list: A list of lists of StaticMetric and WorkloadMetric classes of metrics to run. - First item is StaticMetrics, second item is WorkloadMetrics. + preprocessors: A list of NeuroBenchPreProcessors. + postprocessors: A list of NeuroBenchPostProcessors. + metric_list: A list of lists of strings of metrics to run. + First item is static metrics, second item is data metrics. """ self.model = model @@ -70,13 +66,8 @@ def run( quiet: bool = False, verbose: bool = False, dataloader: Optional[DataLoader] = None, - preprocessors: Optional[ - NeuroBenchPreProcessor - | Callable[[Tuple[Tensor, Tensor]], Tuple[Tensor, Tensor]] - ] = None, - postprocessors: Optional[ - NeuroBenchPostProcessor | Callable[[Tensor], Tensor] - ] = None, + preprocessors: Optional[NeuroBenchPreProcessor] = None, + postprocessors: Optional[NeuroBenchPostProcessor] = None, device: Optional[str] = None, ) -> Dict[str, Any]: """ @@ -96,7 +87,6 @@ def run( """ with redirect_stdout(None if quiet else sys.stdout): - print("Running benchmark") self.results = None results = self.static_metric_manager.run_metrics(self.model) @@ -116,40 +106,78 @@ def run( self.model.__net__().to(device) batch_num = 0 - for data in tqdm(dataloader, total=len(dataloader), disable=quiet): - # convert data to tuple - data = tuple(data) if not isinstance(data, tuple) else data + print("\n") + + progress = create_progress_bar(total=len(dataloader)) + layout = make_layout(verbose) + layout["progress"].update(Panel(progress)) + if verbose: + layout["content"].update(Panel("")) + + console = Console() + console.clear() + + with Live( + layout, + refresh_per_second=10, + vertical_overflow="visible", + screen=True, # This will clear the screen and create a new canvas + console=console, + ) as live: + task = progress.add_task( + "[cyan]Running Benchmark...", total=len(dataloader) + ) - if device is not None: - data = (data[0].to(device), data[1].to(device)) + for data in dataloader: + # convert data to tuple + data = tuple(data) if not isinstance(data, tuple) else data - batch_size = data[0].size(0) + if device is not None: + data = (data[0].to(device), data[1].to(device)) - # Preprocessing data - input, target = self.processor_manager.preprocess(data) + batch_size = data[0].size(0) - # Run model on test data - preds = self.model(input) + # Preprocessing data + data = self.processor_manager.preprocess(data) - # Postprocessing data - preds = self.processor_manager.postprocess(preds) + # Run model on test data + preds = self.model(data[0]) - # Data metrics - batch_results = self.workload_metric_manager.run_metrics( - self.model, preds, data, batch_size, dataset_len - ) - self.workload_metric_manager.reset_hooks(self.model) + # Postprocessing data + preds = self.processor_manager.postprocess(preds) + + # Data metrics + batch_results = self.workload_metric_manager.run_metrics( + self.model, preds, data, batch_size, dataset_len + ) + self.workload_metric_manager.reset_hooks(self.model) - if verbose: - results.update(batch_results) - print(f"\nBatch num {batch_num + 1}/{len(dataloader)}") - print(dict(results)) + progress.update(task, advance=1) - batch_num += 1 + if verbose: + # Create a list of panels for each metric + content_panel = create_content_panel( + progress, batch_results, verbose + ) + layout["content"].update( + Panel( + content_panel, + title="Batch History", + border_style="cyan", + ) + ) + + batch_num += 1 + + # Keep the progress bar base at the end without collapsing it + progress.update(task, completed=len(dataloader)) + live.refresh() + live.stop() results.update(self.workload_metric_manager.results) self.workload_metric_manager.clean_results() self.results = dict(results) + self._show_results(console) return self.results def save_benchmark_results( @@ -274,3 +302,38 @@ def to_onnx(self, dummy_input: Tensor, filename: str, **kwargs) -> None: self.model.__net__().eval() torch.onnx.export(self.model.__net__(), dummy_input, filename, **kwargs) print(f"Model exported to {filename}") + + def _show_results(self, console): + """Print the results of the benchmark.""" + if self.results is None: + raise ValueError("No results to show. Run the benchmark first.") + + # Create console and table + + table = Table( + title="[bold magenta]\nBenchmark Results:[/bold magenta]", + show_lines=True, + expand=True, + header_style="bold cyan", + title_justify="center", + title_style="bold magenta", + border_style="cyan", + box=rich.box.ROUNDED, + ) + + # Define columns + table.add_column("Metric", style="bold magenta", justify="left") + table.add_column("Value", style="bold yellow", justify="right") + + # Add metrics to the table + for key, value in self.results.items(): + if isinstance(value, dict): + table.add_section() + table.add_row(f"[bold green]{key}[/]", "") + for sub_key, sub_value in value.items(): + table.add_row(f" {sub_key}", f"{sub_value}") + else: + table.add_row(key, f"{value}") + + # Print the table + console.print(table) diff --git a/neurobench/benchmarks/utils.py b/neurobench/benchmarks/utils.py new file mode 100644 index 00000000..a7228c33 --- /dev/null +++ b/neurobench/benchmarks/utils.py @@ -0,0 +1,85 @@ +from rich.layout import Layout +from rich.progress import ( + Progress, + SpinnerColumn, + BarColumn, + TextColumn, + TimeRemainingColumn, +) +from rich.panel import Panel +from rich.columns import Columns + + +def make_layout(verbose: bool = False) -> Layout: + """Create a layout for the benchmark runner.""" + layout = Layout() + if verbose: + layout.split( + Layout(name="progress", size=3), + Layout(name="content"), + ) + else: + layout.split( + Layout(name="progress", size=3), + ) + + return layout + + +def create_progress_bar(total: int) -> Progress: + """Create a progress bar.""" + + progress = Progress( + SpinnerColumn(spinner_name="dots"), + TextColumn("[bold cyan]Processing[/bold cyan]"), + BarColumn(bar_width=40, style="magenta", complete_style="cyan"), + TextColumn("[progress.percentage]{task.percentage:>3.0f}%"), + TextColumn("•"), + TextColumn("[bold blue]{task.completed}/{task.total}[/bold blue] batches"), + TextColumn("•"), + TimeRemainingColumn(), + expand=True, + transient=False, + ) + + return progress + + +def create_content_panel(progress, batch_results, verbose): + panels = [] + if verbose: + for key, value in batch_results.items(): + if isinstance(value, dict): + sub_panels = [ + Panel( + f"Value: {sub_value}", + title=sub_key, + border_style="green", + ) + for sub_key, sub_value in value.items() + ] + panels.append( + Panel( + Columns(sub_panels), + title=key, + border_style="blue", + ) + ) + else: + panels.append( + Panel( + f"Value: {value}", + title=key, + border_style="blue", + ) + ) + # Create a structured panel for the content section + content_panel = Panel( + Columns(panels), + title=f"Processing batch {progress.tasks[0].completed}/{progress.tasks[0].total}", + title_align="left", + border_style="cyan", + ) + + # Update the content section with the history of panels + return content_panel diff --git a/poetry.lock b/poetry.lock index 20e71ca4..ace0843b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "aiohappyeyeballs" -version = "2.4.6" +version = "2.5.0" description = "Happy Eyeballs for asyncio" optional = false python-versions = ">=3.9" files = [ - {file = "aiohappyeyeballs-2.4.6-py3-none-any.whl", hash = "sha256:147ec992cf873d74f5062644332c539fcd42956dc69453fe5204195e560517e1"}, - {file = "aiohappyeyeballs-2.4.6.tar.gz", hash = "sha256:9b05052f9042985d32ecbe4b59a77ae19c006a78f1344d7fdad69d28ded3d0b0"}, + {file = "aiohappyeyeballs-2.5.0-py3-none-any.whl", hash = "sha256:0850b580748c7071db98bffff6d4c94028d0d3035acc20fd721a0ce7e8cac35d"}, + {file = "aiohappyeyeballs-2.5.0.tar.gz", hash = "sha256:18fde6204a76deeabc97c48bdd01d5801cfda5d6b9c8bbeb1aaaee9d648ca191"}, ] [[package]] @@ -854,13 +854,13 @@ files = [ [[package]] name = "fsspec" -version = "2025.2.0" +version = "2025.3.0" description = "File-system specification" optional = false python-versions = ">=3.8" files = [ - {file = "fsspec-2025.2.0-py3-none-any.whl", hash = "sha256:9de2ad9ce1f85e1931858535bc882543171d197001a0a5eb2ddc04f1781ab95b"}, - {file = "fsspec-2025.2.0.tar.gz", hash = "sha256:1c24b16eaa0a1798afa0337aa0db9b256718ab2a89c425371f5628d22c3b6afd"}, + {file = "fsspec-2025.3.0-py3-none-any.whl", hash = "sha256:efb87af3efa9103f94ca91a7f8cb7a4df91af9f74fc106c9c7ea0efd7277c1b3"}, + {file = "fsspec-2025.3.0.tar.gz", hash = "sha256:a935fd1ea872591f2b5148907d103488fc523295e6c64b835cfad8c3eca44972"}, ] [package.dependencies] @@ -952,13 +952,13 @@ numpy = ">=1.19.3" [[package]] name = "identify" -version = "2.6.8" +version = "2.6.9" description = "File identification library for Python" optional = false python-versions = ">=3.9" files = [ - {file = "identify-2.6.8-py2.py3-none-any.whl", hash = "sha256:83657f0f766a3c8d0eaea16d4ef42494b39b34629a4b3192a9d020d349b3e255"}, - {file = "identify-2.6.8.tar.gz", hash = "sha256:61491417ea2c0c5c670484fd8abbb34de34cdae1e5f39a73ee65e48e4bb663fc"}, + {file = "identify-2.6.9-py2.py3-none-any.whl", hash = "sha256:c98b4322da415a8e5a70ff6e51fbc2d2932c015532d77e9f8537b4ba7813b150"}, + {file = "identify-2.6.9.tar.gz", hash = "sha256:d40dfe3142a1421d8518e3d3985ef5ac42890683e32306ad614a29490abeb6bf"}, ] [package.extras] @@ -1018,13 +1018,13 @@ files = [ [[package]] name = "jinja2" -version = "3.1.5" +version = "3.1.6" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, - {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, + {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, + {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, ] [package.dependencies] @@ -1136,13 +1136,13 @@ tests = ["matplotlib (>=3.5.0)", "packaging (>=20.0)", "pytest", "pytest-cov", " [[package]] name = "lightning-utilities" -version = "0.12.0" +version = "0.14.0" description = "Lightning toolbox for across the our ecosystem." optional = false python-versions = ">=3.9" files = [ - {file = "lightning_utilities-0.12.0-py3-none-any.whl", hash = "sha256:b827f5768607e81ccc7b2ada1f50628168d1cc9f839509c7e87c04b59079e66c"}, - {file = "lightning_utilities-0.12.0.tar.gz", hash = "sha256:95b5f22a0b69eb27ca0929c6c1d510592a70080e1733a055bf154903c0343b60"}, + {file = "lightning_utilities-0.14.0-py3-none-any.whl", hash = "sha256:29cd0e0d1aff903667c0111eee6d96e804261ad6d4a009be7f7da71520927314"}, + {file = "lightning_utilities-0.14.0.tar.gz", hash = "sha256:9ab2424c1d44d90c9c74d6d9fe64f05e5613b8c29f94f6d407b9054cc7aee95e"}, ] [package.dependencies] @@ -1185,6 +1185,30 @@ files = [ {file = "llvmlite-0.44.0.tar.gz", hash = "sha256:07667d66a5d150abed9157ab6c0b9393c9356f229784a4385c02f99e94fc94d4"}, ] +[[package]] +name = "markdown-it-py" +version = "3.0.0" +description = "Python port of markdown-it. Markdown parsing, done right!" +optional = false +python-versions = ">=3.8" +files = [ + {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, + {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, +] + +[package.dependencies] +mdurl = ">=0.1,<1.0" + +[package.extras] +benchmarking = ["psutil", "pytest", "pytest-benchmark"] +code-style = ["pre-commit (>=3.0,<4.0)"] +compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "mistletoe (>=1.0,<2.0)", "mistune (>=2.0,<3.0)", "panflute (>=2.3,<3.0)"] +linkify = ["linkify-it-py (>=1,<3)"] +plugins = ["mdit-py-plugins"] +profiling = ["gprof2dot"] +rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] + [[package]] name = "markupsafe" version = "3.0.2" @@ -1266,6 +1290,17 @@ files = [ {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] +[[package]] +name = "mdurl" +version = "0.1.2" +description = "Markdown URL utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, + {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, +] + [[package]] name = "mpmath" version = "1.3.0" @@ -2193,6 +2228,25 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "rich" +version = "13.9.4" +description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, + {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, +] + +[package.dependencies] +markdown-it-py = ">=2.2.0" +pygments = ">=2.13.0,<3.0.0" +typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.11\""} + +[package.extras] +jupyter = ["ipywidgets (>=7.5.1,<9)"] + [[package]] name = "scikit-learn" version = "1.6.1" @@ -2312,13 +2366,13 @@ test = ["Cython", "array-api-strict (>=2.0,<2.1.1)", "asv", "gmpy2", "hypothesis [[package]] name = "setuptools" -version = "75.8.1" +version = "76.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.9" files = [ - {file = "setuptools-75.8.1-py3-none-any.whl", hash = "sha256:3bc32c0b84c643299ca94e77f834730f126efd621de0cc1de64119e0e17dab1f"}, - {file = "setuptools-75.8.1.tar.gz", hash = "sha256:65fb779a8f28895242923582eadca2337285f0891c2c9e160754df917c3d2530"}, + {file = "setuptools-76.0.0-py3-none-any.whl", hash = "sha256:199466a166ff664970d0ee145839f5582cb9bca7a0a3a2e795b6a9cb2308e9c6"}, + {file = "setuptools-76.0.0.tar.gz", hash = "sha256:43b4ee60e10b0d0ee98ad11918e114c70701bc6051662a9a675a0496c1a158f4"}, ] [package.extras] @@ -2827,13 +2881,13 @@ torch = "2.6.0" [[package]] name = "torchmetrics" -version = "1.6.1" +version = "1.6.2" description = "PyTorch native Metrics" optional = false python-versions = ">=3.9" files = [ - {file = "torchmetrics-1.6.1-py3-none-any.whl", hash = "sha256:c3090aa2341129e994c0a659abb6d4140ae75169a6ebf45bffc16c5cb553b38e"}, - {file = "torchmetrics-1.6.1.tar.gz", hash = "sha256:a5dc236694b392180949fdd0a0fcf2b57135c8b600e557c725e077eb41e53e64"}, + {file = "torchmetrics-1.6.2-py3-none-any.whl", hash = "sha256:586b970aff33a2154bfb6ed4539a557e9a268b6dce408bbdef0fec99fef3c78b"}, + {file = "torchmetrics-1.6.2.tar.gz", hash = "sha256:a3fa6372dbf01183d0f6fda2159e9526fb62818aa3630660909c290425f67df6"}, ] [package.dependencies] @@ -2843,14 +2897,14 @@ packaging = ">17.1" torch = ">=2.0.0" [package.extras] -all = ["SciencePlots (>=2.0.0)", "gammatone (>=1.0.0)", "ipadic (>=1.0.0)", "librosa (>=0.10.0)", "matplotlib (>=3.6.0)", "mecab-python3 (>=1.0.6)", "mypy (==1.14.0)", "nltk (>3.8.1)", "numpy (<2.0)", "onnxruntime (>=1.12.0)", "pesq (>=0.0.4)", "piq (<=0.8.0)", "pycocotools (>2.0.0)", "pystoi (>=0.4.0)", "regex (>=2021.9.24)", "requests (>=2.19.0)", "scipy (>1.0.0)", "sentencepiece (>=0.2.0)", "torch (==2.5.1)", "torch-fidelity (<=0.4.0)", "torchaudio (>=2.0.1)", "torchvision (>=0.15.1)", "torchvision (>=0.15.1)", "tqdm (<4.68.0)", "transformers (>4.4.0)", "transformers (>=4.42.3)", "types-PyYAML", "types-emoji", "types-protobuf", "types-requests", "types-setuptools", "types-six", "types-tabulate"] -audio = ["gammatone (>=1.0.0)", "librosa (>=0.10.0)", "numpy (<2.0)", "onnxruntime (>=1.12.0)", "pesq (>=0.0.4)", "pystoi (>=0.4.0)", "requests (>=2.19.0)", "torchaudio (>=2.0.1)"] +all = ["SciencePlots (>=2.0.0)", "gammatone (>=1.0.0)", "ipadic (>=1.0.0)", "librosa (>=0.10.0)", "matplotlib (>=3.6.0)", "mecab-python3 (>=1.0.6)", "mypy (==1.15.0)", "nltk (>3.8.1)", "onnxruntime (>=1.12.0)", "pesq (>=0.0.4)", "piq (<=0.8.0)", "pycocotools (>2.0.0)", "pystoi (>=0.4.0)", "regex (>=2021.9.24)", "requests (>=2.19.0)", "scipy (>1.0.0)", "sentencepiece (>=0.2.0)", "torch (==2.6.0)", "torch-fidelity (<=0.4.0)", "torchaudio (>=2.0.1)", "torchvision (>=0.15.1)", "torchvision (>=0.15.1)", "tqdm (<4.68.0)", "transformers (>4.4.0)", "transformers (>=4.42.3)", "types-PyYAML", "types-emoji", "types-protobuf", "types-requests", "types-setuptools", "types-six", "types-tabulate"] +audio = ["gammatone (>=1.0.0)", "librosa (>=0.10.0)", "onnxruntime (>=1.12.0)", "pesq (>=0.0.4)", "pystoi (>=0.4.0)", "requests (>=2.19.0)", "torchaudio (>=2.0.1)"] detection = ["pycocotools (>2.0.0)", "torchvision (>=0.15.1)"] -dev = ["PyTDC (==0.4.1)", "SciencePlots (>=2.0.0)", "bert_score (==0.3.13)", "dython (==0.7.6)", "dython (>=0.7.8,<0.8.0)", "fairlearn", "fast-bss-eval (>=0.1.0)", "faster-coco-eval (>=1.6.3)", "gammatone (>=1.0.0)", "huggingface-hub (<0.28)", "ipadic (>=1.0.0)", "jiwer (>=2.3.0)", "kornia (>=0.6.7)", "librosa (>=0.10.0)", "lpips (<=0.1.4)", "matplotlib (>=3.6.0)", "mecab-ko (>=1.0.0,<1.1.0)", "mecab-ko-dic (>=1.0.0)", "mecab-python3 (>=1.0.6)", "mir-eval (>=0.6)", "monai (==1.3.2)", "monai (==1.4.0)", "mypy (==1.14.0)", "netcal (>1.0.0)", "nltk (>3.8.1)", "numpy (<2.0)", "numpy (<2.3.0)", "onnxruntime (>=1.12.0)", "pandas (>1.4.0)", "permetrics (==2.0.0)", "pesq (>=0.0.4)", "piq (<=0.8.0)", "pycocotools (>2.0.0)", "pystoi (>=0.4.0)", "pytorch-msssim (==1.0.0)", "regex (>=2021.9.24)", "requests (>=2.19.0)", "rouge-score (>0.1.0)", "sacrebleu (>=2.3.0)", "scikit-image (>=0.19.0)", "scipy (>1.0.0)", "scipy (>1.0.0)", "sentencepiece (>=0.2.0)", "sewar (>=0.4.4)", "statsmodels (>0.13.5)", "torch (==2.5.1)", "torch-fidelity (<=0.4.0)", "torch_complex (<0.5.0)", "torchaudio (>=2.0.1)", "torchvision (>=0.15.1)", "torchvision (>=0.15.1)", "tqdm (<4.68.0)", "transformers (>4.4.0)", "transformers (>=4.42.3)", "types-PyYAML", "types-emoji", "types-protobuf", "types-requests", "types-setuptools", "types-six", "types-tabulate"] +dev = ["PyTDC (==0.4.1)", "SciencePlots (>=2.0.0)", "bert_score (==0.3.13)", "dython (==0.7.9)", "fairlearn", "fast-bss-eval (>=0.1.0)", "faster-coco-eval (>=1.6.3)", "gammatone (>=1.0.0)", "huggingface-hub (<0.30)", "ipadic (>=1.0.0)", "jiwer (>=2.3.0)", "kornia (>=0.6.7)", "librosa (>=0.10.0)", "lpips (<=0.1.4)", "matplotlib (>=3.6.0)", "mecab-ko (>=1.0.0,<1.1.0)", "mecab-ko-dic (>=1.0.0)", "mecab-python3 (>=1.0.6)", "mir-eval (>=0.6)", "monai (==1.4.0)", "mypy (==1.15.0)", "netcal (>1.0.0)", "nltk (>3.8.1)", "numpy (<2.3.0)", "onnxruntime (>=1.12.0)", "pandas (>1.4.0)", "permetrics (==2.0.0)", "pesq (>=0.0.4)", "piq (<=0.8.0)", "pycocotools (>2.0.0)", "pystoi (>=0.4.0)", "pytorch-msssim (==1.0.0)", "regex (>=2021.9.24)", "requests (>=2.19.0)", "rouge-score (>0.1.0)", "sacrebleu (>=2.3.0)", "scikit-image (>=0.19.0)", "scipy (>1.0.0)", "scipy (>1.0.0)", "sentencepiece (>=0.2.0)", "sewar (>=0.4.4)", "statsmodels (>0.13.5)", "torch (==2.6.0)", "torch-fidelity (<=0.4.0)", "torch_complex (<0.5.0)", "torchaudio (>=2.0.1)", "torchvision (>=0.15.1)", "torchvision (>=0.15.1)", "tqdm (<4.68.0)", "transformers (>4.4.0)", "transformers (>=4.42.3)", "types-PyYAML", "types-emoji", "types-protobuf", "types-requests", "types-setuptools", "types-six", "types-tabulate"] image = ["scipy (>1.0.0)", "torch-fidelity (<=0.4.0)", "torchvision (>=0.15.1)"] multimodal = ["piq (<=0.8.0)", "transformers (>=4.42.3)"] text = ["ipadic (>=1.0.0)", "mecab-python3 (>=1.0.6)", "nltk (>3.8.1)", "regex (>=2021.9.24)", "sentencepiece (>=0.2.0)", "tqdm (<4.68.0)", "transformers (>4.4.0)"] -typing = ["mypy (==1.14.0)", "torch (==2.5.1)", "types-PyYAML", "types-emoji", "types-protobuf", "types-requests", "types-setuptools", "types-six", "types-tabulate"] +typing = ["mypy (==1.15.0)", "torch (==2.6.0)", "types-PyYAML", "types-emoji", "types-protobuf", "types-requests", "types-setuptools", "types-six", "types-tabulate"] visual = ["SciencePlots (>=2.0.0)", "matplotlib (>=3.6.0)"] [[package]] @@ -2933,13 +2987,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "virtualenv" -version = "20.29.2" +version = "20.29.3" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" files = [ - {file = "virtualenv-20.29.2-py3-none-any.whl", hash = "sha256:febddfc3d1ea571bdb1dc0f98d7b45d24def7428214d4fb73cc486c9568cce6a"}, - {file = "virtualenv-20.29.2.tar.gz", hash = "sha256:fdaabebf6d03b5ba83ae0a02cfe96f48a716f4fae556461d180825866f75b728"}, + {file = "virtualenv-20.29.3-py3-none-any.whl", hash = "sha256:3e3d00f5807e83b234dfb6122bf37cfadf4be216c53a49ac059d02414f819170"}, + {file = "virtualenv-20.29.3.tar.gz", hash = "sha256:95e39403fcf3940ac45bc717597dba16110b74506131845d9b687d5e73d947ac"}, ] [package.dependencies] @@ -3054,4 +3108,4 @@ nehar = ["gdown", "pytorch-lightning"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "62e328509dff7525a44f4ee594f9eb9bee4311671d2df6a351fca55c68f33552" +content-hash = "50380c71beab825a2ec89bcfe296bfaf1f5f1e32f84c644637bba517f954f9ea" diff --git a/pyproject.toml b/pyproject.toml index f633dbea..0345c1cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ snntorch = {version = ">=0.7.0"} jitcdde = {version = "^1.8.1", optional = true} pytorch-lightning = {version = "^1.4.0", optional = true} gdown = {version = "^4.7.1", optional = true} +rich = ">=13.9.4" [tool.poetry.group.dev] optional = true