def __init__(
        self,
        model_class: Type[pl.LightningModule],
        datamodule_class: Type["flash.DataModule"],
        trainer_class: Type[pl.Trainer] = flash.Trainer,
        default_datamodule_builder: Optional[Callable] = None,
        additional_datamodule_builders: Optional[List[Callable]] = None,
        default_arguments=None,
        finetune=True,
        datamodule_attributes=None,
        **kwargs: Any,
    ) -> None:
        """Flash's extension of the :class:`pytorch_lightning.utilities.cli.LightningCLI`

        Args:
            model_class: The :class:`pytorch_lightning.LightningModule` class to train on.
            datamodule_class: The :class:`~flash.data.data_module.DataModule` class.
            trainer_class: An optional extension of the :class:`pytorch_lightning.Trainer` class.
            trainer_fn: The trainer function to run.
            input: Use this if your ``DataModule`` is created using a classmethod. Any of:
                - ``None``. The ``datamodule_class.__init__`` signature will be used.
                - ``str``. One of :class:`~flash.data.io.input.InputFormat`. This will use the signature of
                    the corresponding ``DataModule.from_*`` method.
                - ``Callable``. A custom method.
            kwargs: See the parent arguments

        """
        if datamodule_attributes is None:
            datamodule_attributes = {"num_classes"}
        self.datamodule_attributes = datamodule_attributes

        self.default_datamodule_builder = default_datamodule_builder
        self.additional_datamodule_builders = additional_datamodule_builders or []
        self.default_arguments = default_arguments or {}
        self.finetune = finetune

        model_class = make_args_optional(model_class, self.datamodule_attributes)
        self.local_datamodule_class = datamodule_class

        self._subcommand_builders = {}

        super().__init__(
            drop_kwargs(model_class),
            datamodule_class=None,
            save_config_callback=functools.partial(ModelExcludeSaveConfigCallback, exclude_list=datamodule_attributes),
            trainer_class=trainer_class,
            **kwargs,
        )
Flash's extension of the :class:`pytorch_lightning.utilities.cli.LightningCLI`

        Args:
            model_class: The :class:`pytorch_lightning.LightningModule` class to train on.
            datamodule_class: The :class:`~flash.data.data_module.DataModule` class.
            trainer_class: An optional extension of the :class:`pytorch_lightning.Trainer` class.
            trainer_fn: The trainer function to run.
            input: Use this if your ``DataModule`` is created using a classmethod. Any of:
                - ``None``. The ``datamodule_class.__init__`` signature will be used.
                - ``str``. One of :class:`~flash.data.io.input.InputFormat`. This will use the signature of
                    the corresponding ``DataModule.from_*`` method.
                - ``Callable``. A custom method.
            kwargs: See the parent arguments

        
src/flash/core/utilities/flash_cli.py