Commit Graph

27 Commits (4bb7eb8b849fc8a90823a60e2b7a8ec9e38926bf)

Author SHA1 Message Date
Glenn Jocher 245d6459a9
Add callbacks (#7315)
* Add `on_train_start()` callback

* Update

* Update
2022-04-06 17:23:34 +02:00
Jirka Borovec c3d5ac151e
precommit: yapf (#5494)
* precommit: yapf

* align isort

* fix

# Conflicts:
#	utils/plots.py

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

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

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

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

* Update setup.cfg

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

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

* Update setup.cfg

* Update setup.cfg

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

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

* Update wandb_utils.py

* Update augmentations.py

* Update setup.cfg

* Update yolo.py

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

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

* Update val.py

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

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

* simplify colorstr

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

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

* val run fix

* export.py last comma

* Update export.py

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

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

* Update hubconf.py

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

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

* PyTorch Hub tuple fix

* PyTorch Hub tuple fix2

* PyTorch Hub tuple fix3

* Update setup

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>
2022-03-31 16:52:34 +02:00
RcINS d115bbf509
Fix `cv2.imwrite` on non-ASCII paths (#7139)
* Fix imwrite on non-ASCII paths

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

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

* Update general.py

* Update __init__.py

* Update __init__.py

* Update datasets.py

* Update hubconf.py

* Update detect.py

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

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

* Update general.py

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>
2022-03-25 13:25:30 +01:00
yeshanliu bc3ed957ce
`np.fromfile()` Chinese image paths fix (#6979)
* 🎉 🆕 now can read Chinese image path. 

use "cv2.imdecode(np.fromfile(f, np.uint8), cv2.IMREAD_COLOR)" instead of "cv2.imread(f)" for Chinese image path.

* Update datasets.py

* Update __init__.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-23 15:35:15 +01:00
Glenn Jocher 9e75cbf4c1
Update __init__.py (#7065) 2022-03-20 18:17:04 +01:00
Glenn Jocher e278fd63ec
Update W&B message to `LOGGER.info()` (#7064) 2022-03-20 18:15:22 +01:00
Ayush Chaurasia 9bcc32a5bf
Flush callbacks when on `--evolve` (#6374)
* log best.pt metrics at train end

* update

* Update __init__.py

* flush callbacks when using evolve

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-01-20 13:22:47 -10:00
Awsaf 7b6938d5b5
Log best results (#6085)
* log best result in summary

* comment added

* add space for `flake8`

* log `best/epoch`

* fix `dimension` for epoch

ValueError: all the input arrays must have same number of dimensions

* log `best/` in `utils.logger.__init__`

* fix pre-commit

1. missing whitespace around operator
2.  over-indented
2021-12-30 13:47:53 -08:00
Ayush Chaurasia 9155eb8641
W&B: Log best results after training ends (#6120)
* log best.pt metrics at train end

* update

* Update __init__.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-30 11:43:19 -08:00
Ayush Chaurasia db6ec66a60
W&B: track batch size after autobatch (#6039)
* track batch size after autobatch

* remove redundant import

* Update __init__.py

* Update __init__.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-23 14:23:50 +01:00
Glenn Jocher bc484579d7
Handle non-TTY `wandb.errors.UsageError` (#5839)
* `try: except (..., wandb.errors.UsageError)`

* bug fix
2021-12-01 15:38:02 +01:00
Jirka Borovec ed887b5976
Add pre-commit CI actions (#4982)
* define pre-commit

* add CI code

* configure

* apply pre-commit

* fstring

* apply MD

* pre-commit

* Update torch_utils.py

* Update print strings

* notes

* Cleanup code-format.yml

* Update setup.cfg

* Update .pre-commit-config.yaml

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-28 18:35:01 +02:00
Glenn Jocher 752d97df2c
Add `on_fit_epoch_end` callback (#5232)
* Add `on_fit_epoch_end` callback

* Add results to train

* Update __init__.py
2021-10-18 14:28:22 +02:00
Ayush Chaurasia d0bfeb3980
W&B: fix DDP with wandb disabled (#5163)
* fix dpp with wandb disabled

* PyCharm reformat

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-13 16:17:15 -07:00
Glenn Jocher 50a9828679
DDP `torch.jit.trace()` `--sync-bn` fix (#4615)
* Remove assert

* debug0

* trace=not opt.sync

* sync to sync_bn fix

* Cleanup
2021-08-30 18:35:07 +02:00
Ayush Chaurasia 11e7c7b48d
W&B: Don't log models in evolve operation (#4611) 2021-08-30 17:07:20 +02:00
Glenn Jocher dc13820c9d
TensorBoard `on_train_end()` speed improvements (#4605) 2021-08-30 13:01:41 +02:00
Glenn Jocher 24bea5e4b7
Standardize headers and docstrings (#4417)
* Implement new headers

* Reformat 1

* Reformat 2

* Reformat 3 - math

* Reformat 4 - yaml
2021-08-14 21:17:51 +02:00
Glenn Jocher e78aeac973
Evolve in CSV format (#4307)
* Update evolution to CSV format

* Update

* Update

* Update

* Update

* Update

* reset args

* reset args

* reset args

* plot_results() fix

* Cleanup

* Cleanup2
2021-08-04 17:13:38 +02:00
Ayush Chaurasia cd540d8625
W&B: suppress warnings (#4257)
* Improve docstrings and run names

* default wandb login prompt with timeout

* return key

* Update api_key check logic

* Properly support zipped dataset feature

* update docstring

* Revert tuorial change

* extend changes to log_dataset

* add run name

* bug fix

* bug fix

* Update comment

* fix import check

* remove unused import

* Hardcore .yaml file extension

* reduce code

* Reformat using pycharm

* Remove redundant try catch

* More refactoring and bug fixes

* retry

* Reformat using pycharm

* respect LOGGERS include list

* call wandblogger.log instead of wandb.log

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-01 12:06:53 +02:00
Kalen Michael b74929c910
Add `train.py` and `val.py` callbacks (#4220)
* added callbacks

* Update callbacks.py

* Update train.py

* Update val.py

* Fix CamlCase add staticmethod

* Refactor logger into callbacks

* Cleanup

* New callback on_val_image_end()

* Add curves and results images to TensorBoard

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-01 00:18:07 +02:00
Glenn Jocher b60b62e874
PyCharm reformat (#4209)
* PyCharm reformat

* YAML reformat

* Markdown reformat
2021-07-28 23:35:14 +02:00
Ayush Chaurasia 750465edae
W&B: More improvements and refactoring (#4205)
* Improve docstrings and run names

* default wandb login prompt with timeout

* return key

* Update api_key check logic

* Properly support zipped dataset feature

* update docstring

* Revert tuorial change

* extend changes to log_dataset

* add run name

* bug fix

* bug fix

* Update comment

* fix import check

* remove unused import

* Hardcore .yaml file extension

* reduce code

* Reformat using pycharm

* Remove redundant try catch

* More refactoring and bug fixes

* retry

* Reformat using pycharm

* respect LOGGERS include list

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-28 23:25:15 +02:00
Ayush Chaurasia e88e8f7a98
W&B: Restructure code to support the new dataset_check() feature (#4197)
* Improve docstrings and run names

* default wandb login prompt with timeout

* return key

* Update api_key check logic

* Properly support zipped dataset feature

* update docstring

* Revert tuorial change

* extend changes to log_dataset

* add run name

* bug fix

* bug fix

* Update comment

* fix import check

* remove unused import

* Hardcore .yaml file extension

* reduce code

* Reformat using pycharm

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-28 17:40:08 +02:00
Ayush Chaurasia 63a1971e31
Improve docstrings and run names (#4174) 2021-07-27 15:13:32 +02:00
Glenn Jocher 96e36a7c91
New CSV Logger (#4148)
* New CSV Logger

* cleanup

* move batch plots into Logger

* rename comment

* Remove total loss from progress bar

* mloss :-1 bug fix

* Update plot_results()

* Update plot_results()

* plot_results bug fix
2021-07-25 19:06:37 +02:00
Glenn Jocher efe60b5681
Refactor train.py and val.py `loggers` (#4137)
* Update loggers

* Config

* Update val.py

* cleanup

* fix1

* fix2

* fix3 and reformat

* format sweep.py

* Logger() class

* cleanup

* cleanup2

* wandb package import fix

* wandb package import fix2

* txt fix

* fix4

* fix5

* fix6

* drop wandb into utils/loggers

* fix 7

* rename loggers/wandb_logging to loggers/wandb

* Update message

* Update message

* Update message

* cleanup

* Fix x axis bug

* fix rank 0 issue

* cleanup
2021-07-25 01:18:39 +02:00