Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow the target function in evaluate to be a local function #3208

Open
pamelafox opened this issue May 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@pamelafox
Copy link
Member

I currently get this error when passing a local function to evaluate:

promptflow.exceptions.UserErrorException: Failed to import <function run_evaluation..wrap_target at 0x318bc7ba0> from module <module 'scripts.evaluate' from '/Users/pamelafox/ai-rag-chat-evaluator/scripts/evaluate.py'>, please make sure it's a global function.

That is due to the usage of multiprocessing and its need to serialize the function.

Perhaps you could use asyncio.taskgroup or a different mechanism such that local functions are allowed. That would permit me to write much cleaner and more portable, testable code.

@pamelafox pamelafox added the enhancement New feature or request label May 10, 2024
@D-W- D-W- self-assigned this May 11, 2024
@D-W-
Copy link
Contributor

D-W- commented May 11, 2024

Hi @pamelafox , thanks for the suggestion. We've already tracking this internally. The reason we did not support this in the first place was to maintain parity between local and cloud (it's hard to run a local function in cloud). However, we will prioritize support for local scenarios first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants