def _create_summary_callback_deprecated(weights_summary: str) -> ModelSummary:
    """Constructs summary callback from the deprecated ``weights_summary`` argument.

    The ``weights_summary`` trainer argument was deprecated with the release
    of pytorch lightning 1.7 in 08/2022. Support for this will be removed
    in the future.

    Args:
        weights_summary:
            The deprecated `weights_summary` argument value ("top" or "full").

    Returns:
        ModelSummary: The initialized model summary callback based on the `weights_summary` argument.

    Raises:
        ValueError: If an invalid value is provided for `weights_summary`.

    """
    print_as_warning(
        "The configuration parameter 'trainer.weights_summary' is deprecated."
        " Please use 'trainer.weights_summary: True' and set"
        " 'checkpoint_callback.max_depth' to value 1 for the option 'top'"
        " or -1 for the option 'full'."
    )
    if weights_summary == "top":
        max_depth = 1
    elif weights_summary == "full":
        max_depth = -1
    else:
        raise ValueError(
            "Invalid value for the deprecated trainer.weights_summary"
            " configuration parameter."
        )
    return _create_summary_callback(max_depth=max_depth)
Constructs summary callback from the deprecated ``weights_summary`` argument.

    The ``weights_summary`` trainer argument was deprecated with the release
    of pytorch lightning 1.7 in 08/2022. Support for this will be removed
    in the future.

    Args:
        weights_summary:
            The deprecated `weights_summary` argument value ("top" or "full").

    Returns:
        ModelSummary: The initialized model summary callback based on the `weights_summary` argument.

    Raises:
        ValueError: If an invalid value is provided for `weights_summary`.

    
lightly/embedding/callbacks.py