Skip to content

Conversation

mjvogelsong
Copy link
Contributor

@mjvogelsong mjvogelsong commented Apr 20, 2023

The SDK should not be returning the confusing PASS or FAIL labels anymore.

I'm not a big fan of the mapper in the client, but I think it's an important fix for clarity in the short term.

Fixes #7

@robotrapta
Copy link
Member

Before we release 0.8 I’d like to address the BGR / RGB issue since that’s also a breaking change.

@mjvogelsong mjvogelsong changed the base branch from main to 0.8.0rc1 April 20, 2023 16:24
@mjvogelsong
Copy link
Contributor Author

Before we release 0.8 I’d like to address the BGR / RGB issue since that’s also a breaking change.

@robotrapta Good idea. I've created a 0.8.0rc1 branch, and changed the base of this PR to that branch. We can merge into that branch until we're ready to release 0.8.0 (with breaking changes).

@mjvogelsong mjvogelsong changed the title Return YES/NO instead of PASS/FAIL (0.8.0rc1) Return YES/NO instead of PASS/FAIL Apr 20, 2023
Copy link
Member

@robotrapta robotrapta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

def test_submit_image_query_returns_yes(gl: Groundlight):
# We use the "never-review" model to guarantee a "yes" answer.
detector = gl.get_or_create_detector(name="Always a dog", query="Is there a dog?", config_name="never-review")
image_query = gl.submit_image_query(detector=detector, image="test/assets/dog.jpeg", wait=5)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjvogelsong mjvogelsong merged commit cced879 into 0.8.0rc1 Apr 27, 2023
@mjvogelsong mjvogelsong deleted the return-yes-no branch April 27, 2023 18:51
brandon-wada added a commit that referenced this pull request May 8, 2023
* Bump 0.8.0rc1

* (0.8.0rc1) Return YES/NO instead of PASS/FAIL (#50)

* Convert PASS/FAIL to YES/NO

* Change to classmethod

* Remove logger

* Bump 0.8.0

* (0.8.0rc1) Only allow "YES"/"NO" in `add_label()` (#51)

* Convert PASS/FAIL to YES/NO

* Change to classmethod

* Remove logger

* Bump 0.8.0

* Only allow YES/NO labels through SDK; Add tests

* Add comments

* Remove duplicates

* Feedback

* Add type ignore

* Remove select all

* Enum

* Update pyproject.toml

---------

Co-authored-by: Michael Vogelsong <4020875+mjvogelsong@users.noreply.github.com>
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.

3 participants