Sync contents

This commit is contained in:
Daniel Xu 2025-12-02 04:15:53 +00:00
parent bd639dea8b
commit 5e51e31043
5 changed files with 110 additions and 25 deletions

View file

@ -147,6 +147,46 @@ async def create_training_client_from_state_async(
Async version of create_training_client_from_state.
#### `create_training_client_from_state_with_optimizer`
```python
def create_training_client_from_state_with_optimizer(
path: str,
user_metadata: dict[str, str] | None = None) -> TrainingClient
```
Create a TrainingClient from saved model weights and optimizer state.
This is similar to create_training_client_from_state but also restores
optimizer state (e.g., Adam momentum), which is useful for resuming
training exactly where it left off.
Args:
- `path`: Tinker path to saved weights (e.g., "tinker://run-id/weights/checkpoint-001")
- `user_metadata`: Optional metadata to attach to the new training run
Returns:
- `TrainingClient` loaded with the specified weights and optimizer state
Example:
```python
# Resume training from a checkpoint with optimizer state
training_client = service_client.create_training_client_from_state_with_optimizer(
"tinker://run-id/weights/checkpoint-001"
)
# Continue training with restored optimizer momentum
```
#### `create_training_client_from_state_with_optimizer_async`
```python
async def create_training_client_from_state_with_optimizer_async(
path: str,
user_metadata: dict[str, str] | None = None) -> TrainingClient
```
Async version of create_training_client_from_state_with_optimizer.
#### `create_sampling_client`
```python

View file

@ -237,21 +237,16 @@ class ImageAssetPointerChunk(StrictBase)
Image format
#### `height`
Image height in pixels
#### `location`
Path or URL to the image asset
#### `tokens`
#### `expected_tokens`
Number of tokens this image represents
#### `width`
Image width in pixels
Expected number of tokens this image represents.
This is only advisory: the tinker backend will compute the number of tokens
from the image, and we can fail requests quickly if the tokens does not
match expected_tokens.
## `CheckpointsListResponse` Objects
@ -605,18 +600,6 @@ Image data as bytes
Image format
#### `height`
Image height in pixels
#### `tokens`
Number of tokens this image represents
#### `width`
Image width in pixels
#### `expected_tokens`
Expected number of tokens this image represents.