Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Label Studio OCR config generation #1062

Merged
merged 22 commits into from Dec 2, 2022

Conversation

shivalikasingh95
Copy link
Contributor

@shivalikasingh95 shivalikasingh95 commented Nov 10, 2022

Describe changes

Hi, as part of the MLOps competition, I wanted to use Label Studio for OCR labelling task. Since ZenML currently supports only generation of template for image classification and object detection labelling tasks, I implemented support for OCR to support my use case. I thought of contributing this back since it might be useful for others too.
As a user of zenml, I felt that all the features supported by label studio should be accessible via the zenml integration as well. So I'd be happy to submit a similar PR to support other kinds of labelling tasks supported by label studio if you guys would be interested in it.

Do let me know if the current PR requires any changes.

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • If I have added an integration, I have updated the integrations table and the corresponding website section.
  • I have added tests to cover my changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@strickvl strickvl added the enhancement New feature or request label Nov 10, 2022
@htahir1
Copy link
Contributor

htahir1 commented Nov 10, 2022

@shivalikasingh95 This is a great contribution and im sure @strickvl will have some thoughts when he seens it. For now, what I can say is that we have one minor docstring quality check that failed

src/zenml/integrations/label_studio/label_config_generators/label_config_generators.py:generate_basic_ocr_label_config:114: DAR101: Missing parameter(s) in Docstring: - labels

Could you add labels to that docstring?

@strickvl
Copy link
Contributor

If it's not too much of a pain, could you also write a unit test validating the output of the label config utility function you've added? You'll see a template for how to do that exists already in our tests folder, so it shouldn't be too much hassle I hope!

As for the rest, I'll check it properly in the morning, but it looks great at first glance!

@shivalikasingh95
Copy link
Contributor Author

@shivalikasingh95 This is a great contribution and im sure @strickvl will have some thoughts when he seens it. For now, what I can say is that we have one minor docstring quality check that failed

src/zenml/integrations/label_studio/label_config_generators/label_config_generators.py:generate_basic_ocr_label_config:114: DAR101: Missing parameter(s) in Docstring: - labels

Could you add labels to that docstring?

Sure @htahir1 I'll fix this!

@shivalikasingh95
Copy link
Contributor Author

If it's not too much of a pain, could you also write a unit test validating the output of the label config utility function you've added? You'll see a template for how to do that exists already in our tests folder, so it shouldn't be too much hassle I hope!

As for the rest, I'll check it properly in the morning, but it looks great at first glance!

Sure thing @strickvl! I'd be happy to write the unit test :) Will update the PR shortly!

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@htahir1
Copy link
Contributor

htahir1 commented Nov 14, 2022

@shivalikasingh95 Thank you! When u hav written the test just ping me and ill merge this!

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

3 similar comments
@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

5 similar comments
@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

7 similar comments
@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

2 similar comments
@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@shivalikasingh95
Copy link
Contributor Author

shivalikasingh95 commented Nov 29, 2022

Hi @htahir1 and @strickvl apologies for the delay at my end. Had to take last week off due to some reasons. I have updated the PR with the required changes. Let me know if anything else needs to be updated.

Hi @htahir1 and @strickvl just a gentle reminder to do a quick review of the PR whenever you guys find the time :)

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@htahir1
Copy link
Contributor

htahir1 commented Nov 29, 2022

@shivalikasingh95 Sorry for the delay here. @strickvl is the only one who can validate the test and hes on vacation and only back in a few days. We will take a look and merge this week!

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@shivalikasingh95
Copy link
Contributor Author

@shivalikasingh95 Sorry for the delay here. @strickvl is the only one who can validate the test and hes on vacation and only back in a few days. We will take a look and merge this week!

@htahir1 No problem, thanks for the update! I just thought of checking once from my end. Will wait for @strickvl to get back :) No worries!

@github-actions
Copy link
Contributor

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2022

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2022

@strickvl
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

Copy link
Contributor

@strickvl strickvl left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution, and for adding in the tests. This looks good to me and I'll get it merged in now.

@strickvl strickvl changed the title Label studio generate OCR config support added Add support for Label Studio OCR config generation Dec 2, 2022
@strickvl
Copy link
Contributor

strickvl commented Dec 2, 2022

@shivalikasingh95 for the other suggested contributions, points 1 and 2 would probably be best to start with right now. The third one will also be welcomed, but it might interact or be improved by something else that's changing in the codebase right now so maybe give it a couple of weeks before you take a look at that.

Some of the Label Studio config auto-generation might be a bit more tricky, however, so feel free to check in with us if you have any questions. Just try to be as generic as possible and you should be fine.

@strickvl strickvl merged commit 53d780e into zenml-io:develop Dec 2, 2022
@htahir1
Copy link
Contributor

htahir1 commented Dec 19, 2022

@shivalikasingh95 Thank you for your contribution! I have posted about it here: https://www.linkedin.com/posts/hamzatahirofficial_mlops-activity-7010547706611834881-2_37?utm_source=share&utm_medium=member_desktop :-)

Again congrats on your awesome submission!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants