def instantiate_classes(self) -> None:
        """Instantiates the classes using settings from self.config."""
        sub_config = self.config.get("subcommand")
        self.datamodule = self._subcommand_builders[sub_config](**self.config.get(sub_config))

        for datamodule_attribute in self.datamodule_attributes:
            if (
                datamodule_attribute in self.config["model"]
                and getattr(self.datamodule, datamodule_attribute, None) is not None
            ):
                self.config["model"][datamodule_attribute] = getattr(self.datamodule, datamodule_attribute)
        self.config_init = self.parser.instantiate_classes(self.config)
        self.model = self.config_init["model"]
        self.instantiate_trainer()
Instantiates the classes using settings from self.config.
src/flash/core/utilities/flash_cli.py