---
url: /dev/api/sklink.exceptions.md
description: >-
  API reference of sklink.exceptions. Exceptions and warnings raised by
  scikit-link.
---

::: v-pre

# `sklink.exceptions` {#sklink.exceptions}

Exceptions and warnings raised by scikit-link.

Every exception also derives from the standard exception a scikit-learn user
would expect (`ValueError` or `RuntimeError`), so code that catches the
standard type keeps working. Messages name tables, columns, relationships or
expressions and never contain row values.

**Classes:**

* [**BackendError**](#sklink.exceptions.BackendError): The evaluation backend is unavailable or failed.
* [**DetachedDatabaseError**](#sklink.exceptions.DetachedDatabaseError): An estimator was used after [`sklink.detach`](./sklink#sklink.detach) without a new database.
* [**InconsistentVersionWarning**](#sklink.exceptions.InconsistentVersionWarning): A model saved with another version of scikit-link was loaded.
* [**IntegrityError**](#sklink.exceptions.IntegrityError): The data violates a declared key or relationship.
* [**LeakageWarning**](#sklink.exceptions.LeakageWarning): A configuration may leak information between samples or from the future.
* [**PerformanceWarning**](#sklink.exceptions.PerformanceWarning): An operation is likely to be slow or memory hungry.
* [**SchemaError**](#sklink.exceptions.SchemaError): A table, column, relationship or expression does not match the schema.
* [**SklinkError**](#sklink.exceptions.SklinkError): Base class of every exception raised by scikit-link.
* [**SklinkWarning**](#sklink.exceptions.SklinkWarning): Base class of every warning emitted by scikit-link.
* [**UnknownEntityError**](#sklink.exceptions.UnknownEntityError): Keys of the population table do not exist in the entity table.
* [**VisibilityError**](#sklink.exceptions.VisibilityError): A model is evaluated under a visibility policy it was not fitted with.

## `sklink.exceptions.BackendError` {#sklink.exceptions.BackendError}

Bases: [SklinkError](#sklink.exceptions.SklinkError), [RuntimeError](https://docs.python.org/3/library/exceptions.html#RuntimeError)

The evaluation backend is unavailable or failed.

## `sklink.exceptions.DetachedDatabaseError` {#sklink.exceptions.DetachedDatabaseError}

Bases: [SklinkError](#sklink.exceptions.SklinkError), [RuntimeError](https://docs.python.org/3/library/exceptions.html#RuntimeError)

An estimator was used after [`sklink.detach`](./sklink#sklink.detach) without a new database.

## `sklink.exceptions.InconsistentVersionWarning` {#sklink.exceptions.InconsistentVersionWarning}

```python
InconsistentVersionWarning(*, estimator_name: str, current_version: str, original_version: str) -> None
```

Bases: [SklinkWarning](#sklink.exceptions.SklinkWarning)

A model saved with another version of scikit-link was loaded.

Fitted estimators keep the version of scikit-link that saved them. Loading
one with another version may fail or give other results, as with
scikit-learn's own estimators: refit the model, or load it with the
version that saved it.

**Parameters:**

* **estimator_name** ([str](https://docs.python.org/3/library/stdtypes.html#str)): Class name of the estimator.
* **current_version** ([str](https://docs.python.org/3/library/stdtypes.html#str)): Version of scikit-link that loads the estimator.
* **original_version** ([str](https://docs.python.org/3/library/stdtypes.html#str)): Version of scikit-link that saved it.

**Attributes:**

* [**current_version**](#sklink.exceptions.InconsistentVersionWarning.current_version):
* [**estimator_name**](#sklink.exceptions.InconsistentVersionWarning.estimator_name):
* [**original_version**](#sklink.exceptions.InconsistentVersionWarning.original_version):

### `sklink.exceptions.InconsistentVersionWarning.current_version` {#sklink.exceptions.InconsistentVersionWarning.current_version}

```python
current_version = current_version
```

### `sklink.exceptions.InconsistentVersionWarning.estimator_name` {#sklink.exceptions.InconsistentVersionWarning.estimator_name}

```python
estimator_name = estimator_name
```

### `sklink.exceptions.InconsistentVersionWarning.original_version` {#sklink.exceptions.InconsistentVersionWarning.original_version}

```python
original_version = original_version
```

## `sklink.exceptions.IntegrityError` {#sklink.exceptions.IntegrityError}

Bases: [SklinkError](#sklink.exceptions.SklinkError), [ValueError](https://docs.python.org/3/library/exceptions.html#ValueError)

The data violates a declared key or relationship.

## `sklink.exceptions.LeakageWarning` {#sklink.exceptions.LeakageWarning}

Bases: [SklinkWarning](#sklink.exceptions.SklinkWarning)

A configuration may leak information between samples or from the future.

## `sklink.exceptions.PerformanceWarning` {#sklink.exceptions.PerformanceWarning}

Bases: [SklinkWarning](#sklink.exceptions.SklinkWarning)

An operation is likely to be slow or memory hungry.

## `sklink.exceptions.SchemaError` {#sklink.exceptions.SchemaError}

Bases: [SklinkError](#sklink.exceptions.SklinkError), [ValueError](https://docs.python.org/3/library/exceptions.html#ValueError)

A table, column, relationship or expression does not match the schema.

## `sklink.exceptions.SklinkError` {#sklink.exceptions.SklinkError}

Bases: [Exception](https://docs.python.org/3/library/exceptions.html#Exception)

Base class of every exception raised by scikit-link.

## `sklink.exceptions.SklinkWarning` {#sklink.exceptions.SklinkWarning}

Bases: [UserWarning](https://docs.python.org/3/library/exceptions.html#UserWarning)

Base class of every warning emitted by scikit-link.

## `sklink.exceptions.UnknownEntityError` {#sklink.exceptions.UnknownEntityError}

Bases: [SklinkError](#sklink.exceptions.SklinkError), [ValueError](https://docs.python.org/3/library/exceptions.html#ValueError)

Keys of the population table do not exist in the entity table.

## `sklink.exceptions.VisibilityError` {#sklink.exceptions.VisibilityError}

Bases: [SklinkError](#sklink.exceptions.SklinkError), [ValueError](https://docs.python.org/3/library/exceptions.html#ValueError)

A model is evaluated under a visibility policy it was not fitted with.

:::
