neuralib.io.output.mkdir_version

neuralib.io.output.mkdir_version(root, folder_name, reuse_latest=False)[source]

Make directory with version number, and auto-accumulate

Parameters:
  • root (str | Path | PathLike[str]) – Root directory where the versioned folder will be created.

  • folder_name (str) – Name of the folder for which versions will be created. Can contain sub-paths.

  • reuse_latest (bool) – Boolean flag indicating whether to reuse the latest version folder if it exists.

Returns:

Path of the created or reused version folder.

Return type:

Path