Fix sampler_weights checkpoint loading#32
Open
Jah-yee wants to merge 1 commit intothinking-machines-lab:mainfrom
Open
Fix sampler_weights checkpoint loading#32Jah-yee wants to merge 1 commit intothinking-machines-lab:mainfrom
Jah-yee wants to merge 1 commit intothinking-machines-lab:mainfrom
Conversation
- Add api_checkpoint_id property to ParsedCheckpointTinkerPath that returns: - For training checkpoints: just the checkpoint number (e.g., '0001') - For sampler checkpoints: the prefixed ID (e.g., 'sampler_weights/0001') - Update rest_client.py to use api_checkpoint_id instead of checkpoint_id - Add test_sampler_weights_loading.py with comprehensive tests Fixes Issue thinking-machines-lab#25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Issue #25:
sampler_weightsnot available whileweightsis availableProblem
When loading a
sampler_weightscheckpoint using a tinker path (e.g.,tinker://run-id/sampler_weights/0001), the checkpoint loading fails with a "Path is invalid" error.Root Cause
In
ParsedCheckpointTinkerPath.from_tinker_path(), thecheckpoint_idwas including the type prefix (e.g.,sampler_weights/0001), but the API expected different formats for training vs sampler checkpoints.Fix
Added a new
api_checkpoint_idproperty toParsedCheckpointTinkerPath:0001)sampler_weights/0001)Updated
rest_client.pyto useapi_checkpoint_idinstead ofcheckpoint_idTesting
Added
tests/test_sampler_weights_loading.pywith tests for parsing both checkpoint types.Good day,
Thank you for your work on this excellent library!
Warmly,
RoomWithOutRoof