Skip to content

Export adapter output dataclasses or fix README adapter imports #3

@laynepenney

Description

@laynepenney

Finding

The README and adapter API docs show customer imports from synapt_eval.adapters that do not work.

Documented examples:

from synapt_eval.adapters import RetrievalAdapter, RetrievalCandidate
from synapt_eval.adapters import GenerationAdapter, GenerationOutput

Actual synapt_eval.adapters.__all__ exports RetrievalAdapter and GenerationAdapter, but not RetrievalCandidate or GenerationOutput.

Repro

Source checkout: b312868.

python -m venv /tmp/synapt-eval-macos311
source /tmp/synapt-eval-macos311/bin/activate
python -m pip install -e ".[dev]"
python - <<'PY'
from synapt_eval.adapters import RetrievalCandidate, GenerationOutput
print(RetrievalCandidate, GenerationOutput)
PY

Observed:

ImportError: cannot import name 'RetrievalCandidate' from 'synapt_eval.adapters'

Expected

Either:

  1. export RetrievalCandidate and GenerationOutput from synapt_eval.adapters, matching docs, or
  2. update README/docs to use the nested imports that examples currently use:
from synapt_eval.adapters.retrieval_adapter import RetrievalCandidate
from synapt_eval.adapters.generation_adapter import GenerationOutput

Impact

This blocks copy/paste adoption from the README quickstart and adapter docs. The runnable examples work because they use nested imports, but the public docs do not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions