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 logger, tests and refactor #62

Merged
merged 34 commits into from
Sep 27, 2024
Merged

Add logger, tests and refactor #62

merged 34 commits into from
Sep 27, 2024

Conversation

sokovninn
Copy link
Member

@sokovninn sokovninn commented Sep 24, 2024

This PR includes:

  • Added utils unit tests
  • Added missing docstrings
  • Added luxonis-ml logger
  • Minor fixes
  • Modified tests structure: divided into core and heavy, only unit tests for PRs to dev

For larger test coverage more powerful runners (like BuildJet) should be used.

@sokovninn sokovninn changed the title Add logger, test and refactor Add logger, tests and refactor Sep 24, 2024
@sokovninn sokovninn self-assigned this Sep 24, 2024
Copy link

github-actions bot commented Sep 24, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1398 867 62% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
datadreamer/dataset_annotation/clip_annotator.py 57% 🟢
datadreamer/dataset_annotation/image_annotator.py 88% 🟢
datadreamer/dataset_annotation/owlv2_annotator.py 68% 🟢
datadreamer/dataset_annotation/utils.py 57% 🟢
datadreamer/image_generation/clip_image_tester.py 96% 🟢
datadreamer/image_generation/image_generator.py 26% 🟢
datadreamer/image_generation/sdxl_image_generator.py 25% 🟢
datadreamer/image_generation/sdxl_lightning_image_generator.py 28% 🟢
datadreamer/image_generation/sdxl_turbo_image_generator.py 32% 🟢
datadreamer/pipelines/generate_dataset_from_scratch.py 41% 🟢
datadreamer/prompt_generation/lm_prompt_generator.py 60% 🟢
datadreamer/prompt_generation/lm_synonym_generator.py 36% 🟢
datadreamer/prompt_generation/prompt_generator.py 87% 🟢
datadreamer/prompt_generation/synonym_generator.py 85% 🟢
datadreamer/prompt_generation/tinyllama_lm_prompt_generator.py 85% 🟢
datadreamer/utils/base_converter.py 96% 🟢
datadreamer/utils/coco_converter.py 95% 🟢
datadreamer/utils/convert_dataset.py 21% 🟢
datadreamer/utils/dataset_utils.py 94% 🟢
datadreamer/utils/luxonis_dataset_converter.py 82% 🟢
datadreamer/utils/merge_raw_datasets.py 75% 🟢
datadreamer/utils/nms.py 75% 🟢
datadreamer/utils/single_label_cls_converter.py 97% 🟢
datadreamer/utils/yolo_converter.py 88% 🟢
TOTAL 66% 🟢

updated for commit: 05b13be by action🐍

Copy link
Contributor

@HonzaCuhel HonzaCuhel left a comment

Choose a reason for hiding this comment

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

LGTM, left some comment with a cosmetic suggestion.

Copy link
Contributor

@HonzaCuhel HonzaCuhel Sep 25, 2024

Choose a reason for hiding this comment

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

In the project, somewhere, we use List and Tuple in the function/method declaration, but sometimes we use list and tuple. Could we please unify this?

Choose a reason for hiding this comment

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

This is difference between python3.8 and python3.10.
Are there some functionalities (other than these type annotations) used from python3.10? Otherwise we can still keep minimum version to 3.8 and change the type hints to List, Tuple, ....

Copy link
Contributor

@kozlov721 kozlov721 Sep 25, 2024

Choose a reason for hiding this comment

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

Just a note; python 3.8 reached its EOL this month, do we want to keep supporting it? IMHO we should migrate datadreamer and luxonis-ml to 3.10 sooner rather than later.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kozlov721 I'd keep support for 3.8 support for now. Or are there any drawbacks?

Copy link

@klemen1999 klemen1999 left a comment

Choose a reason for hiding this comment

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

LGTM

datadreamer/utils/luxonis_dataset_converter.py Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Sep 25, 2024

Test Results

  6 files    6 suites   44m 33s ⏱️
 62 tests  51 ✅ 11 💤 0 ❌
372 runs  304 ✅ 68 💤 0 ❌

Results for commit 05b13be.

♻️ This comment has been updated with latest results.

@sokovninn sokovninn merged commit f800b49 into dev Sep 27, 2024
9 checks passed
@sokovninn sokovninn deleted the refactor/tests-refactor branch November 12, 2024 12:56
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.

5 participants