From 92e01c1662e2883d4a1319018020d02661ebedf2 Mon Sep 17 00:00:00 2001 From: Zengyf-CVer <41098760+Zengyf-CVer@users.noreply.github.com> Date: Sat, 23 Apr 2022 04:36:27 +0800 Subject: [PATCH] Add mdformat to precommit checks and update other version (#7529) * Update .pre-commit-config.yaml * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update .pre-commit-config.yaml * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update CONTRIBUTING.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update README.md * Update README.md * Update README.md Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Glenn Jocher --- .github/CODE_OF_CONDUCT.md | 24 ++++---- .pre-commit-config.yaml | 24 ++++---- CONTRIBUTING.md | 18 +++--- README.md | 53 ++++++++--------- utils/loggers/wandb/README.md | 106 +++++++++++++++++++--------------- 5 files changed, 119 insertions(+), 106 deletions(-) diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index ef10b05fc88e..27e59e9aab38 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -121,8 +121,8 @@ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). -[homepage]: https://www.contributor-covenant.org - For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. + +[homepage]: https://www.contributor-covenant.org diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bff7f8a40093..924c940f2c1a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.2.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -24,7 +24,7 @@ repos: - id: check-docstring-first - repo: https://github.com/asottile/pyupgrade - rev: v2.31.1 + rev: v2.32.0 hooks: - id: pyupgrade args: [--py36-plus] @@ -42,15 +42,17 @@ repos: - id: yapf name: YAPF formatting - # TODO - #- repo: https://github.com/executablebooks/mdformat - # rev: 0.7.7 - # hooks: - # - id: mdformat - # additional_dependencies: - # - mdformat-gfm - # - mdformat-black - # - mdformat_frontmatter + - repo: https://github.com/executablebooks/mdformat + rev: 0.7.14 + hooks: + - id: mdformat + additional_dependencies: + - mdformat-gfm + - mdformat-black + exclude: | + (?x)^( + README.md + )$ - repo: https://github.com/asottile/yesqa rev: v1.3.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ebde03a562a0..13b9b73b50cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,16 +18,19 @@ Submitting a PR is easy! This example shows how to submit a PR for updating `req ### 1. Select File to Update Select `requirements.txt` to update by clicking on it in GitHub. +

PR_step1

### 2. Click 'Edit this file' Button is in top-right corner. +

PR_step2

### 3. Make Changes Change `matplotlib` version from `3.2.2` to `3.3`. +

PR_step3

### 4. Preview Changes and Submit PR @@ -35,6 +38,7 @@ Change `matplotlib` version from `3.2.2` to `3.3`. Click on the **Preview changes** tab to verify your updates. At the bottom of the screen select 'Create a **new branch** for this commit', assign your branch a descriptive name such as `fix/matplotlib_version` and click the green **Propose changes** button. All done, your PR is now submitted to YOLOv5 for review and approval πŸ˜ƒ! +

PR_step4

### PR recommendations @@ -70,21 +74,21 @@ understand and use to **reproduce** the problem. This is referred to by communit a [minimum reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). Your code that reproduces the problem should be: -* βœ… **Minimal** – Use as little code as possible that still produces the same problem -* βœ… **Complete** – Provide **all** parts someone else needs to reproduce your problem in the question itself -* βœ… **Reproducible** – Test the code you're about to provide to make sure it reproduces the problem +- βœ… **Minimal** – Use as little code as possible that still produces the same problem +- βœ… **Complete** – Provide **all** parts someone else needs to reproduce your problem in the question itself +- βœ… **Reproducible** – Test the code you're about to provide to make sure it reproduces the problem In addition to the above requirements, for [Ultralytics](https://ultralytics.com/) to provide assistance your code should be: -* βœ… **Current** – Verify that your code is up-to-date with current +- βœ… **Current** – Verify that your code is up-to-date with current GitHub [master](https://github.com/ultralytics/yolov5/tree/master), and if necessary `git pull` or `git clone` a new copy to ensure your problem has not already been resolved by previous commits. -* βœ… **Unmodified** – Your problem must be reproducible without any modifications to the codebase in this +- βœ… **Unmodified** – Your problem must be reproducible without any modifications to the codebase in this repository. [Ultralytics](https://ultralytics.com/) does not provide support for custom code ⚠️. -If you believe your problem meets all of the above criteria, please close this issue and raise a new one using the πŸ› ** -Bug Report** [template](https://github.com/ultralytics/yolov5/issues/new/choose) and providing +If you believe your problem meets all of the above criteria, please close this issue and raise a new one using the πŸ› +**Bug Report** [template](https://github.com/ultralytics/yolov5/issues/new/choose) and providing a [minimum reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) to help us better understand and diagnose your problem. diff --git a/README.md b/README.md index 54c5cbd83f5b..f1dd65b0a4b1 100644 --- a/README.md +++ b/README.md @@ -103,8 +103,6 @@ results.print() # or .show(), .save(), .crop(), .pandas(), etc. - -
Inference with detect.py @@ -149,20 +147,20 @@ python train.py --data coco.yaml --cfg yolov5n.yaml --weights '' --batch-size 12
Tutorials -* [Train Custom Data](https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data)  πŸš€ RECOMMENDED -* [Tips for Best Training Results](https://github.com/ultralytics/yolov5/wiki/Tips-for-Best-Training-Results)  ☘️ +- [Train Custom Data](https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data)Β  πŸš€ RECOMMENDED +- [Tips for Best Training Results](https://github.com/ultralytics/yolov5/wiki/Tips-for-Best-Training-Results)Β  ☘️ RECOMMENDED -* [Weights & Biases Logging](https://github.com/ultralytics/yolov5/issues/1289)  🌟 NEW -* [Roboflow for Datasets, Labeling, and Active Learning](https://github.com/ultralytics/yolov5/issues/4975)  🌟 NEW -* [Multi-GPU Training](https://github.com/ultralytics/yolov5/issues/475) -* [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36)  ⭐ NEW -* [TFLite, ONNX, CoreML, TensorRT Export](https://github.com/ultralytics/yolov5/issues/251) πŸš€ -* [Test-Time Augmentation (TTA)](https://github.com/ultralytics/yolov5/issues/303) -* [Model Ensembling](https://github.com/ultralytics/yolov5/issues/318) -* [Model Pruning/Sparsity](https://github.com/ultralytics/yolov5/issues/304) -* [Hyperparameter Evolution](https://github.com/ultralytics/yolov5/issues/607) -* [Transfer Learning with Frozen Layers](https://github.com/ultralytics/yolov5/issues/1314)  ⭐ NEW -* [Architecture Summary](https://github.com/ultralytics/yolov5/issues/6998)  ⭐ NEW +- [Weights & Biases Logging](https://github.com/ultralytics/yolov5/issues/1289)Β  🌟 NEW +- [Roboflow for Datasets, Labeling, and Active Learning](https://github.com/ultralytics/yolov5/issues/4975)Β  🌟 NEW +- [Multi-GPU Training](https://github.com/ultralytics/yolov5/issues/475) +- [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36)Β  ⭐ NEW +- [TFLite, ONNX, CoreML, TensorRT Export](https://github.com/ultralytics/yolov5/issues/251) πŸš€ +- [Test-Time Augmentation (TTA)](https://github.com/ultralytics/yolov5/issues/303) +- [Model Ensembling](https://github.com/ultralytics/yolov5/issues/318) +- [Model Pruning/Sparsity](https://github.com/ultralytics/yolov5/issues/304) +- [Hyperparameter Evolution](https://github.com/ultralytics/yolov5/issues/607) +- [Transfer Learning with Frozen Layers](https://github.com/ultralytics/yolov5/issues/1314)Β  ⭐ NEW +- [Architecture Summary](https://github.com/ultralytics/yolov5/issues/6998)Β  ⭐ NEW
@@ -203,7 +201,6 @@ Get started in seconds with our verified environments. Click each icon below for |:-:|:-:| |Automatically track and visualize all your YOLOv5 training runs in the cloud with [Weights & Biases](https://wandb.ai/site?utm_campaign=repo_yolo_readme)|Label and export your custom datasets directly to YOLOv5 for training with [Roboflow](https://roboflow.com/?ref=ultralytics) | -