microsoft / microsoft/promptflow

[Feature Request] Allow Path objects for evaluate data and output_path parameters

Open
#3,206 3 comments 0 reactions 2 assignees View on GitHub

@singankit is already working on this.

Since May 11, 2024.

enhancement long-term no-recent-activity promptflow-evals
Dominant language
Python
Stars
11.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Currently the types for evaluate function are:

def evaluate(
    *,
    evaluation_name: Optional[str] = None,
    target: Optional[Callable] = None,
    data: Optional[str] = None,
    evaluators: Optional[Dict[str, Callable]] = None,
    evaluator_config: Optional[Dict[str, Dict[str, str]]] = {},
    tracking_uri: Optional[str] = None,
    output_path: Optional[str] = None,
    **kwargs,
):

However, many Python developers use Path objects to represent paths. It'd be nice to be able to directly pass those in to data and output_path. For now, I am casting them to strings with str().

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.