INNER CODE UNIT · Python

_get_checkpoint_topics_path

nolabs-ai/deepfabric · deepfabric/cli.py:71

def _get_checkpoint_topics_path(
    checkpoint_dir: str,
    output_save_as: str,
) -> str | None:
    """
    Read checkpoint metadata to get the topics path used in the original run.

    Args:
        checkpoint_dir: Directory containing checkpoint files
        output_save_as: Output file path (used to derive checkpoint file names)

    Returns:
        Topics file path from checkpoint metadata, or None if not available
    """
    checkpoint_path = Path(checkpoint_dir)
    output_stem = Path(output_save_as).stem
    metadata_path = checkpoint_path / f"{output_stem}{CHECKPOINT_METADATA_SUFFIX}"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…