Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion torchchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import argparse
import logging
import subprocess
import signal
import sys

# MPS ops missing with Multimodal torchtune
Expand All @@ -25,7 +25,15 @@
default_device = "cpu"


def signal_handler(sig, frame):
print("\nInterrupted by user. Bye!\n")
sys.exit(0)


if __name__ == "__main__":
# Set the signal handler for SIGINT
signal.signal(signal.SIGINT, signal_handler)

# Initialize the top-level parser
parser = argparse.ArgumentParser(
prog="torchchat",
Expand Down
Loading