Skip to content

Conversation

@jtsodapop
Copy link
Contributor

No description provided.

@jtsodapop jtsodapop requested a review from msokoloff1 November 2, 2021 22:55
client, project.uid, f'label-import-{uuid.uuid4()}', predictions)
upload_task.wait_until_done()
labels = annotation_submit_fn(project.uid, data_row.uid)
labels = [label.uid for label in project.labels()][0]
Copy link
Contributor

Choose a reason for hiding this comment

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

why only the zeroth index?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

configured_project_with_label used to only return 1 id in the labels var, so the test that used it did this:

model_run.upsert_labels([label_id])

i can change the test itself to just take in (label_id) instead of ([label_id]) if that makes more sense, and to keep labels as the whole list

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually looking at how the asserts are set up, it looks like it does expect it to just be one. let me know if i should change the asserts to account for multiple labels too, or if leaving it as the 0th index is okay

Copy link
Contributor

Choose a reason for hiding this comment

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

ohh I was mislead by the variable name. labels is just a single label. Ok then you can just do:

label = next(project.labels()).uid
yield [project, label]

That way it won't confuse people in the future

upload_task.wait_until_done()
labels = annotation_submit_fn(project.uid, data_row.uid)
labels = [label.uid for label in project.labels()][0]
time.sleep(3)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can scrap this sleep timer

@jtsodapop jtsodapop requested a review from msokoloff1 November 3, 2021 17:55
@msokoloff1 msokoloff1 merged commit d7d495a into develop Nov 8, 2021
@msokoloff1 msokoloff1 deleted the DIAG-888 branch November 8, 2021 19:04
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