src/transformers/configuration_utils.py
def save_pretrained(self, save_directory: Union[str, os.PathLike]):
        """
        Save a configuration object to the directory ``save_directory``, so that it can be re-loaded using the
        :func:`~transformers.PretrainedConfig.from_pretrained` class method.

        Args:
            save_directory (:obj:`str` or :obj:`os.PathLike`):
                Directory where the configuration JSON file will be saved (will be created if it does not exist).
        """
        if os.path.isfile(save_directory):
            raise AssertionError("Provided path ({}) should be a directory, not a file".format(save_directory))
        os.makedirs(save_directory, exist_ok=True)
        # If we save using the predefined names, we can load using `from_pretrained`
        output_config_file = os.path.join(save_directory, CONFIG_NAME)

        self.to_json_file(output_config_file, use_diff=True)
        logger.info(f"Configuration saved in {output_config_file}")

        Save a configuration object to the directory ``save_directory``, so that it can be re-loaded using the
        :func:`~transformers.PretrainedConfig.from_pretrained` class method.

        Args:
            save_directory (:obj:`str` or :obj:`os.PathLike`):
                Directory where the configuration JSON file will be saved (will be created if it does not exist).
        
Save a configuration object to the directory ``save_directory``, so that it can be re-loaded using the
Save a configuration object to the directory ` ` save_directory ` ` so that it can be re - loaded using the
def save_pretrained(self, save_directory: Union[str, os.PathLike]):
        if os.path.isfile(save_directory):
            raise AssertionError("Provided path ({}) should be a directory, not a file".format(save_directory))
        os.makedirs(save_directory, exist_ok=True)
        output_config_file = os.path.join(save_directory, CONFIG_NAME)
        self.to_json_file(output_config_file, use_diff=True)
        logger.info(f"Configuration saved in {output_config_file}")
def save_pretrained ( self , save_directory : Union [ str , os . PathLike ] ) : if os . path . isfile ( save_directory ) : raise AssertionError ( "Provided path ({}) should be a directory, not a file" . format ( save_directory ) ) os . makedirs ( save_directory , exist_ok = True ) output_config_file = os . path . join ( save_directory , CONFIG_NAME ) self . to_json_file ( output_config_file , use_diff = True ) logger . info ( f"Configuration saved in {output_config_file}" )
Save a configuration object to the directory ``save_directory``, so that it can be re-loaded using the
Save a configuration object to the directory ` ` save_directory ` ` so that it can be re - loaded using the
"""
        Save a configuration object to the directory ``save_directory``, so that it can be re-loaded using the
        :func:`~transformers.PretrainedConfig.from_pretrained` class method.

        Args:
            save_directory (:obj:`str` or :obj:`os.PathLike`):
                Directory where the configuration JSON file will be saved (will be created if it does not exist).
        """ # If we save using the predefined names, we can load using `from_pretrained`
self
save_directory
Union[str, os.PathLike]
func
`~transformers.PretrainedConfig.from_pretrained` class method.
Args:
save_directory (:obj:`str` or :obj:`os.PathLike`):
Directory where the configuration JSON file will be saved (will be created if it does not exist).
` ~transformers . PretrainedConfig . from_pretrained ` class method . Args : save_directory ( : obj : ` str ` or : obj : ` os . PathLike ` ) : Directory where the configuration JSON file will be saved ( will be created if it does not exist ) .