composer.utils.ensure_folder_has_no_conflicting_files(folder_name, filename, timestamp)[source]#

Ensure that the given folder does not have any files conflicting with the filename format string.

If any filename is formatted with a timestamp where the epoch, batch, sample, or token counts are after timestamp, a FileExistsError will be raised. If filename and occurs later than timestamp, raise a FileExistsError.

  • folder_name (str | Path) โ€“ The folder to inspect.

  • filename (str) โ€“ The pattern string for potential files.

  • timestamp (Timestamp) โ€“ Ignore any files that occur before the provided timestamp.


FileExistsError โ€“ If folder_name contains any files matching the filename template before timestamp.