Azure-Samples / Azure-Samples/rag-data-openai-python-promptflow

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

未关闭
#20 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
290
派生
152
PR 合并指标
30 天内没有已合并 PR

描述

> 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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先在 Linux 上重现所示的 evaluate(target=user_call) 流程,重点关注 pf_client.run 与评估 worker 进程之间的交互。将其与直接调用 pf_client.run 进行比较,并确定需要进行哪些更改,才能在不触发 daemonic-process assertion 的情况下完成评估。

由索引模型根据 Issue 内容生成。

评估

技术栈
azure, python
领域
ai
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。