microsoft / microsoft/promptflow
[BUG] FutureWarning from fillna call
@zhengfeiwang is already working on this.
Since Apr 9, 2024.
- Dominant language
- Python
- Stars
- 11.2k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When I use the azure-ai-generative SDK's evaluate function(), it calls PromptFlow code which results in this warning in my logs:
/Users/pamelafox/ai-rag-chat-evaluator/.venv/lib/python3.11/site-packages/promptflow/_sdk/operations/_local_storage_operations.py:516: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value '(Failed)' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
outputs.fillna(value="(Failed)", inplace=True) # replace nan with explicit prompt
I am on promptflow 1.6 due to an issue with 1.7 and evaluate SDK, but I don't know if this warning is fixed yet, as the code seems to be similar in main.
How To Reproduce the bug
I experience it when I'm using https://github.com/Azure-Samples/ai-rag-chat-evaluator, which calls the evaluate function from azure-ai-generative, which uses promptflow behind the scenes.
Expected behavior
I expect no warnings.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.