Skip to content

Clarify encoder_dir naming across query encoders #2671

Open

Description

@lintool

The parameter name encoder_dir suggests a filesystem directory:

encoder = DkrrDprQueryEncoder(encoder_dir=args.encoder, device=args.device)

However, DkrrDprQueryEncoder passes this value directly to BertModel.from_pretrained, which accepts either a Hugging Face model ID or a local directory. See the Transformers documentation. Pyserini’s DKRR example supplies castorini/dkrr-dpr-nq-retriever.

This naming extends beyond DKRR: other query encoders and the shared FAISS initialization use encoder_dir too.

Could we adopt a clearer name, such as encoder_name_or_path, consistently across these interfaces? Any rename should preserve existing encoder_dir= callers through a compatibility alias and update internal call sites and documentation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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