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 件 担当者 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 と評価ワーカープロセスの相互作用に焦点を当てます。これを pf_client.run を直接呼び出す場合と比較し、daemonic-process assertion が発生せずに評価を完了するには何を変更する必要があるかを特定します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, python
領域
ai
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。