microsoft / microsoft/promptflow

[Feature Request] pass addition inputs to target function when using the evaluate method

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

@singankit is already working on this.

Since Jul 10, 2024.

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

Description

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.

Not sure if this is already supported, but I couldn't find one example

from promptflow.evals.evaluate import evaluate

def user_call(*, question: str, **kwargs):
    # question is a column from data
    # how can I pass in additional inputs to this target user function?

user_call_config = get_config()
evaluate(
data = input_data,
target = user_call # how can i pass in user_call_config variable into user_call?
)

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Currently I am using global variables so the user_call can access, but would like to understand how I can pass in variables that not from data to that user_call

Additional context
Add any other context or screenshots about the feature request here.

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.