mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
fix: (to main) litellm's Timeout error is not picklable (#1294)
This commit is contained in:
@@ -3,7 +3,6 @@ from typing import Any, Literal, Optional, Type, TypedDict, Union, cast
|
||||
|
||||
import numpy as np
|
||||
from litellm import (
|
||||
BadRequestError,
|
||||
completion,
|
||||
completion_cost,
|
||||
embedding,
|
||||
@@ -12,6 +11,7 @@ from litellm import (
|
||||
supports_response_schema,
|
||||
token_counter,
|
||||
)
|
||||
from litellm.exceptions import BadRequestError, Timeout
|
||||
from pydantic import BaseModel
|
||||
|
||||
from rdagent.log import LogColors
|
||||
@@ -28,7 +28,8 @@ def _reduce_no_init(exc: Exception) -> tuple:
|
||||
|
||||
|
||||
# suppose you want to apply this to MyError
|
||||
copyreg.pickle(BadRequestError, _reduce_no_init)
|
||||
for cls in [BadRequestError, Timeout]:
|
||||
copyreg.pickle(cls, _reduce_no_init)
|
||||
|
||||
|
||||
class LiteLLMSettings(LLMSettings):
|
||||
|
||||
Reference in New Issue
Block a user