# migration

Python API: `luxonis_ml.data.datasets.migration`

## Classes

### LDF_1_0_0_MetadataDict

Metadata dictionary used by LDF 1.0.0.

#### Attributes

##### categorical_encodings

Categorical metadata encodings.

##### classes

Class names keyed by old task names.

##### ldf_version

LDF version string.

##### metadata_types

Metadata value types.

##### skeletons

Keypoint skeletons keyed by task name.

##### source

Source metadata dictionary.

##### tasks

Task types keyed by old task names.

## Functions

### migrate_dataframe

```python
def migrate_dataframe(df: pl.LazyFrame | pl.DataFrame) -> pl.LazyFrame | pl.DataFrame:
```

### migrate_metadata

```python
def migrate_metadata(metadata: LDF_1_0_0_MetadataDict, df: pl.LazyFrame | None) -> Metadata:
```

Migrate LDF 1.0.0 metadata to the current schema.

Parameters

 * `metadata` (`LDF_1_0_0_MetadataDict`): Metadata dictionary in the LDF 1.0.0 layout.
 * `df` (`pl.LazyFrame | None`): Optional annotation dataframe used to infer task names for non-default datasets.

Returns

 * `Metadata`: Migrated metadata model.

Raises

 * `ValueError`: If task inference requires annotation rows but `df` is `None`.

## Attributes

### LDF_1_0_0_TASK_TYPES

### LDF_1_0_0_TASKS
