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

PyCharm Code and Docs Inspect fixes v1 #18461

Merged
merged 34 commits into from
Jan 2, 2025
Merged

PyCharm Code and Docs Inspect fixes v1 #18461

merged 34 commits into from
Jan 2, 2025

Conversation

RizwanMunawar
Copy link
Member

@RizwanMunawar RizwanMunawar commented Dec 30, 2024

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

This PR significantly improves documentation consistency and code clarity across the repository by fixing typos, updating explanations, and standardizing naming conventions.

📊 Key Changes

  • Documentation Fixes:

    • Corrected grammatical errors, improved phrasing, and made descriptions clearer in multiple documentation files (e.g., SKU-110k, NVIDIA Jetson, Tiled Inference, and others).
    • Updated markdown formatting to align with modern best practices, such as replacing deprecated warning styles with proper context labels (!!! warning blocks).
  • Code Style Updates:

    • Renamed methods and variables for better readability and adherence to naming conventions (e.g., applyEccapplyecc, coordscoordinates, smooth_BCEsmooth_bce).
    • Refactored a large configuration initialization block for compactness and ease of readability.
  • Code Examples:

    • Improved Python code snippets in docs and code comments for correctness and clarity.
  • Typographical Consistency:

    • Standardized terms like "multiscale" (replacing inconsistent variations like "multi-scale") and ensured uniform phrasing in parameter descriptions across files.

🎯 Purpose & Impact

  • Purpose:

    • To enhance developer and user experience by making documentation and code more understandable.
    • To align code with internal style guides and best programming practices.
  • Impact on Users:

    • Easier navigation and implementation for new users thanks to clearer instructions and corrected examples.
    • More maintainable and consistent naming conventions for developers, reducing confusion.
  • Impact on Codebase:

    • Cleaner and more readable code improves collaboration and minimizes onboarding time for contributors.

Verified

This commit was signed with the committer’s verified signature.
eps1lon Sebastian "Sebbie" Silbermann
@RizwanMunawar RizwanMunawar marked this pull request as draft December 30, 2024 15:25
@UltralyticsAssistant UltralyticsAssistant added the documentation Improvements or additions to documentation label Dec 30, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @RizwanMunawar, thank you for submitting an ultralytics/ultralytics 🚀 PR! To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/ultralytics main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Ensure you have signed our Contributor License Agreement (CLA) if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more guidance, please refer to the project's contributing guide. Don’t hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀

Note: This is an automated response, and an Ultralytics engineer will review and assist you with your PR soon. 😊

…ytics into pycharm-patch
@RizwanMunawar RizwanMunawar changed the title PyCharm Docs Inspect fixes v1 PyCharm Code and Docs Inspect fixes v1 Dec 30, 2024
Copy link

codecov bot commented Dec 30, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 73.79%. Comparing base (126867e) to head (06bfef1).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
ultralytics/data/augment.py 0.00% 2 Missing ⚠️
ultralytics/models/sam/predict.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18461      +/-   ##
==========================================
+ Coverage   73.70%   73.79%   +0.09%     
==========================================
  Files         129      129              
  Lines       17280    17267      -13     
==========================================
+ Hits        12736    12742       +6     
+ Misses       4544     4525      -19     
Flag Coverage Δ
Benchmarks 34.91% <10.00%> (+0.06%) ⬆️
GPU 38.32% <10.00%> (+0.02%) ⬆️
Tests 67.57% <70.00%> (+0.05%) ⬆️

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.

RizwanMunawar and others added 4 commits December 30, 2024 22:11
@RizwanMunawar RizwanMunawar marked this pull request as ready for review January 1, 2025 10:14
@RizwanMunawar
Copy link
Member Author

@glenn-jocher Hi, could you please review this PR? Let me know if any changes are needed, and I can update things accordingly. Thank you!

@Laughing-q Hey buddy, I’ve updated the SAM/predict.py structure of the inference_state dictionary as outlined below, this will resolve the warning that PyCharm was throwing. Can you please review this? Thank you!

inference_state = {
  "num_frames": predictor.dataset.frames,
  "point_inputs_per_obj": {},
  "mask_inputs_per_obj": {},
  "constants": {},
  "obj_id_to_idx": OrderedDict(),
  "obj_idx_to_id": OrderedDict(),
  "obj_ids": [],
  "output_dict": {
      "cond_frame_outputs": {},  # dict containing {frame_idx: <out>}
      "non_cond_frame_outputs": {},  # dict containing {frame_idx: <out>}
  },
  "output_dict_per_obj": {},
  "temp_output_dict_per_obj": {},
  "consolidated_frame_inds": {
      "cond_frame_outputs": set(),  # set containing frame indices
      "non_cond_frame_outputs": set(),  # set containing frame indices
  },
  "tracking_has_started": False,
  "frames_already_tracked": [],
}
predictor.inference_state = inference_state

@RizwanMunawar RizwanMunawar self-assigned this Jan 1, 2025
glenn-jocher and others added 6 commits January 2, 2025 16:08
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
…ytics into pycharm-patch
@glenn-jocher glenn-jocher merged commit 7f1a50e into main Jan 2, 2025
10 of 12 checks passed
@glenn-jocher glenn-jocher deleted the pycharm-patch branch January 2, 2025 20:16
@RizwanMunawar RizwanMunawar removed their assignment Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants