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

feat/bump #15

Merged
merged 662 commits into from
Oct 17, 2022
Merged

feat/bump #15

merged 662 commits into from
Oct 17, 2022

Conversation

Hojland
Copy link

@Hojland Hojland commented Oct 17, 2022

glenn-jocher and others added 30 commits August 1, 2022 21:45
updates:
- [github.com/asottile/pyupgrade: v2.34.0 → v2.37.3](asottile/pyupgrade@v2.34.0...v2.37.3)
- [github.com/PyCQA/flake8: 4.0.1 → 5.0.2](PyCQA/flake8@4.0.1...5.0.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…tics#8830)

* Update hubconf.py

Loading a custom yolov model causes this line to fail. Adding a test to check if the model actually has a model.model field. With this check, I'm able to load the model no prob.

Loading model via

```py
    model = torch.hub.load(
        'ultralytics/yolov5', 'custom', 'models/frozen_backbone_coco_unlabeled_best.onnx',
        autoshape=True, force_reload=False
    )
```

Causes traceback:

```
Traceback (most recent call last):
  File "/Users/jackson/Documents/GitHub/w210-capstone/.venv/lib/python3.10/site-packages/flask/app.py", line 2077, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/jackson/Documents/GitHub/w210-capstone/.venv/lib/python3.10/site-packages/flask/app.py", line 1525, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/jackson/Documents/GitHub/w210-capstone/.venv/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/jackson/Documents/GitHub/w210-capstone/.venv/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/Users/jackson/Documents/GitHub/w210-capstone/api/endpoints/predictions.py", line 26, in post_predictions
    yolov_predictions = predict_bounding_boxes_for_collection(collection_id)
  File "/Users/jackson/Documents/GitHub/w210-capstone/api/predictions/predict_bounding_boxes.py", line 43, in predict_bounding_boxes_for_collection
    model = torch.hub.load(
  File "/Users/jackson/Documents/GitHub/w210-capstone/.venv/lib/python3.10/site-packages/torch/hub.py", line 404, in load
    model = _load_local(repo_or_dir, model, *args, **kwargs)
  File "/Users/jackson/Documents/GitHub/w210-capstone/.venv/lib/python3.10/site-packages/torch/hub.py", line 433, in _load_local
    model = entry(*args, **kwargs)
  File "/Users/jackson/.cache/torch/hub/ultralytics_yolov5_master/hubconf.py", line 72, in custom
    return _create(path, autoshape=autoshape, verbose=_verbose, device=device)
  File "/Users/jackson/.cache/torch/hub/ultralytics_yolov5_master/hubconf.py", line 67, in _create
    raise Exception(s) from e
Exception: 'DetectMultiBackend' object has no attribute 'model'. Cache may be out of date, try `force_reload=True` or see ultralytics#36 for help.
Exception on /api/v1/predictions [POST]
Traceback (most recent call last):
  File "/Users/jackson/.cache/torch/hub/ultralytics_yolov5_master/hubconf.py", line 58, in _create
    model.model.model[-1].inplace = False  # Detect.inplace=False for safe multithread inference
  File "/Users/jackson/Documents/GitHub/w210-capstone/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1185, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'DetectMultiBackend' object has no attribute 'model'
```

* Update hubconf.py

* Update common.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* New `smart_resume()`

* Update torch_utils.py

* Update torch_utils.py

* Update torch_utils.py

* fix
* Single checkpoint resume

* Update train.py

* Add hyp

* Add hyp

* Add hyp

* FIX

* avoid resume on url data

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* avoid resume on url data

* avoid resume on url data

* Update

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add check_file(data) i.e. `--data coco128.yaml`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* export.py replace `check_file` -> `check_yaml`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix TensorRT --dynamic excess outputs bug

Potential fix for ultralytics#8790

* Cleanup

* Update common.py

* Update common.py

* New fix
@kalenmike should represent a 30% filesize reduction vs 75 quality
--resume training from URL weights fix

@kalenmike should fix data error on HUB resume
* Update CI to default Python 3.10

* Update ci-testing.yml

* Update ci-testing.yml
* Add titles to matplotlib plots

* Add ClearML Experiment Tracking integration.

* Add ClearML Data Version Management automatic download when requested

* Add ClearML Hyperparameter Optimization

* ClearML save period integration

* Fix wandb breaking when used with ClearML dataset

* Fix wandb breaking when used with ClearML resume and dataset

* Add ClearML documentation

* fixed small bug in clearml integration that misreports epoch number

* Final ClearMl additions before refactor

* Add correct epoch reporting

* Add remote execution and autoscaling docs for ClearML integration

* Added images to clearml integration docs

* fixed logo alignment bug and added hpo screenshot clearml

* Fixed small epoch number bug in clearml integration

* Remove saved model flush clearml

* Cleanup clearml readme section

* Cleaned up clearml logger docstring

* Remove resume readme section clearml

* Clearml integration cleanup

* Updated ClearML documentation

* Added dark vs light icons ClearML Readme

* Clearml Readme styling

* Add better gifs

* Fixed gif file size

* Add better images in tutorial notebook

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Addressed comments in PR ultralytics#8620

* Fixed circular import

* Fixed circular import

* Update tutorial.ipynb

* Update tutorial.ipynb

* Inline comment

* Restructured tutorial notebook

* Add correct ClearML link to README

* Update tutorial.ipynb

* Update general.py

* Update __init__.py

* Update __init__.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update __init__.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update __init__.py

* Update README.md

* Update __init__.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* spelling

* Update tutorial.ipynb

* notebook cutt.ly links

* Update README.md

* Update README.md

* cutt.ly links in tutorial

* Removed labels as they show up on last subplot only

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Update smart_optimizer() weight_decay reporting
* emoji-safe default logging

* implement everywhere
* fix: added transparent image and empty alt to social bar

* fix: remove underlines

* fix: hide underlines for all social links

* Update image URLs to ultralytics/assets

* Update bottom 3% icons

* Update README.md

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Fix anchor incorrectly initialized

Using --noautoanchor and --evolve simultaneously leads to anchor incorrectly initialized. --noautoanchor denotes anchors don't need to evolve, thus removing anchors from hyp will fix it.

* Update train.py

* Update train.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
The notes says "Return True if directory has write permissions", however, the code below is "os.R_OK", I think "os.W_OK" is preferred.
glenn-jocher and others added 28 commits September 26, 2022 13:27
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Until more ops are fully supported this update will allow for seamless MPS inference (but slower MPS to CPU transfer before NMS, so slower NMS times).

Partially resolves ultralytics#9596

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Updated Segmentation and Classification usage

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

* Update export.py

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

* Update export.py

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

* Update export.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Update export.py Usage examples

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

* Update export.py

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

* Update export.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Failing on missing path, i.e. no 'www.'

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

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* NMS MPS device wrapper

May resolve ultralytics#9613

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

* Update general.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Add SegmentationModel unsupported warning

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

* Update hubconf.py

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

* Update hubconf.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
…ug (ultralytics#9652)

* disabled upload_dataset flag temporarily due to an artifact related bug

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
ultralytics#9668)

* Added cutout import from utils/augmentations.py to use Cutout Aug in data loader by un-commenting line 679, 680, 681

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update __init__.py

In the Comet logger, when I run train.py, it wants to download the data artifact. It was requiring me to format the 'names' field in the data artifact metadata as a dictionary, so I've changed this so that it also accepts a list.

Signed-off-by: KristenKehrer <34010022+KristenKehrer@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update utils/loggers/comet/__init__.py

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
Signed-off-by: KristenKehrer <34010022+KristenKehrer@users.noreply.github.com>

Signed-off-by: KristenKehrer <34010022+KristenKehrer@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
updates:
- [github.com/asottile/pyupgrade: v2.37.3 → v2.38.2](asottile/pyupgrade@v2.37.3...v2.38.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update export.py

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

* Update export.py

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

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
When running segmentation predict on gpu, the conversion from tensor to numpy fails. Calling `.cpu()` solves this problem. 

Signed-off-by: Paul Guerrie <97041392+paulguerrie@users.noreply.github.com>

Signed-off-by: Paul Guerrie <97041392+paulguerrie@users.noreply.github.com>
Update README.md

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Update

* Update tutorial.ipynb

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

* Update tutorial.ipynb

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

* Update tutorial.ipynb

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

* Update requirements.txt

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

* Update

* Update README.md

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

* Update

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* update mask2segments and saving results

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update general.py

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

* Update predict.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Update hubconf.py

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

* Update hubconf.py

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

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

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
If a parameter does not fall into any other category

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Allow PyTorch Hub results to display in notebooks

* fix CI

* fix CI

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix CI

* fix CI

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix CI

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix CI

* fix CI

* fix CI

* fix CI

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix CI

* fix CI

* fix CI

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@Hojland Hojland merged commit e148d54 into master Oct 17, 2022
@Hojland Hojland deleted the feat/bump branch October 17, 2022 13:01
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.

YOLOv5 issues with torch==1.12 on Multi-GPU systems