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

Code Cleanup and Improved Tests #69

Merged
merged 72 commits into from
Sep 19, 2024
Merged

Code Cleanup and Improved Tests #69

merged 72 commits into from
Sep 19, 2024

Conversation

kozlov721
Copy link
Collaborator

@kozlov721 kozlov721 commented Sep 9, 2024

DevOps

  • Synced the CI pipeline with the one in luxonis-ml
    • Added automatic labeler and assigner
  • Removed MacOS tests because they're running out of memory
  • Added type checking requirement
  • Set the minimum coverage to 90 %
  • Updated information in CONTRIBUTING.md
  • Changed formatter settings to conform to PEP 8

Cleanup

  • Removed dead code
  • Added missing docs
  • Added missing types
  • Some modules moved and renamed
    • Loaders, assigners, callbacks and schedulers moved from luxonis_train.utils to luxonis_train
    • luxonis_train.utils better organized
  • Changed types of some raised exceptions
  • Improved error messages

Tests

  • Increased coverage to 97 %
  • Added sanity tests for every backbone/head combination
    • Groundwork for overfit tests, can be turned on by specifying LUXONIS_TRAIN_OVERFIT env variable, but not yet reliable

Fixes

  • Fixed SmoothBCEWithLogitsLoss
  • Fixed SoftmaxFocalLoss
    • Removed incorrect multiclass implementation
    • Currently both focal losses only support binary tasks, support for multiclass will be added later

Changes

  • Added GradientAccumulationScheduler, StochasticWeightAveraging, Timer, and ModelPruning callbacks to the callback REGISTRY
  • added trainer.deterministic option to the config file as a way to use "warn" option for models incompatible with determinism
  • added size_multiplier option to luxonis_train inspect CLI command to better display large images
  • removed the Protocol pattern from BaseNode
  • added F1 score to MeanAveragePrecision for bounding boxes

Discovered Issues

  • The ImplicitKeypointBBoxHead does not train
    • Wasn't able to find out why
    • Will address in a separate PR
    • For now, changed the default keypoint head in the predefined keypoint model to EfficientKeypointBBoxHead
      • That one was more performant anyways as far as I know

@github-actions github-actions bot added tests Adding or changing tests DevOps Changes related to DevOps CLI Changes affecting the CLI labels Sep 9, 2024
@kozlov721 kozlov721 added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 9, 2024
@kozlov721 kozlov721 merged commit 7daabdc into dev Sep 19, 2024
8 checks passed
@kozlov721 kozlov721 deleted the cleanup branch September 19, 2024 05:06
@kozlov721 kozlov721 mentioned this pull request Oct 9, 2024
kozlov721 added a commit that referenced this pull request Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Changes affecting the CLI DevOps Changes related to DevOps documentation Improvements or additions to documentation enhancement New feature or request tests Adding or changing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants