Open yanggaome opened 2 weeks ago
Hi @yanggaome , evaluate
will call pf.run
implicitly, which will make your above code call a pf.run
inside a pf.run
. While pf.run
used multi-processing to process each line of data, which might cause above error. We'll use this issue to track root cause of above error.
To work around, could you change your user_call
to use flow-as-a-function instead of pf.run
?
Here's sample code
def user_call():
my_prompt_flow = load_flow("path/to/flow")
my_prompt_flow(xxx)
return my_prompt_flow_output
thanks @D-W- , that works!
Describe the bug A clear and concise description of the bug.
How To Reproduce the bug Steps to reproduce the behavior, how frequent can you experience the bug: I am trying to hook up the evaluate method with my own prompt which used to run from pf_client.run
example code below:
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 behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Running Information(please complete the following information):
pf -v
: [e.g. 0.0.102309906]python --version
: [e.g. python==3.10.12] { "promptflow": "1.13.0", "promptflow-azure": "1.13.0", "promptflow-core": "1.13.0", "promptflow-devkit": "1.13.0", "promptflow-evals": "0.3.0", "promptflow-tracing": "1.13.0" } Additional context Add any other context about the problem here.