Skip to content

fix: allow single checkpoint path in delete command#29

Open
Jah-yee wants to merge 1 commit intothinking-machines-lab:mainfrom
Jah-yee:fix/checkpoint-delete-arg
Open

fix: allow single checkpoint path in delete command#29
Jah-yee wants to merge 1 commit intothinking-machines-lab:mainfrom
Jah-yee:fix/checkpoint-delete-arg

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Apr 15, 2026

Good day,

This PR fixes issue #24 where passing a checkpoint path directly to tinker checkpoint delete resulted in "unexpected extra argument" error.

Problem

Using tinker checkpoint delete tinker://run-id/weights/0001 throws:

Error: Got unexpected extra argument (tinker://run-id/...)

The issue was that checkpoint_paths was defined as a variadic argument (nargs=-1), which conflicted with Click's option parsing, causing the path to be misinterpreted as an extra argument.

Solution

Changed from variadic argument to single optional argument:

  • Before: @click.argument("checkpoint_paths", nargs=-1, required=False)
  • After: @click.argument("checkpoint_path", required=False)

This allows exactly one checkpoint path to be passed directly.

Testing

  • Syntax verification passed
  • The command tinker checkpoint delete tinker://run-id/weights/0001 now parses correctly

Thank you for your work on Tinker!

Warmly, RoomWithOutRoof

Changed from nargs=-1 (variadic) to single argument to fix parsing issue where
'tinker checkpoint delete tinker://run-id/...' was incorrectly parsed as
unexpected extra argument.

The original variadic argument design conflicted with Click's option parsing,
causing the checkpoint path to be misinterpreted as an extra argument.

Fixes thinking-machines-lab#24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant