API Reference

Estimator

Classes

BaseEstimator

Base estimator class that all estimators should inherit from.

ConfigurableBaseEstimator

Extension of the base estimator which allows to manage a single model that uses the lightkit.nn.Configurable mixin.

Mixins

TransformerMixin

Mixin that provides a fit_transform method that chains fitting the estimator and transforming the data it was fitted on.

PredictorMixin

Mixin that provides a fit_predict method that chains fitting the estimator and making predictions for the data it was fitted on.

Modules

Classes

Configurable

A mixin for any PyTorch module to extend it with storage capabilities.

Data Handling

Classes

DataLoader

Extension for PyTorch's builtin dataloader.

RangeBatchSampler

Sampler providing batches of contiguous indices.

Type Aliases

TensorLike

Type annotation for functions accepting any kind of tensor data as input.

DataLoaderLike

Generic type annotation for functions accepting any data loader as input.

Functions

dataset_from_tensors

Transforms a set of tensor-like items into a datasets.

collate_tuple

Collate a tuple of batch items by returning the input tuple.

collate_tensor

Collates a tuple of batch items into the first tensor.