Skip to content

Read only High, Medium and Low as HumanConfidence values - #297

Merged
jwrosewell merged 1 commit into
rcfrom
fix/human-confidence-no-unknown-value
Dec 1, 2026
Merged

jwrosewell merged 1 commit into
rcfrom
fix/human-confidence-no-unknown-value

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

HumanConfidence has three values, being High, Medium and Low. Unknown is not one of them.

On rc, cloudengine.py line 47 listed Unknown as a fourth value:

HUMAN_CONFIDENCE_VALUES = ("High", "Medium", "Low", "Unknown")

CloudEngine._is_property_value reads that list for derived.humanconfidence, so on a request with no sealed result a response holding Unknown was handed on as the property's value. Every other text the property can't have reads as missing, with the missing property reason.

The change

  • In cloudengine.py, HUMAN_CONFIDENCE_VALUES is ("High", "Medium", "Low"), so Unknown reads as missing, as any other text the property can't have does. The match stays exact, as it was, and as the redeemed values in humanconfidence.py (REDEEMED_VALUES) are matched.
  • In tests/test_human_confidence.py, three things change.
    • OTHER_TEXT now holds "Unknown", so test_without_a_sealed_result_other_text_gives_no_value shows that a response holding Unknown gives HumanConfidence no value, with the missing property reason, and test_a_sealed_request_gives_medium_for_any_other_text keeps checking that a sealed request gives Medium for it.
    • test_without_a_sealed_result_each_value_is_read_unchanged checks High, Medium and Low only.
    • The comment above them says the values are High, Medium and Low.

The cache rule in the open pull request #295 already counts Unknown as a sealed result. That pull request changes other files, so the two merge in either order.

Verification

On Windows with Python 3.12.10, with the four pipeline packages installed from this branch:

  • pytest tests in pipeline/fiftyone_pipeline_cloudrequestengine gives 185 passed, 0 failed.
  • With the Unknown entry put back in cloudengine.py and the new tests kept, test_without_a_sealed_result_other_text_gives_no_value fails on its Unknown case, and passes with the change.

Release notes

  • A cloud response whose HumanConfidence is Unknown no longer gives the property the value Unknown. HumanConfidence's values are High, Medium and Low, and any other text reads as missing.

HumanConfidence's values are High, Medium and Low. The cloud engine
listed Unknown as a fourth value, so a derived.humanconfidence of
Unknown was handed on as the property's value. It now reads as missing,
as any other text the property can't have does.

The tests read Unknown with the other text that is not a value, with and
without a sealed result, and no longer expect it to pass through.
@jwrosewell
jwrosewell merged commit 015ad4b into rc Dec 1, 2026
6 checks passed
@jwrosewell
jwrosewell deleted the fix/human-confidence-no-unknown-value branch December 1, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant