INNER CODE UNIT · Python

main

allenai/dolma · python/dolma/cli/main.py:46

def main(argv: Optional[List[str]] = None):
    """Main entry point for the CLI"""

    try:
        # attempting to set start method to spawn in case it is not set
        multiprocessing.set_start_method("spawn")
    except RuntimeError as ex:
        # method already set, check if it is set to spawn
        if multiprocessing.get_start_method() != "spawn":
            raise RuntimeError("Multiprocessing start method must be set to spawn") from ex

    parser = ArgumentParser(
        prog="dolma",
        usage="dolma {global options} [command] {command options}",
        description="Command line interface for the Dolma processing toolkit",
    )
    parser.add_argument(
        "-c",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…