def split_lvis(
    n_experiences: int,
    train_transform=None,
    eval_transform=None,
    shuffle=True,
    root_path: Union[str, Path] = None,
):
    """
    Creates the example Split LVIS benchmark.

    This is a toy benchmark created only to show how a detection benchmark can
    be created. It was not meant to be used for research purposes!

    :param n_experiences: The number of train experiences to create.
    :param train_transform: The train transformation.
    :param eval_transform: The eval transformation.
    :param shuffle: If True, the dataset will be split randomly
    :param root_path: The root path of the dataset. Defaults to None,
        which means that the default path will be used.
    :return: A :class:`DetectionScenario` instance.
    """

    train_dataset = LvisDataset(root=root_path, train=True)
    val_dataset = LvisDataset(root=root_path, train=False)

    all_cat_ids = set(train_dataset.lvis_api.get_cat_ids())
    all_cat_ids.union(val_dataset.lvis_api.get_cat_ids())

    return split_detection_benchmark(
        n_experiences=n_experiences,
        train_dataset=train_dataset,
        test_dataset=val_dataset,
        n_classes=len(all_cat_ids),
        train_transform=train_transform,
        eval_transform=eval_transform,
        shuffle=shuffle,
    )

    Creates the example Split LVIS benchmark.

    This is a toy benchmark created only to show how a detection benchmark can
    be created. It was not meant to be used for research purposes!

    :param n_experiences: The number of train experiences to create.
    :param train_transform: The train transformation.
    :param eval_transform: The eval transformation.
    :param shuffle: If True, the dataset will be split randomly
    :param root_path: The root path of the dataset. Defaults to None,
        which means that the default path will be used.
    :return: A :class:`DetectionScenario` instance.
    
examples/detection_lvis.py