Compare commits

...

5 Commits

Author SHA1 Message Date
Santiago Martinez Balvanera
a62f07ebdd to cpu 2025-06-19 00:46:43 +01:00
Santiago Martinez Balvanera
434fc652a2 Add collate fn 2025-06-19 00:46:34 +01:00
mbsantiago
84a13c65a7 Add iterators module 2025-06-19 00:28:24 +01:00
mbsantiago
ebc89af4c6 Use soundevent.to_db 2025-06-19 00:28:01 +01:00
mbsantiago
835fe1ccdf Remove old requirements files 2025-05-16 08:55:38 +01:00
8 changed files with 178 additions and 1060 deletions

View File

@ -0,0 +1,79 @@
from collections.abc import Generator
from typing import Optional, Tuple
from soundevent import data
from batdetect2.data.datasets import Dataset
from batdetect2.targets.types import TargetProtocol
def iterate_over_sound_events(
dataset: Dataset,
targets: TargetProtocol,
apply_filter: bool = True,
apply_transform: bool = True,
exclude_generic: bool = True,
) -> Generator[Tuple[Optional[str], data.SoundEventAnnotation], None, None]:
"""Iterate over sound events in a dataset, applying filtering and
transformations.
This generator function processes sound event annotations from a given
dataset, allowing for optional filtering, transformation, and exclusion of
unclassifiable (generic) events based on the provided target definitions.
Parameters
----------
dataset : Dataset
The dataset containing clip annotations, each of which may contain
multiple sound event annotations.
targets : TargetProtocol
An object implementing the `TargetProtocol`, which provides methods
for filtering, transforming, and encoding sound events.
apply_filter : bool, optional
If True, sound events will be filtered using `targets.filter()`.
Only events for which `targets.filter()` returns True will be yielded.
Defaults to True.
apply_transform : bool, optional
If True, sound events will be transformed using `targets.transform()`
before being yielded. Defaults to True.
exclude_generic : bool, optional
If True, sound events that result in a `None` class name after
`targets.encode()` will be excluded. This is typically used to
filter out events that cannot be mapped to a specific target class.
Defaults to True.
Yields
------
Tuple[Optional[str], data.SoundEventAnnotation]
A tuple containing:
- The encoded class name (str) for the sound event, or None if it
cannot be encoded to a specific class.
- The sound event annotation itself, after passing all specified
filtering and transformation steps.
Notes
-----
The processing order for each sound event is:
1. Filtering (if `apply_filter` is True). Events failing the filter are
skipped.
2. Transformation (if `apply_transform` is True).
3. Encoding to determine class name and check for genericity (if
`exclude_generic` is True). Events with a `None` class name are skipped
if `exclude_generic` is True.
"""
for clip_annotation in dataset:
for sound_event_annotation in clip_annotation.sound_events:
if apply_filter:
if not targets.filter(sound_event_annotation):
continue
if apply_transform:
sound_event_annotation = targets.transform(
sound_event_annotation
)
class_name = targets.encode(sound_event_annotation)
if class_name is None and exclude_generic:
continue
yield class_name, sound_event_annotation

View File

@ -84,7 +84,7 @@ def features_to_xarray(
freqs = np.linspace(min_freq, max_freq, height, endpoint=False) freqs = np.linspace(min_freq, max_freq, height, endpoint=False)
return xr.DataArray( return xr.DataArray(
data=features.detach().numpy(), data=features.detach().cpu().numpy(),
dims=[ dims=[
Dimensions.feature.value, Dimensions.feature.value,
Dimensions.frequency.value, Dimensions.frequency.value,
@ -157,7 +157,7 @@ def detection_to_xarray(
freqs = np.linspace(min_freq, max_freq, height, endpoint=False) freqs = np.linspace(min_freq, max_freq, height, endpoint=False)
return xr.DataArray( return xr.DataArray(
data=detection.squeeze(dim=0).detach().numpy(), data=detection.squeeze(dim=0).detach().cpu().numpy(),
dims=[ dims=[
Dimensions.frequency.value, Dimensions.frequency.value,
Dimensions.time.value, Dimensions.time.value,
@ -233,7 +233,7 @@ def classification_to_xarray(
freqs = np.linspace(min_freq, max_freq, height, endpoint=False) freqs = np.linspace(min_freq, max_freq, height, endpoint=False)
return xr.DataArray( return xr.DataArray(
data=classes.detach().numpy(), data=classes.detach().cpu().numpy(),
dims=[ dims=[
"category", "category",
Dimensions.frequency.value, Dimensions.frequency.value,
@ -302,7 +302,7 @@ def sizes_to_xarray(
freqs = np.linspace(min_freq, max_freq, height, endpoint=False) freqs = np.linspace(min_freq, max_freq, height, endpoint=False)
return xr.DataArray( return xr.DataArray(
data=sizes.detach().numpy(), data=sizes.detach().cpu().numpy(),
dims=[ dims=[
"dimension", "dimension",
Dimensions.frequency.value, Dimensions.frequency.value,

View File

@ -19,7 +19,7 @@ reproducible spectrogram generation consistent between training and inference.
The core computation is performed by `compute_spectrogram`. The core computation is performed by `compute_spectrogram`.
""" """
from typing import Literal, Optional, Union from typing import Callable, Literal, Optional, Union
import numpy as np import numpy as np
import xarray as xr import xarray as xr
@ -327,44 +327,45 @@ def compute_spectrogram(
""" """
config = config or SpectrogramConfig() config = config or SpectrogramConfig()
spec = stft( with xr.set_options(keep_attrs=True):
wav, spec = stft(
window_duration=config.stft.window_duration, wav,
window_overlap=config.stft.window_overlap, window_duration=config.stft.window_duration,
window_fn=config.stft.window_fn, window_overlap=config.stft.window_overlap,
) window_fn=config.stft.window_fn,
spec = crop_spectrogram_frequencies(
spec,
min_freq=config.frequencies.min_freq,
max_freq=config.frequencies.max_freq,
)
if config.pcen:
spec = apply_pcen(
spec,
time_constant=config.pcen.time_constant,
gain=config.pcen.gain,
power=config.pcen.power,
bias=config.pcen.bias,
) )
spec = scale_spectrogram(spec, scale=config.scale) spec = crop_spectrogram_frequencies(
if config.spectral_mean_substraction:
spec = remove_spectral_mean(spec)
if config.size:
spec = resize_spectrogram(
spec, spec,
height=config.size.height, min_freq=config.frequencies.min_freq,
resize_factor=config.size.resize_factor, max_freq=config.frequencies.max_freq,
) )
if config.peak_normalize: if config.pcen:
spec = ops.scale(spec, 1 / (10e-6 + np.max(spec))) spec = apply_pcen(
spec,
time_constant=config.pcen.time_constant,
gain=config.pcen.gain,
power=config.pcen.power,
bias=config.pcen.bias,
)
return spec.astype(dtype) spec = scale_spectrogram(spec, scale=config.scale)
if config.spectral_mean_substraction:
spec = remove_spectral_mean(spec)
if config.size:
spec = resize_spectrogram(
spec,
height=config.size.height,
resize_factor=config.size.resize_factor,
)
if config.peak_normalize:
spec = ops.scale(spec, 1 / (10e-6 + np.max(spec)))
return spec.astype(dtype)
def crop_spectrogram_frequencies( def crop_spectrogram_frequencies(
@ -477,7 +478,7 @@ def scale_spectrogram(
"""Apply final amplitude scaling/representation to the spectrogram. """Apply final amplitude scaling/representation to the spectrogram.
Converts the input magnitude spectrogram based on the `scale` type: Converts the input magnitude spectrogram based on the `scale` type:
- "dB": Applies logarithmic scaling `log1p(C * S)`. - "dB": Applies logarithmic scaling `log10(S)`.
- "power": Squares the magnitude values `S^2`. - "power": Squares the magnitude values `S^2`.
- "amplitude": Returns the input magnitude values `S` unchanged. - "amplitude": Returns the input magnitude values `S` unchanged.
@ -496,7 +497,7 @@ def scale_spectrogram(
Spectrogram with the specified amplitude scaling applied. Spectrogram with the specified amplitude scaling applied.
""" """
if scale == "dB": if scale == "dB":
return scale_log(spec, dtype=dtype) return arrays.to_db(spec).astype(dtype)
if scale == "power": if scale == "power":
return spec**2 return spec**2
@ -561,12 +562,13 @@ def apply_pcen(
def scale_log( def scale_log(
spec: xr.DataArray, spec: xr.DataArray,
dtype: DTypeLike = np.float32, # type: ignore dtype: DTypeLike = np.float32, # type: ignore
ref: Union[float, Callable] = np.max,
amin: float = 1e-10,
top_db: Optional[float] = 80.0,
) -> xr.DataArray: ) -> xr.DataArray:
"""Apply logarithmic scaling to a magnitude spectrogram. """Apply logarithmic scaling to a magnitude spectrogram.
Calculates `log(1 + C * S)`, where S is the input magnitude spectrogram Calculates `log10(S)`, where S is the input magnitude spectrogram.
and C is a scaling factor derived from the original STFT parameters
(sample rate, N-FFT, window function) stored in `spec.attrs`.
Parameters Parameters
---------- ----------
@ -587,12 +589,29 @@ def scale_log(
If required attributes are missing from `spec.attrs`. If required attributes are missing from `spec.attrs`.
ValueError ValueError
If attributes are non-numeric or window function is invalid. If attributes are non-numeric or window function is invalid.
Notes
-----
Implementation mainly taken from librosa `power_to_db` function
""" """
samplerate = spec.attrs["original_samplerate"]
nfft = spec.attrs["nfft"] if callable(ref):
log_scaling = 2 / (samplerate * (np.abs(np.hanning(nfft)) ** 2).sum()) ref_value = ref(spec)
else:
ref_value = np.abs(ref)
log_spec = 10.0 * np.log10(np.maximum(amin, spec)) - np.log10(
np.maximum(amin, ref_value)
)
if top_db is not None:
if top_db < 0:
raise ValueError("top_db must be non-negative")
log_spec = np.maximum(log_spec, log_spec.max() - top_db)
return xr.DataArray( return xr.DataArray(
data=np.log1p(log_scaling * spec).astype(dtype), data=log_spec.astype(dtype),
dims=spec.dims, dims=spec.dims,
coords=spec.coords, coords=spec.coords,
attrs=spec.attrs, attrs=spec.attrs,

View File

@ -9,6 +9,7 @@ from torch.utils.data import Dataset
from batdetect2.train.augmentations import Augmentation from batdetect2.train.augmentations import Augmentation
from batdetect2.train.types import ClipperProtocol, TrainExample from batdetect2.train.types import ClipperProtocol, TrainExample
from batdetect2.utils.tensors import adjust_width
__all__ = [ __all__ = [
"LabeledDataset", "LabeledDataset",
@ -87,6 +88,26 @@ class LabeledDataset(Dataset):
) )
def collate_fn(batch: List[TrainExample]):
width = 512
return TrainExample(
spec=torch.stack([adjust_width(x.spec, width) for x in batch]),
detection_heatmap=torch.stack(
[adjust_width(x.detection_heatmap, width) for x in batch]
),
class_heatmap=torch.stack(
[adjust_width(x.class_heatmap, width) for x in batch]
),
size_heatmap=torch.stack(
[adjust_width(x.size_heatmap, width) for x in batch]
),
idx=torch.stack([x.idx for x in batch]),
start_time=torch.stack([x.start_time for x in batch]),
end_time=torch.stack([x.end_time for x in batch]),
)
def list_preprocessed_files( def list_preprocessed_files(
directory: data.PathLike, extension: str = ".nc" directory: data.PathLike, extension: str = ".nc"
) -> List[Path]: ) -> List[Path]:

View File

@ -276,8 +276,11 @@ def preprocess_single_annotation(
labeller=labeller, labeller=labeller,
) )
except Exception as error: except Exception as error:
raise RuntimeError( logger.error(
f"Failed to process annotation: {clip_annotation.uuid}" "Failed to process annotation: {uuid}. Error {error}",
) from error uuid=clip_annotation.uuid,
error=error,
)
return
_save_xr_dataset_to_file(sample, path) _save_xr_dataset_to_file(sample, path)

View File

@ -17,7 +17,11 @@ from batdetect2.train.augmentations import (
) )
from batdetect2.train.clips import build_clipper from batdetect2.train.clips import build_clipper
from batdetect2.train.config import TrainingConfig from batdetect2.train.config import TrainingConfig
from batdetect2.train.dataset import LabeledDataset, RandomExampleSource from batdetect2.train.dataset import (
LabeledDataset,
RandomExampleSource,
collate_fn,
)
from batdetect2.train.lightning import TrainingModule from batdetect2.train.lightning import TrainingModule
from batdetect2.train.losses import build_loss from batdetect2.train.losses import build_loss
@ -88,6 +92,7 @@ def train(
batch_size=config.batch_size, batch_size=config.batch_size,
shuffle=True, shuffle=True,
num_workers=train_workers, num_workers=train_workers,
collate_fn=collate_fn,
) )
val_dataloader = None val_dataloader = None
@ -101,6 +106,7 @@ def train(
batch_size=config.batch_size, batch_size=config.batch_size,
shuffle=False, shuffle=False,
num_workers=val_workers, num_workers=val_workers,
collate_fn=collate_fn,
) )
trainer.fit( trainer.fit(

View File

@ -1,540 +0,0 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false
# generate-hashes: false
# universal: false
-e file:.
absl-py==2.1.0
# via tensorboard
affine==2.4.0
# via rasterio
aiobotocore==2.12.3
# via s3fs
aiohttp==3.9.5
# via aiobotocore
# via fsspec
# via lightning
# via s3fs
aioitertools==0.11.0
# via aiobotocore
aiosignal==1.3.1
# via aiohttp
annotated-types==0.6.0
# via pydantic
antlr4-python3-runtime==4.9.3
# via hydra-core
# via omegaconf
anyio==4.3.0
# via starlette
arrow==1.3.0
# via lightning
asttokens==2.4.1
# via stack-data
async-timeout==4.0.3
# via aiohttp
# via redis
attrs==23.2.0
# via aiohttp
# via rasterio
audioread==3.0.1
# via librosa
backcall==0.2.0
# via ipython
backoff==2.2.1
# via lightning
beautifulsoup4==4.12.3
# via lightning
bitsandbytes==0.41.0
# via lightning
blessed==1.20.0
# via inquirer
boto3==1.34.69
# via lightning-cloud
botocore==1.34.69
# via aiobotocore
# via boto3
# via s3transfer
certifi==2024.2.2
# via netcdf4
# via rasterio
# via requests
cf-xarray==0.9.0
# via batdetect2
cffi==1.16.0
# via soundfile
cftime==1.6.3
# via netcdf4
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via batdetect2
# via click-plugins
# via cligj
# via lightning
# via lightning-cloud
# via rasterio
# via uvicorn
click-plugins==1.1.1
# via rasterio
cligj==0.7.2
# via rasterio
comm==0.2.2
# via ipykernel
contourpy==1.1.1
# via matplotlib
croniter==1.4.1
# via lightning
cycler==0.12.1
# via matplotlib
cython==3.0.10
# via soundevent
dateutils==0.6.12
# via lightning
debugpy==1.8.1
# via ipykernel
decorator==5.1.1
# via ipython
# via librosa
deepdiff==6.7.1
# via lightning
dnspython==2.6.1
# via email-validator
docker==6.1.3
# via lightning
docstring-parser==0.16
# via jsonargparse
editor==1.6.6
# via inquirer
email-validator==2.1.1
# via soundevent
exceptiongroup==1.2.1
# via anyio
# via pytest
executing==2.0.1
# via stack-data
fastapi==0.110.2
# via lightning
# via lightning-cloud
filelock==3.13.4
# via torch
# via triton
fonttools==4.51.0
# via matplotlib
frozenlist==1.4.1
# via aiohttp
# via aiosignal
fsspec==2023.12.2
# via lightning
# via lightning-fabric
# via pytorch-lightning
# via s3fs
# via torch
grpcio==1.62.2
# via tensorboard
h11==0.14.0
# via uvicorn
hydra-core==1.3.2
# via lightning
idna==3.7
# via anyio
# via email-validator
# via requests
# via yarl
importlib-metadata==7.1.0
# via jupyter-client
# via markdown
# via rasterio
importlib-resources==6.4.0
# via matplotlib
# via typeshed-client
iniconfig==2.0.0
# via pytest
inquirer==3.2.4
# via lightning
ipykernel==6.29.4
ipython==8.12.3
# via ipykernel
jedi==0.19.1
# via ipython
jinja2==3.1.3
# via lightning
# via torch
jmespath==1.0.1
# via boto3
# via botocore
joblib==1.4.0
# via librosa
# via scikit-learn
jsonargparse==4.28.0
# via lightning
jupyter-client==8.6.1
# via ipykernel
jupyter-core==5.7.2
# via ipykernel
# via jupyter-client
kiwisolver==1.4.5
# via matplotlib
lazy-loader==0.4
# via librosa
librosa==0.10.1
# via batdetect2
lightning==2.2.2
# via batdetect2
lightning-api-access==0.0.5
# via lightning
lightning-cloud==0.5.65
# via lightning
lightning-fabric==2.2.2
# via lightning
lightning-utilities==0.11.2
# via lightning
# via lightning-fabric
# via pytorch-lightning
# via torchmetrics
llvmlite==0.41.1
# via numba
markdown==3.6
# via tensorboard
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.5
# via jinja2
# via werkzeug
matplotlib==3.7.5
# via batdetect2
# via lightning
# via soundevent
matplotlib-inline==0.1.7
# via ipykernel
# via ipython
mdurl==0.1.2
# via markdown-it-py
mpmath==1.3.0
# via sympy
msgpack==1.0.8
# via librosa
multidict==6.0.5
# via aiohttp
# via yarl
nest-asyncio==1.6.0
# via ipykernel
netcdf4==1.6.5
# via batdetect2
networkx==3.1
# via torch
numba==0.58.1
# via librosa
numpy==1.24.4
# via batdetect2
# via cftime
# via contourpy
# via librosa
# via lightning
# via lightning-fabric
# via matplotlib
# via netcdf4
# via numba
# via onnx
# via pandas
# via pytorch-lightning
# via rasterio
# via scikit-learn
# via scipy
# via shapely
# via snuggs
# via soxr
# via tensorboard
# via tensorboardx
# via torchmetrics
# via torchvision
# via xarray
nvidia-cublas-cu12==12.1.3.1
# via nvidia-cudnn-cu12
# via nvidia-cusolver-cu12
# via torch
nvidia-cuda-cupti-cu12==12.1.105
# via torch
nvidia-cuda-nvrtc-cu12==12.1.105
# via torch
nvidia-cuda-runtime-cu12==12.1.105
# via torch
nvidia-cudnn-cu12==8.9.2.26
# via torch
nvidia-cufft-cu12==11.0.2.54
# via torch
nvidia-curand-cu12==10.3.2.106
# via torch
nvidia-cusolver-cu12==11.4.5.107
# via torch
nvidia-cusparse-cu12==12.1.0.106
# via nvidia-cusolver-cu12
# via torch
nvidia-nccl-cu12==2.19.3
# via torch
nvidia-nvjitlink-cu12==12.4.127
# via nvidia-cusolver-cu12
# via nvidia-cusparse-cu12
nvidia-nvtx-cu12==12.1.105
# via torch
omegaconf==2.3.0
# via hydra-core
# via lightning
onnx==1.16.0
# via batdetect2
ordered-set==4.1.0
# via deepdiff
packaging==24.0
# via docker
# via hydra-core
# via ipykernel
# via lazy-loader
# via lightning
# via lightning-fabric
# via lightning-utilities
# via matplotlib
# via pooch
# via pytest
# via pytorch-lightning
# via tensorboardx
# via torchmetrics
# via xarray
pandas==2.0.3
# via batdetect2
# via xarray
parso==0.8.4
# via jedi
pexpect==4.9.0
# via ipython
pickleshare==0.7.5
# via ipython
pillow==10.3.0
# via matplotlib
# via torchvision
platformdirs==4.2.0
# via jupyter-core
# via pooch
pluggy==1.4.0
# via pytest
pooch==1.8.1
# via librosa
prompt-toolkit==3.0.43
# via ipython
protobuf==5.26.1
# via onnx
# via tensorboard
# via tensorboardx
psutil==5.9.8
# via ipykernel
# via lightning
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
# via stack-data
pycparser==2.22
# via cffi
pydantic==2.7.0
# via fastapi
# via lightning
# via soundevent
pydantic-core==2.18.1
# via pydantic
pygments==2.17.2
# via ipython
# via rich
pyjwt==2.8.0
# via lightning-cloud
pyparsing==3.1.2
# via matplotlib
# via snuggs
pytest==8.1.1
python-dateutil==2.9.0.post0
# via arrow
# via botocore
# via croniter
# via dateutils
# via jupyter-client
# via matplotlib
# via pandas
python-multipart==0.0.9
# via lightning
# via lightning-cloud
pytorch-lightning==2.2.2
# via batdetect2
# via lightning
pytz==2024.1
# via dateutils
# via pandas
pyyaml==6.0.1
# via jsonargparse
# via lightning
# via omegaconf
# via pytorch-lightning
pyzmq==26.0.0
# via ipykernel
# via jupyter-client
rasterio==1.3.10
# via soundevent
readchar==4.0.6
# via inquirer
redis==5.0.4
# via lightning
requests==2.31.0
# via docker
# via fsspec
# via lightning
# via lightning-cloud
# via pooch
rich==13.7.1
# via lightning
# via lightning-cloud
runs==1.2.2
# via editor
s3fs==2023.12.2
# via lightning
s3transfer==0.10.1
# via boto3
scikit-learn==1.3.2
# via batdetect2
# via librosa
scipy==1.10.1
# via batdetect2
# via librosa
# via scikit-learn
# via soundevent
setuptools==69.5.1
# via lightning-utilities
# via rasterio
# via readchar
# via tensorboard
shapely==2.0.3
# via soundevent
six==1.16.0
# via asttokens
# via blessed
# via lightning-cloud
# via python-dateutil
# via tensorboard
sniffio==1.3.1
# via anyio
snuggs==1.4.7
# via rasterio
soundevent==2.0.1
# via batdetect2
soundfile==0.12.1
# via librosa
# via soundevent
soupsieve==2.5
# via beautifulsoup4
soxr==0.3.7
# via librosa
stack-data==0.6.3
# via ipython
starlette==0.37.2
# via fastapi
# via lightning
sympy==1.12
# via torch
tensorboard==2.16.2
# via batdetect2
tensorboard-data-server==0.7.2
# via tensorboard
tensorboardx==2.6.2.2
# via lightning
threadpoolctl==3.4.0
# via scikit-learn
tomli==2.0.1
# via pytest
torch==2.2.2
# via batdetect2
# via lightning
# via lightning-fabric
# via pytorch-lightning
# via torchaudio
# via torchmetrics
# via torchvision
torchaudio==2.2.2
# via batdetect2
torchmetrics==1.3.2
# via lightning
# via pytorch-lightning
torchvision==0.17.2
# via batdetect2
tornado==6.4
# via ipykernel
# via jupyter-client
tqdm==4.66.2
# via batdetect2
# via lightning
# via pytorch-lightning
traitlets==5.14.2
# via comm
# via ipykernel
# via ipython
# via jupyter-client
# via jupyter-core
# via lightning
# via matplotlib-inline
triton==2.2.0
# via torch
types-python-dateutil==2.9.0.20240316
# via arrow
typeshed-client==2.5.1
# via jsonargparse
typing-extensions==4.11.0
# via aioitertools
# via anyio
# via fastapi
# via ipython
# via jsonargparse
# via librosa
# via lightning
# via lightning-fabric
# via lightning-utilities
# via pydantic
# via pydantic-core
# via pytorch-lightning
# via starlette
# via torch
# via typeshed-client
# via uvicorn
tzdata==2024.1
# via pandas
urllib3==1.26.18
# via botocore
# via docker
# via lightning
# via lightning-cloud
# via requests
uvicorn==0.29.0
# via lightning
# via lightning-cloud
wcwidth==0.2.13
# via blessed
# via prompt-toolkit
websocket-client==1.7.0
# via docker
# via lightning
# via lightning-cloud
websockets==11.0.3
# via lightning
werkzeug==3.0.2
# via tensorboard
wrapt==1.16.0
# via aiobotocore
xarray==2023.1.0
# via cf-xarray
# via soundevent
xmod==1.8.1
# via editor
# via runs
yarl==1.9.4
# via aiohttp
zipp==3.18.1
# via importlib-metadata
# via importlib-resources

View File

@ -1,470 +0,0 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false
# generate-hashes: false
# universal: false
-e file:.
absl-py==2.1.0
# via tensorboard
affine==2.4.0
# via rasterio
aiobotocore==2.12.3
# via s3fs
aiohttp==3.9.5
# via aiobotocore
# via fsspec
# via lightning
# via s3fs
aioitertools==0.11.0
# via aiobotocore
aiosignal==1.3.1
# via aiohttp
annotated-types==0.6.0
# via pydantic
antlr4-python3-runtime==4.9.3
# via hydra-core
# via omegaconf
anyio==4.3.0
# via starlette
arrow==1.3.0
# via lightning
async-timeout==4.0.3
# via aiohttp
# via redis
attrs==23.2.0
# via aiohttp
# via rasterio
audioread==3.0.1
# via librosa
backoff==2.2.1
# via lightning
beautifulsoup4==4.12.3
# via lightning
bitsandbytes==0.41.0
# via lightning
blessed==1.20.0
# via inquirer
boto3==1.34.69
# via lightning-cloud
botocore==1.34.69
# via aiobotocore
# via boto3
# via s3transfer
certifi==2024.2.2
# via netcdf4
# via rasterio
# via requests
cf-xarray==0.9.0
# via batdetect2
cffi==1.16.0
# via soundfile
cftime==1.6.3
# via netcdf4
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via batdetect2
# via click-plugins
# via cligj
# via lightning
# via lightning-cloud
# via rasterio
# via uvicorn
click-plugins==1.1.1
# via rasterio
cligj==0.7.2
# via rasterio
contourpy==1.1.1
# via matplotlib
croniter==1.4.1
# via lightning
cycler==0.12.1
# via matplotlib
cython==3.0.10
# via soundevent
dateutils==0.6.12
# via lightning
decorator==5.1.1
# via librosa
deepdiff==6.7.1
# via lightning
dnspython==2.6.1
# via email-validator
docker==6.1.3
# via lightning
docstring-parser==0.16
# via jsonargparse
editor==1.6.6
# via inquirer
email-validator==2.1.1
# via soundevent
exceptiongroup==1.2.1
# via anyio
fastapi==0.110.2
# via lightning
# via lightning-cloud
filelock==3.13.4
# via torch
# via triton
fonttools==4.51.0
# via matplotlib
frozenlist==1.4.1
# via aiohttp
# via aiosignal
fsspec==2023.12.2
# via lightning
# via lightning-fabric
# via pytorch-lightning
# via s3fs
# via torch
grpcio==1.62.2
# via tensorboard
h11==0.14.0
# via uvicorn
hydra-core==1.3.2
# via lightning
idna==3.7
# via anyio
# via email-validator
# via requests
# via yarl
importlib-metadata==7.1.0
# via markdown
# via rasterio
importlib-resources==6.4.0
# via matplotlib
# via typeshed-client
inquirer==3.2.4
# via lightning
jinja2==3.1.3
# via lightning
# via torch
jmespath==1.0.1
# via boto3
# via botocore
joblib==1.4.0
# via librosa
# via scikit-learn
jsonargparse==4.28.0
# via lightning
kiwisolver==1.4.5
# via matplotlib
lazy-loader==0.4
# via librosa
librosa==0.10.1
# via batdetect2
lightning==2.2.2
# via batdetect2
lightning-api-access==0.0.5
# via lightning
lightning-cloud==0.5.65
# via lightning
lightning-fabric==2.2.2
# via lightning
lightning-utilities==0.11.2
# via lightning
# via lightning-fabric
# via pytorch-lightning
# via torchmetrics
llvmlite==0.41.1
# via numba
markdown==3.6
# via tensorboard
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.5
# via jinja2
# via werkzeug
matplotlib==3.7.5
# via batdetect2
# via lightning
# via soundevent
mdurl==0.1.2
# via markdown-it-py
mpmath==1.3.0
# via sympy
msgpack==1.0.8
# via librosa
multidict==6.0.5
# via aiohttp
# via yarl
netcdf4==1.6.5
# via batdetect2
networkx==3.1
# via torch
numba==0.58.1
# via librosa
numpy==1.24.4
# via batdetect2
# via cftime
# via contourpy
# via librosa
# via lightning
# via lightning-fabric
# via matplotlib
# via netcdf4
# via numba
# via onnx
# via pandas
# via pytorch-lightning
# via rasterio
# via scikit-learn
# via scipy
# via shapely
# via snuggs
# via soxr
# via tensorboard
# via tensorboardx
# via torchmetrics
# via torchvision
# via xarray
nvidia-cublas-cu12==12.1.3.1
# via nvidia-cudnn-cu12
# via nvidia-cusolver-cu12
# via torch
nvidia-cuda-cupti-cu12==12.1.105
# via torch
nvidia-cuda-nvrtc-cu12==12.1.105
# via torch
nvidia-cuda-runtime-cu12==12.1.105
# via torch
nvidia-cudnn-cu12==8.9.2.26
# via torch
nvidia-cufft-cu12==11.0.2.54
# via torch
nvidia-curand-cu12==10.3.2.106
# via torch
nvidia-cusolver-cu12==11.4.5.107
# via torch
nvidia-cusparse-cu12==12.1.0.106
# via nvidia-cusolver-cu12
# via torch
nvidia-nccl-cu12==2.19.3
# via torch
nvidia-nvjitlink-cu12==12.4.127
# via nvidia-cusolver-cu12
# via nvidia-cusparse-cu12
nvidia-nvtx-cu12==12.1.105
# via torch
omegaconf==2.3.0
# via hydra-core
# via lightning
onnx==1.16.0
# via batdetect2
ordered-set==4.1.0
# via deepdiff
packaging==24.0
# via docker
# via hydra-core
# via lazy-loader
# via lightning
# via lightning-fabric
# via lightning-utilities
# via matplotlib
# via pooch
# via pytorch-lightning
# via tensorboardx
# via torchmetrics
# via xarray
pandas==2.0.3
# via batdetect2
# via xarray
pillow==10.3.0
# via matplotlib
# via torchvision
platformdirs==4.2.0
# via pooch
pooch==1.8.1
# via librosa
protobuf==5.26.1
# via onnx
# via tensorboard
# via tensorboardx
psutil==5.9.8
# via lightning
pycparser==2.22
# via cffi
pydantic==2.7.0
# via fastapi
# via lightning
# via soundevent
pydantic-core==2.18.1
# via pydantic
pygments==2.17.2
# via rich
pyjwt==2.8.0
# via lightning-cloud
pyparsing==3.1.2
# via matplotlib
# via snuggs
python-dateutil==2.9.0.post0
# via arrow
# via botocore
# via croniter
# via dateutils
# via matplotlib
# via pandas
python-multipart==0.0.9
# via lightning
# via lightning-cloud
pytorch-lightning==2.2.2
# via batdetect2
# via lightning
pytz==2024.1
# via dateutils
# via pandas
pyyaml==6.0.1
# via jsonargparse
# via lightning
# via omegaconf
# via pytorch-lightning
rasterio==1.3.10
# via soundevent
readchar==4.0.6
# via inquirer
redis==5.0.4
# via lightning
requests==2.31.0
# via docker
# via fsspec
# via lightning
# via lightning-cloud
# via pooch
rich==13.7.1
# via lightning
# via lightning-cloud
runs==1.2.2
# via editor
s3fs==2023.12.2
# via lightning
s3transfer==0.10.1
# via boto3
scikit-learn==1.3.2
# via batdetect2
# via librosa
scipy==1.10.1
# via batdetect2
# via librosa
# via scikit-learn
# via soundevent
setuptools==69.5.1
# via lightning-utilities
# via rasterio
# via readchar
# via tensorboard
shapely==2.0.3
# via soundevent
six==1.16.0
# via blessed
# via lightning-cloud
# via python-dateutil
# via tensorboard
sniffio==1.3.1
# via anyio
snuggs==1.4.7
# via rasterio
soundevent==2.0.1
# via batdetect2
soundfile==0.12.1
# via librosa
# via soundevent
soupsieve==2.5
# via beautifulsoup4
soxr==0.3.7
# via librosa
starlette==0.37.2
# via fastapi
# via lightning
sympy==1.12
# via torch
tensorboard==2.16.2
# via batdetect2
tensorboard-data-server==0.7.2
# via tensorboard
tensorboardx==2.6.2.2
# via lightning
threadpoolctl==3.4.0
# via scikit-learn
torch==2.2.2
# via batdetect2
# via lightning
# via lightning-fabric
# via pytorch-lightning
# via torchaudio
# via torchmetrics
# via torchvision
torchaudio==2.2.2
# via batdetect2
torchmetrics==1.3.2
# via lightning
# via pytorch-lightning
torchvision==0.17.2
# via batdetect2
tqdm==4.66.2
# via batdetect2
# via lightning
# via pytorch-lightning
traitlets==5.14.3
# via lightning
triton==2.2.0
# via torch
types-python-dateutil==2.9.0.20240316
# via arrow
typeshed-client==2.5.1
# via jsonargparse
typing-extensions==4.11.0
# via aioitertools
# via anyio
# via fastapi
# via jsonargparse
# via librosa
# via lightning
# via lightning-fabric
# via lightning-utilities
# via pydantic
# via pydantic-core
# via pytorch-lightning
# via starlette
# via torch
# via typeshed-client
# via uvicorn
tzdata==2024.1
# via pandas
urllib3==1.26.18
# via botocore
# via docker
# via lightning
# via lightning-cloud
# via requests
uvicorn==0.29.0
# via lightning
# via lightning-cloud
wcwidth==0.2.13
# via blessed
websocket-client==1.7.0
# via docker
# via lightning
# via lightning-cloud
websockets==11.0.3
# via lightning
werkzeug==3.0.2
# via tensorboard
wrapt==1.16.0
# via aiobotocore
xarray==2023.1.0
# via cf-xarray
# via soundevent
xmod==1.8.1
# via editor
# via runs
yarl==1.9.4
# via aiohttp
zipp==3.18.1
# via importlib-metadata
# via importlib-resources