import typer from commands import app @app.command() def train( ctx: typer.Context, epoch_size: int = typer.Option(10, "--epoch", "-e", help="Number of epochs"), batch_size: int = typer.Option(64, "--batch", "-b", help="Batch size"), lr: float = typer.Option(1e-4, "--lr", "-l", help="Learning rate"), checkpoint_path: str = typer.Option( "hash_checkpoint.pt", "--checkpoint", "-c", help="Checkpoint path" ), metrics_path: str = typer.Option( "hash_training_metrics.jsonl", "--metrics-path", "-m", help="JSONL metrics path for loss curves; relative to output directory unless absolute", ), log_every: int = typer.Option( 1, "--log-every", help="Write one metrics row every N global steps; <=0 disables metrics logging", ), ): from compressors import train as train_module train_module( epoch_size=epoch_size, batch_size=batch_size, lr=lr, checkpoint_path=checkpoint_path, metrics_path=metrics_path, log_every=log_every, )