Skip to content

fix(devkit): avoid dtype warning for failed outputs#4189

Open
fengjikui wants to merge 1 commit into
microsoft:mainfrom
fengjikui:codex/fillna-failed-output-dtype
Open

fix(devkit): avoid dtype warning for failed outputs#4189
fengjikui wants to merge 1 commit into
microsoft:mainfrom
fengjikui:codex/fillna-failed-output-dtype

Conversation

@fengjikui

@fengjikui fengjikui commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • Fill missing failed output values after converting output columns to object dtype.
  • Preserve the line-number column while avoiding pandas incompatible-dtype FutureWarning.
  • Add a regression test for numeric output columns with padded failed rows.

Root cause

When _outputs_padding adds missing output rows, numeric output columns contain NaN. Filling the whole dataframe with the string "(Failed)" attempts to write a string into a float column, which triggers pandas' incompatible-dtype FutureWarning and will become an error in a future pandas release.

Fixes #2702

Validation

  • src/promptflow-evals/.venv/bin/python -m pytest src/promptflow-devkit/tests/sdk_cli_test/unittests/test_local_storage_operations.py -q (2 passed)

@fengjikui fengjikui marked this pull request as ready for review June 22, 2026 15:45
@fengjikui fengjikui requested a review from a team as a code owner June 22, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] FutureWarning from fillna call

1 participant