Repository navigation
Read only High, Medium and Low as HumanConfidence values - #297
Merged
Merged
Conversation
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.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
HumanConfidence has three values, being High, Medium and Low. Unknown is not one of them.
On
rc,cloudengine.pyline 47 listed Unknown as a fourth value:CloudEngine._is_property_valuereads that list forderived.humanconfidence, so on a request with no sealed result a response holdingUnknownwas 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
cloudengine.py,HUMAN_CONFIDENCE_VALUESis("High", "Medium", "Low"), soUnknownreads as missing, as any other text the property can't have does. The match stays exact, as it was, and as the redeemed values inhumanconfidence.py(REDEEMED_VALUES) are matched.tests/test_human_confidence.py, three things change.OTHER_TEXTnow holds"Unknown", sotest_without_a_sealed_result_other_text_gives_no_valueshows that a response holdingUnknowngives HumanConfidence no value, with the missing property reason, andtest_a_sealed_request_gives_medium_for_any_other_textkeeps checking that a sealed request gives Medium for it.test_without_a_sealed_result_each_value_is_read_unchangedchecks High, Medium and Low only.The cache rule in the open pull request #295 already counts
Unknownas 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 testsinpipeline/fiftyone_pipeline_cloudrequestenginegives 185 passed, 0 failed.Unknownentry put back incloudengine.pyand the new tests kept,test_without_a_sealed_result_other_text_gives_no_valuefails on itsUnknowncase, and passes with the change.Release notes
Unknownno longer gives the property the valueUnknown. HumanConfidence's values are High, Medium and Low, and any other text reads as missing.