-
Notifications
You must be signed in to change notification settings - Fork 55
feat(evaluation) 1/15: config surface and domain models #812
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: develop
Are you sure you want to change the base?
Changes from all commits
9407f34
4841381
7b7f3fe
7d24e77
6bbdbdf
b28deac
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 |
|---|---|---|
|
|
@@ -334,6 +334,12 @@ env: | |
| ENABLE_RAY_SERVE: "true" | ||
| RAY_SERVE_NUM_REPLICAS: "4" | ||
| RAY_SERVE_PORT: "80" | ||
| # How out-of-process workers reach the API. The built-in default is | ||
| # http://openrag:$APP_iPORT, which is the compose service name and does | ||
| # not resolve here — this chart's Service is <release>-openrag, and the | ||
| # RayCluster that runs those workers is a separate pod. Follows | ||
| # openrag.service.port, the same value that opens the container port. | ||
| OPENRAG_INTERNAL_URL: "http://{{ .Release.Name }}-openrag:{{ .Values.openrag.service.port }}" | ||
|
Collaborator
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. Could you please update this URL to use the Ray Serve service? In the Helm setup, the API listens on Please also make the default use |
||
|
|
||
| WITH_CHAINLIT_UI: "false" | ||
| SAVE_UPLOADED_FILES: "false" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| """Configuration for the admin evaluation feature. | ||
|
|
||
| Operational limits live here rather than as constants in the code that uses | ||
| them, so a deployment can be retuned without a rebuild. | ||
|
|
||
| Domain contracts stay out of this file: the reserved partition prefix, the CSV | ||
| column names and the ``file_id`` alphabet are not settings, and changing them | ||
| would invalidate stored datasets. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from pydantic import Field | ||
|
|
||
| from .base import ConfigMixin | ||
|
|
||
|
|
||
| class EvaluationConfig(ConfigMixin): | ||
| """Limits and timeouts for evaluation datasets and runs. | ||
|
|
||
| Every field is bounded: these are all reachable from the environment, and a | ||
| non-positive limit does not degrade gracefully — it reaches the runner as a | ||
| cap that rejects every upload, or as a timeout that expires instantly. A | ||
| typo should fail at config load, where the message names the field. | ||
| """ | ||
|
|
||
| #: Executable the runner shells out to; the images install it on PATH. | ||
| promptfoo_bin: str = Field(default="promptfoo", min_length=1) | ||
|
|
||
| #: Upload caps. A dataset is re-indexed on every run, so an oversized | ||
| #: corpus costs far more than the upload itself. | ||
| max_corpus_mb: int = Field(default=512, gt=0) | ||
| max_testset_mb: int = Field(default=5, gt=0) | ||
| #: Each test-set row costs one retrieval call plus one graded generation. | ||
| max_testset_rows: int = Field(default=500, gt=0) | ||
|
|
||
| #: Chunks retrieved per question by the retrieval config. Bounded like the | ||
| #: retrieval pipeline's own ``top_k``. | ||
| top_k: int = Field(default=5, gt=0, le=1000) | ||
|
|
||
| #: How long to wait for one file's indexing task, and how often to poll it. | ||
| task_timeout_seconds: float = Field(default=1800.0, gt=0) | ||
| task_poll_seconds: float = Field(default=1.0, gt=0) | ||
|
|
||
| #: Per-request timeout for the runner's own HTTP calls. | ||
| http_timeout_seconds: float = Field(default=300.0, gt=0) | ||
|
|
||
| #: promptfoo grades every row with an LLM, so allow for a slow grader. | ||
| promptfoo_timeout_seconds: float = Field(default=3600.0, gt=0) | ||
|
|
||
| @property | ||
| def max_corpus_bytes(self) -> int: | ||
| return self.max_corpus_mb * 1024 * 1024 | ||
|
|
||
| @property | ||
| def max_testset_bytes(self) -> int: | ||
| return self.max_testset_mb * 1024 * 1024 | ||
|
|
||
|
|
||
| __all__ = ["EvaluationConfig"] |
Uh oh!
There was an error while loading. Please reload this page.