mirror of
https://github.com/thinking-machines-lab/tinker.git
synced 2026-04-19 12:58:01 +00:00
Sync contents
This commit is contained in:
parent
1a4665f050
commit
01c4aad5e6
4 changed files with 18 additions and 12 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"last_synced_sha": "88bfbfba4c24ca2cadc0765290bcec2e0c4f8288",
|
||||
"last_sync_time": "2025-10-15T19:20:23.018522"
|
||||
"last_synced_sha": "8dfdb91262ab3fcab3ff285fdfc31e6028ce4d50",
|
||||
"last_sync_time": "2025-10-17T17:11:16.045902"
|
||||
}
|
||||
|
|
@ -14,6 +14,15 @@ def _basic_config() -> None:
|
|||
|
||||
|
||||
def setup_logging() -> None:
|
||||
# httpx prints out the HTTP requests its making out to INFO
|
||||
# log stream. The tinker API server communicates backpressure
|
||||
# to the SDK using certain 4xx error codes, which looks scary
|
||||
# to the user, but are actually harmless.
|
||||
#
|
||||
# Thus, we set the default httpx logging level to WARNING so
|
||||
# that they don't see a bunch of red herrings and get worried.
|
||||
httpx_logger.setLevel(logging.WARNING)
|
||||
|
||||
env = os.environ.get("TINKER_LOG")
|
||||
if env == "debug":
|
||||
_basic_config()
|
||||
|
|
|
|||
|
|
@ -278,14 +278,11 @@ class RestClient(TelemetryProvider):
|
|||
"""Internal method to submit get checkpoint archive URL request."""
|
||||
|
||||
async def _get_checkpoint_archive_url_async() -> types.CheckpointArchiveUrlResponse:
|
||||
async def _send_request() -> types.CheckpointArchiveUrlResponse:
|
||||
with self.holder.aclient(ClientConnectionPoolType.TRAIN) as client:
|
||||
return await client.weights.get_checkpoint_archive_url(
|
||||
model_id=training_run_id,
|
||||
checkpoint_id=checkpoint_id,
|
||||
)
|
||||
|
||||
return await self.holder.execute_with_retries(_send_request)
|
||||
with self.holder.aclient(ClientConnectionPoolType.TRAIN) as client:
|
||||
return await client.weights.get_checkpoint_archive_url(
|
||||
model_id=training_run_id,
|
||||
checkpoint_id=checkpoint_id,
|
||||
)
|
||||
|
||||
return self.holder.run_coroutine_threadsafe(_get_checkpoint_archive_url_async())
|
||||
|
||||
|
|
|
|||
|
|
@ -600,7 +600,6 @@ class AsyncWeightsResource(AsyncAPIResource):
|
|||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> CheckpointArchiveUrlResponse:
|
||||
"""
|
||||
Get signed URL to download checkpoint archive.
|
||||
|
|
@ -636,9 +635,10 @@ class AsyncWeightsResource(AsyncAPIResource):
|
|||
extra_headers=merged_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
timeout=60 * 10, # max of 10 minutes
|
||||
)
|
||||
options["follow_redirects"] = False
|
||||
options["max_retries"] = 0 # no retries
|
||||
|
||||
try:
|
||||
response = await self._get(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue