class_docstr: The AppConfig holds configuration metadata for the application.
  
  Args:
      name: Optional name of the application. If not provided, auto-generates a new name.
class_docstr_tok: ["The","AppConfig","holds","configuration","metadata","for","the","application",".","Args",":","name",":","Optional","name","of","the","application",".","If","not","provided",",","auto-generates","a","new","name","."]
docstr: Save the configuration to a file '.lightning' to the given folder in YAML format.
docstr_tok: ["Save","the","configuration","to","a","file","'.lightning","'","to","the","given","folder","in","YAML","format","."]
code: def save_to_dir(self, directory: Union[str, pathlib.Path]) -> None:
      """Save the configuration to a file '.lightning' to the given folder in YAML format."""
      self.save_to_file(_get_config_file(directory))
  
file_path: pytorch-lightning/src/lightning/app/utilities/packaging/app_config.py
imports: import pathlib
  from dataclasses import asdict, dataclass, field
  from typing import Union
  import yaml
  from lightning.app.utilities.name_generator import get_unique_name
label_desc: Use image node_id 2 for calling the AppConfig obj's underlying member method code with example usage: obj.save_to_dir(directory) without return types