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

calling pf_client.run inside the callable target function for evaluate got "Error: (AssertionError) daemonic processes are not allowed to have children." #20

Open
yanggaome opened this issue Jul 6, 2024 · 0 comments

Comments

@yanggaome
Copy link

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

I am trying to hook up the evaluate method with my own prompt which used to run from pf_client.run

example code below:

from promptflow.client import PFClient

pf_client = PFClient()

def user_call():
    my_prompt_flow = pf_client.run(my prompt flow configs)
    return my_prompt_flow_output

def run_evaluation():
    results = evaluate(
                 evaluation_name=evaluation_name,
                 data=data_path,
                 target=user_call,
                 evaluators={
                    "violence": violence_evaluator,
                    "sexual": sex_evaluator,
                    "self_harm": self_harm_evaluator,
                    "hate_unfairnes": hate_unfairness_evaluator,
                    "content_safety": content_safety_evaluator
                 },
                azure_ai_project=project_scope
             )

Any log messages given by the failure

2024-07-06 00:58:41 +0000 1845174 execution.bulk INFO The process [1845174] has received a terminate signal.
2024-07-06 00:58:42 +0000 1844849 execution ERROR 1/1 flow run failed, indexes: [0], exception of index 0: Execution failure in 'user_call': (UnexpectedError) Unexpected error occurred while executing the batch run. Error: (AssertionError) daemonic processes are not allowed to have children.

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Linux

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

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

No branches or pull requests

1 participant