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 docstrings to new HUB functions #7576

Merged
merged 1 commit into from Jan 14, 2024
Merged

Add docstrings to new HUB functions #7576

merged 1 commit into from Jan 14, 2024

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jan 14, 2024

@kalenmike @hassaanfarooq01 this PR adds single-line docstrings to the newly introduced functions that are lacking them.

Every function within our open-source repositories must be accompanied by at least a single-line docstring. These will also render within the Docs reference section in addition to the code.

EDIT: Also note that a lines that start with # are not actually docstrings and will be ignored by MkDocs and other tools. Instead the docstring, even if it's single-line, must start and end with """

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improving documentation and code clarity for model handling in the Ultralytics Hub.

πŸ“Š Key Changes

  • Updated documentation strings for load_model, create_model, _set_train_args, _parse_identifier, retry_request, and _should_retry functions.
  • Clarified the purpose of methods with more descriptive docstrings.

🎯 Purpose & Impact

  • πŸ“– Improves code readability and documentation, making it easier for developers to understand the functionality of methods.
  • πŸ› οΈ Enhances maintainability of the codebase, as better commented code aids future updates and bug fixes.
  • β˜‘οΈ Assists new developers or users in usability by clearly explaining what each function does and when it's called, potentially attracting a wider user base.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Copy link

codecov bot commented Jan 14, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (d762496) 76.13% compared to head (b5a5598) 39.60%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7576       +/-   ##
===========================================
- Coverage   76.13%   39.60%   -36.54%     
===========================================
  Files         117      117               
  Lines       14328    14328               
===========================================
- Hits        10909     5674     -5235     
- Misses       3419     8654     +5235     
Flag Coverage Ξ”
Benchmarks ?
GPU 39.60% <ΓΈ> (-0.02%) ⬇️
Tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@glenn-jocher glenn-jocher merged commit 2f11ab5 into main Jan 14, 2024
11 checks passed
@glenn-jocher glenn-jocher deleted the docstrings branch January 14, 2024 19:23
scosijnilvo pushed a commit to scosijnilvo/yolov8 that referenced this pull request Jan 19, 2024
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
hmurari pushed a commit to hmurari/ultralytics that referenced this pull request Apr 17, 2024
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.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.

None yet

1 participant