Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.1] - 2026-05-17

### Fixed

- **`import incerto` fails without `[vision]` extra** (regression in 0.1.0).
`incerto.data.__init__` eagerly imported torchvision-dependent submodules
(`vision`, `ood_benchmarks`) at package import time, breaking the base
install for every user who didn't install `incerto[vision]`. Vision-related
symbols are now imported conditionally; calling them without the extra
still raises a clear ImportError, but the rest of the package imports
cleanly. ([incerto/data/__init__.py](incerto/data/__init__.py))

### Notes

- **0.1.0 has been deleted from PyPI** due to the broken base install above.
Per PyPI policy, the 0.1.0 version number remains permanently reserved and
cannot be reused. 0.1.1 is the first installable release; use
`pip install incerto` (which now resolves to 0.1.1 or later).

## [0.1.0] - 2026-05-15

Initial release of incerto, a comprehensive Python library for uncertainty quantification in machine learning.
Expand Down
2 changes: 1 addition & 1 deletion incerto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- active: Active learning for efficient data labeling
"""

__version__ = "0.1.0"
__version__ = "0.1.1"

# Core utilities
# Submodules - import them so users can do `from incerto import calibration`
Expand Down
92 changes: 48 additions & 44 deletions incerto/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
Data utilities for uncertainty quantification.

This module provides:
- Standard vision datasets with consistent splits
- OOD detection benchmarks
- Standard vision datasets with consistent splits (requires ``incerto[vision]``)
- OOD detection benchmarks (requires ``incerto[vision]``)
- Data loading utilities
- Dataset manipulation tools
"""

# Vision datasets
# Data loaders
# Always available — pure torch / numpy, no extras required.
from .loaders import (
InfiniteDataLoader,
create_balanced_dataloader,
Expand All @@ -18,20 +17,6 @@
create_ood_dataloader,
get_dataloader_stats,
)

# OOD benchmarks
from .ood_benchmarks import (
CIFAR10_vs_CIFAR100,
CIFAR10_vs_SVHN,
CorruptedDataOOD,
MNIST_vs_FashionMNIST,
MNIST_vs_NotMNIST,
OODBenchmark,
SubclassOOD,
get_ood_benchmark,
)

# Dataset utilities
from .utils import (
LabelNoiseDataset,
TransformDataset,
Expand All @@ -43,40 +28,57 @@
split_dataset,
subsample_dataset,
)
from .vision import (
CIFAR10,
CIFAR100,
MNIST,
SVHN,
FashionMNIST,
VisionDataset,
)

# Torchvision-dependent — only exposed when ``incerto[vision]`` is installed.
# Attempting to use these without the extra raises a clear ImportError at the
# call site (see ``vision.py`` / ``ood_benchmarks.py``).
# The ``import X as X`` form is the standard re-export idiom that tools
# (ruff F401, pyright) recognise so they don't flag these as unused.
try:
from .ood_benchmarks import CIFAR10_vs_CIFAR100 as CIFAR10_vs_CIFAR100
from .ood_benchmarks import CIFAR10_vs_SVHN as CIFAR10_vs_SVHN
from .ood_benchmarks import CorruptedDataOOD as CorruptedDataOOD
from .ood_benchmarks import MNIST_vs_FashionMNIST as MNIST_vs_FashionMNIST
from .ood_benchmarks import MNIST_vs_NotMNIST as MNIST_vs_NotMNIST
from .ood_benchmarks import OODBenchmark as OODBenchmark
from .ood_benchmarks import SubclassOOD as SubclassOOD
from .ood_benchmarks import get_ood_benchmark as get_ood_benchmark
from .vision import CIFAR10 as CIFAR10
from .vision import CIFAR100 as CIFAR100
from .vision import MNIST as MNIST
from .vision import SVHN as SVHN
from .vision import FashionMNIST as FashionMNIST
from .vision import VisionDataset as VisionDataset

_VISION_NAMES = [
"VisionDataset",
"MNIST",
"FashionMNIST",
"CIFAR10",
"CIFAR100",
"SVHN",
"OODBenchmark",
"MNIST_vs_FashionMNIST",
"CIFAR10_vs_CIFAR100",
"CIFAR10_vs_SVHN",
"MNIST_vs_NotMNIST",
"SubclassOOD",
"CorruptedDataOOD",
"get_ood_benchmark",
]
except ImportError:
_VISION_NAMES = []


__all__ = [
# Vision datasets
"VisionDataset",
"MNIST",
"FashionMNIST",
"CIFAR10",
"CIFAR100",
"SVHN",
# OOD benchmarks
"OODBenchmark",
"MNIST_vs_FashionMNIST",
"CIFAR10_vs_CIFAR100",
"CIFAR10_vs_SVHN",
"MNIST_vs_NotMNIST",
"SubclassOOD",
"CorruptedDataOOD",
"get_ood_benchmark",
# Data loaders
# Data loaders (always available)
"create_dataloaders",
"create_balanced_dataloader",
"create_ood_dataloader",
"create_calibration_loaders",
"InfiniteDataLoader",
"get_dataloader_stats",
# Dataset utilities
# Dataset utilities (always available)
"split_dataset",
"filter_dataset_by_class",
"get_class_balanced_subset",
Expand All @@ -86,4 +88,6 @@
"LabelNoiseDataset",
"merge_datasets",
"subsample_dataset",
# Vision (require incerto[vision]; populated only when installed)
*_VISION_NAMES,
]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "incerto"
version = "0.1.0"
version = "0.1.1"
description = "A library for uncertainty quantification in machine learning"
authors = [{ name="Stephan Rabanser", email="rabanser@princeton.edu" }]
readme = "README.md"
Expand Down
Loading