adding: OUTPUT_FILENAME_PATTERN
This commit is contained in:
BIN
evaluator/.DS_Store
vendored
BIN
evaluator/.DS_Store
vendored
Binary file not shown.
0
evaluator/__init__.py
Normal file → Executable file
0
evaluator/__init__.py
Normal file → Executable file
0
evaluator/__pycache__/__init__.cpython-313.pyc
Normal file → Executable file
0
evaluator/__pycache__/__init__.cpython-313.pyc
Normal file → Executable file
0
evaluator/__pycache__/cli.cpython-313.pyc
Normal file → Executable file
0
evaluator/__pycache__/cli.cpython-313.pyc
Normal file → Executable file
0
evaluator/__pycache__/engine.cpython-313.pyc
Normal file → Executable file
0
evaluator/__pycache__/engine.cpython-313.pyc
Normal file → Executable file
0
evaluator/__pycache__/time_utils.cpython-313.pyc
Normal file → Executable file
0
evaluator/__pycache__/time_utils.cpython-313.pyc
Normal file → Executable file
0
evaluator/analytics/__init__.py
Normal file → Executable file
0
evaluator/analytics/__init__.py
Normal file → Executable file
0
evaluator/analytics/__pycache__/__init__.cpython-313.pyc
Normal file → Executable file
0
evaluator/analytics/__pycache__/__init__.cpython-313.pyc
Normal file → Executable file
0
evaluator/analytics/__pycache__/vloop.cpython-313.pyc
Normal file → Executable file
0
evaluator/analytics/__pycache__/vloop.cpython-313.pyc
Normal file → Executable file
0
evaluator/analytics/vloop.py
Normal file → Executable file
0
evaluator/analytics/vloop.py
Normal file → Executable file
0
evaluator/cli.py
Normal file → Executable file
0
evaluator/cli.py
Normal file → Executable file
0
evaluator/collectors/__pycache__/agent_framework.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/__pycache__/agent_framework.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/__pycache__/base.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/__pycache__/base.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/__pycache__/langfuse.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/__pycache__/langfuse.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/__pycache__/langfuse_credentials.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/__pycache__/langfuse_credentials.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/__pycache__/mock.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/__pycache__/mock.cpython-313.pyc
Normal file → Executable file
0
evaluator/collectors/agent_framework.py
Normal file → Executable file
0
evaluator/collectors/agent_framework.py
Normal file → Executable file
0
evaluator/collectors/base.py
Normal file → Executable file
0
evaluator/collectors/base.py
Normal file → Executable file
0
evaluator/collectors/langfuse.py
Normal file → Executable file
0
evaluator/collectors/langfuse.py
Normal file → Executable file
0
evaluator/collectors/langfuse_credentials.py
Normal file → Executable file
0
evaluator/collectors/langfuse_credentials.py
Normal file → Executable file
0
evaluator/collectors/mock.py
Normal file → Executable file
0
evaluator/collectors/mock.py
Normal file → Executable file
0
evaluator/config/__pycache__/agents.cpython-313.pyc
Normal file → Executable file
0
evaluator/config/__pycache__/agents.cpython-313.pyc
Normal file → Executable file
0
evaluator/config/__pycache__/settings.cpython-313.pyc
Normal file → Executable file
0
evaluator/config/__pycache__/settings.cpython-313.pyc
Normal file → Executable file
0
evaluator/config/agents.py
Normal file → Executable file
0
evaluator/config/agents.py
Normal file → Executable file
4
evaluator/config/settings.py
Normal file → Executable file
4
evaluator/config/settings.py
Normal file → Executable file
@@ -71,6 +71,10 @@ class Settings(BaseSettings):
|
||||
trace_prompt_path: str = Field(default="configs/judge/trace_metrics.yaml", validation_alias="TRACE_PROMPT_PATH")
|
||||
session_prompt_path: str = Field(default="configs/judge/session_metrics.yaml", validation_alias="SESSION_PROMPT_PATH")
|
||||
output_dir: str = Field(default="output", validation_alias="OUTPUT_DIR")
|
||||
output_filename_pattern: str = Field(
|
||||
default="AGENTE_{agent_id}_LLM_JUDGE_{timestamp}.TXT.GZ",
|
||||
validation_alias="OUTPUT_FILENAME_PATTERN",
|
||||
)
|
||||
batch_size: int = Field(default=50, validation_alias="BATCH_SIZE")
|
||||
max_attempts: int = Field(default=3, validation_alias="MAX_ATTEMPTS")
|
||||
context_turn_limit: int = Field(default=6, validation_alias="CONTEXT_TURN_LIMIT")
|
||||
|
||||
0
evaluator/core/__pycache__/models.cpython-313.pyc
Normal file → Executable file
0
evaluator/core/__pycache__/models.cpython-313.pyc
Normal file → Executable file
0
evaluator/core/models.py
Normal file → Executable file
0
evaluator/core/models.py
Normal file → Executable file
0
evaluator/engine.py
Normal file → Executable file
0
evaluator/engine.py
Normal file → Executable file
0
evaluator/identity/__pycache__/resolver.cpython-313.pyc
Normal file → Executable file
0
evaluator/identity/__pycache__/resolver.cpython-313.pyc
Normal file → Executable file
0
evaluator/identity/resolver.py
Normal file → Executable file
0
evaluator/identity/resolver.py
Normal file → Executable file
0
evaluator/judges/__pycache__/llm_judge.cpython-313.pyc
Normal file → Executable file
0
evaluator/judges/__pycache__/llm_judge.cpython-313.pyc
Normal file → Executable file
0
evaluator/judges/llm_judge.py
Normal file → Executable file
0
evaluator/judges/llm_judge.py
Normal file → Executable file
0
evaluator/llm/__pycache__/client.cpython-313.pyc
Normal file → Executable file
0
evaluator/llm/__pycache__/client.cpython-313.pyc
Normal file → Executable file
0
evaluator/llm/__pycache__/profile_resolver.cpython-313.pyc
Normal file → Executable file
0
evaluator/llm/__pycache__/profile_resolver.cpython-313.pyc
Normal file → Executable file
0
evaluator/llm/client.py
Normal file → Executable file
0
evaluator/llm/client.py
Normal file → Executable file
0
evaluator/llm/profile_resolver.py
Normal file → Executable file
0
evaluator/llm/profile_resolver.py
Normal file → Executable file
0
evaluator/output/__pycache__/legacy_exporter.cpython-313.pyc
Normal file → Executable file
0
evaluator/output/__pycache__/legacy_exporter.cpython-313.pyc
Normal file → Executable file
27
evaluator/output/legacy_exporter.py
Normal file → Executable file
27
evaluator/output/legacy_exporter.py
Normal file → Executable file
@@ -106,11 +106,36 @@ def _session_loop_map(rows) -> dict[str, int]:
|
||||
return {sid: max_consecutive_intent_streak(items) for sid, items in grouped.items()}
|
||||
|
||||
|
||||
def build_output_filename(
|
||||
agent_id: str,
|
||||
run_id: str,
|
||||
now_brt: datetime,
|
||||
pattern: str | None = None,
|
||||
) -> str:
|
||||
"""Build the export filename from the environment-configurable template."""
|
||||
template = pattern or settings.output_filename_pattern
|
||||
try:
|
||||
filename = template.format(
|
||||
agent_id=agent_id,
|
||||
run_id=run_id,
|
||||
timestamp=now_brt.strftime("%Y%m%d_%H%M%S"),
|
||||
)
|
||||
except KeyError as exc:
|
||||
raise ValueError(
|
||||
f"Unknown placeholder {exc} in OUTPUT_FILENAME_PATTERN. "
|
||||
"Supported placeholders: {agent_id}, {run_id}, {timestamp}."
|
||||
) from exc
|
||||
|
||||
if not filename or Path(filename).name != filename or filename in {".", ".."}:
|
||||
raise ValueError("OUTPUT_FILENAME_PATTERN must produce a filename without directories")
|
||||
return filename
|
||||
|
||||
|
||||
def export_legacy_txt_gz(repo: EvaluationRepository, run_id: str, agent_id: str) -> Path:
|
||||
output_dir = settings.path(settings.output_dir)
|
||||
output_dir.mkdir(parents=True, exist_ok=True)
|
||||
now_brt = datetime.now(ZoneInfo("America/Sao_Paulo"))
|
||||
path = output_dir / f"AGENTE_{agent_id}_LLM_JUDGE_{now_brt.strftime('%Y%m%d_%H%M%S')}.TXT.GZ"
|
||||
path = output_dir / build_output_filename(agent_id, run_id, now_brt)
|
||||
|
||||
with repo.store.connect() as conn:
|
||||
cur = conn.cursor()
|
||||
|
||||
0
evaluator/persistence/__pycache__/oracle_store.cpython-313.pyc
Normal file → Executable file
0
evaluator/persistence/__pycache__/oracle_store.cpython-313.pyc
Normal file → Executable file
0
evaluator/persistence/__pycache__/repository.cpython-313.pyc
Normal file → Executable file
0
evaluator/persistence/__pycache__/repository.cpython-313.pyc
Normal file → Executable file
0
evaluator/persistence/oracle_store.py
Normal file → Executable file
0
evaluator/persistence/oracle_store.py
Normal file → Executable file
0
evaluator/persistence/repository.py
Normal file → Executable file
0
evaluator/persistence/repository.py
Normal file → Executable file
0
evaluator/prompts/__pycache__/loader.cpython-313.pyc
Normal file → Executable file
0
evaluator/prompts/__pycache__/loader.cpython-313.pyc
Normal file → Executable file
0
evaluator/prompts/loader.py
Normal file → Executable file
0
evaluator/prompts/loader.py
Normal file → Executable file
0
evaluator/publishers/__pycache__/gcs_export.cpython-313.pyc
Normal file → Executable file
0
evaluator/publishers/__pycache__/gcs_export.cpython-313.pyc
Normal file → Executable file
0
evaluator/publishers/__pycache__/langfuse_job_audit.cpython-313.pyc
Normal file → Executable file
0
evaluator/publishers/__pycache__/langfuse_job_audit.cpython-313.pyc
Normal file → Executable file
0
evaluator/publishers/__pycache__/langfuse_scores.cpython-313.pyc
Normal file → Executable file
0
evaluator/publishers/__pycache__/langfuse_scores.cpython-313.pyc
Normal file → Executable file
0
evaluator/publishers/gcs_export.py
Normal file → Executable file
0
evaluator/publishers/gcs_export.py
Normal file → Executable file
0
evaluator/publishers/langfuse_job_audit.py
Normal file → Executable file
0
evaluator/publishers/langfuse_job_audit.py
Normal file → Executable file
0
evaluator/publishers/langfuse_scores.py
Normal file → Executable file
0
evaluator/publishers/langfuse_scores.py
Normal file → Executable file
0
evaluator/time_utils.py
Normal file → Executable file
0
evaluator/time_utils.py
Normal file → Executable file
Reference in New Issue
Block a user