Remote validator never retries: max_retries and retry_backoff are ignored because POST is not a retryable method
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Priority Level
Medium (Annoying but has workaround)
Describe the bug
RemoteValidatorParams.max_retries and retry_backoff have no effect. RemoteEndpointClient.post_to_remote_endpoint (engine/validators/remote.py) builds an httpx_retries.Retry without allowed_methods, and the default in httpx-retries only covers idempotent methods (HEAD, GET, PUT, DELETE, OPTIONS, TRACE). The validator always sends a POST, so a single 429/500/502/503/504 from the endpoint raises HTTPStatusError on the first attempt and the whole validation batch fails, even though the config (and the ValidationColumnConfig docstring) promise retries with backoff.
The model clients already handle this; engine/models/clients/retry.py passes allowed_methods=Retry.RETRYABLE_METHODS | frozenset(["POST"]). The remote validator never got the same treatment.
Steps/Code to reproduce bug
import json, threading
from http.server import BaseHTTPRequestHandler, HTTPServer
from data_designer.config.validator_params import RemoteValidatorParams
from data_designer.engine.validators.remote import RemoteValidator
calls = {"n": 0}
class H(BaseHTTPRequestHandler):
def do_POST(self):
calls["n"] += 1
self.rfile.read(int(self.headers["Content-Length"]))
if calls["n"] == 1: # one transient failure, then healthy
self.send_response(503); self.end_headers(); return
body = json.dumps({"data": [{"is_valid": True}]}).encode()
self.send_response(200); self.send_header("Content-Type", "application/json"); self.end_headers(); self.wfile.write(body)
def log_message(self, *a): pass
srv = HTTPServer(("127.0.0.1", 0), H)
threading.Thread(target=srv.serve_forever, daemon=True).start()
v = RemoteValidator(RemoteValidatorParams(endpoint_url=f"http://127.0.0.1:{srv.server_port}/v", max_retries=3, retry_backoff=1.01))
try:
print(v.run_validation([{"code": "x"}]))
except Exception as e:
print(type(e).__name__, e)
print("server calls:", calls["n"])
On main (861a082):
HTTPStatusError Server error '503 Service Unavailable' for url 'http://127.0.0.1:.../v'
server calls: 1
Quick check of the root cause:
from httpx_retries import Retry
Retry(total=3).is_retryable_method("POST") # False
Expected behavior
The 503 is retried up to max_retries times with retry_backoff, so the snippet above makes 2 calls and returns data=[ValidationOutput(is_valid=True)]. Non-retryable statuses (for example 400) still fail immediately, and max_retries=0 still means a single attempt.
Prior Investigation
Traced it to the Retry(...) call in RemoteEndpointClient.post_to_remote_endpoint. The existing tests in tests/engine/validators/test_remote.py only cover the success path, so the missing retry was never exercised. Searched open and closed issues and PRs for remote validator, RetryTransport, httpx_retries, max_retries and allowed_methods; nothing covers this.
Proposed fix: pass allowed_methods=Retry.RETRYABLE_METHODS | frozenset(["POST"]), matching create_retry_transport in models/clients/retry.py, plus regression tests for retry on 503, max_retries=0, and no retry on 400. I have the fix and tests ready and can open a PR once this is triaged.
Checklist
- I reproduced this issue or provided a minimal example
- I searched the docs/issues myself
- Ngôn ngữ chính
- Python
- Star
- 2.4k
- Fork
- 258
- Merge trung bình
- 4 ngày 20 phút
- Pull request đã merge (30 ngày)
- 32
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA-NeMo/DataDesigner
-
Judge score profiler samples reasoning with squared category weights, crowding out uncommon scoresĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
NVIDIA-NeMo/DataDesigner#1202 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Local seed path containing a single quote breaks the DuckDB queryCó thể đã có người làm @xubenqiang đã nhận 38 ngày trước. Đang mởbug triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
NVIDIA-NeMo/DataDesigner#1102 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enforce \from future import annotations` via ruff FA102 rule`Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởtask
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA-NeMo/DataDesigner#760 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
NVIDIA-NeMo/DataDesigner#1204 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
NVIDIA-NeMo/DataDesigner#1203 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NVIDIA-NeMo/DataDesigner
Issue tương tự
-
docs(contributing): the two things that silently block a PRCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởavailable documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100
Nixitov/Riptide-Native#944 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
JTHCode/secretguard#24 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: middleware documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainer thường phản hồi trong vòng 1 ngày