-
Notifications
You must be signed in to change notification settings - Fork 1
fix(gateway): remove implicit model request timeout #1053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
35a428c
60c04f9
a60ed89
28082a1
284447f
661ce8d
35465a5
c276fce
94c6856
dac678c
439da2e
6236e98
32b0199
197e888
4e839ce
c387943
cb24fa9
ef76ade
d911a38
bceaeb2
e5e9c96
5765307
cbab94c
e0dc420
c1b372d
c08a5fd
fc23402
9c01b57
2919652
37bca9c
62ba3c3
6aece30
e0eab78
9701dec
28313ef
1edf0fb
befe04c
8a412b8
ad337e1
36fc35d
81145d4
a2951f6
3612ab9
e794ed3
b80e64b
2e12ed4
6774dab
b0d1fda
80b3aa3
5dc69bc
f9505a5
b128834
10225f4
4b73933
0e7c03b
8c20f1e
443aa5f
4b1c108
fc94faa
5c82b9c
ea5555d
08e5193
260767d
fe1e85a
76d1caa
4ceafa0
a35a3c6
b20f994
0b949aa
73f8977
b81739f
4316515
e1ff51b
b2a38b4
9179873
f50755b
78a71c0
1ccc959
a95d3c8
7685d3f
2b189ad
76c0475
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7286,25 +7286,32 @@ def register_video_job(agent: ModelAgent, provider_result: dict[str, Any]) -> di | |
| if not attribution.get("service"): | ||
| attribution["service"] = "embeddings_api" | ||
| started_at = time.perf_counter() | ||
| embedding_deadline = time.monotonic() + float( | ||
| orchestrator.client.timeout | ||
| configured_timeout = orchestrator.client.timeout | ||
| embedding_deadline = ( | ||
|
Comment on lines
7312
to
+7316
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the server is built with a finite Useful? React with 👍 / 👎. |
||
| None | ||
| if configured_timeout is None | ||
| else time.monotonic() + float(configured_timeout) | ||
| ) | ||
| document = None | ||
| last_embedding_error: Exception | None = None | ||
| for embedding_agent in embedding_agents: | ||
| remaining_timeout = embedding_deadline - time.monotonic() | ||
| if remaining_timeout <= 0: | ||
| remaining_timeout = ( | ||
| None | ||
| if embedding_deadline is None | ||
| else embedding_deadline - time.monotonic() | ||
| ) | ||
| if remaining_timeout is not None and remaining_timeout <= 0: | ||
| break | ||
| attempt_started_at = time.perf_counter() | ||
| try: | ||
| document = self._run(lambda agent=embedding_agent: coordinator.complete_embeddings_batch( | ||
| document = self._run(lambda agent=embedding_agent, wait_timeout=remaining_timeout: coordinator.complete_embeddings_batch( | ||
| inputs, | ||
| model=agent.model, | ||
| attribution=attribution, | ||
| metadata={"actor_scope": "inference", "endpoint_alias": "embeddings"}, | ||
| zdr_only=zdr_only, | ||
| agent_id=agent.id, | ||
| wait_timeout=remaining_timeout, | ||
| wait_timeout=wait_timeout, | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| owner_id=security.principal_id(self.headers), | ||
| )) | ||
| except Exception as exc: # noqa: BLE001 - measured member failover | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.