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

TypeError: update_output_model() got an unexpected keyword argument 'auto_delete_file' #9889

Closed
2 tasks done
JeremyCraigMartinez opened this issue Oct 22, 2022 · 8 comments · Fixed by #9933
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@JeremyCraigMartinez
Copy link

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Training

Bug

Change from 2 months back seems to be failing. Perhaps a newer version of ClearML stripped this argument. Maybe a fix for this would be to add a version requirements for ClearML or remove it altogether?

Traceback (most recent call last):
  File "yolov5/train.py", line 630, in <module>
    main(opt)
  File "yolov5/train.py", line 524, in main
    train(opt.hyp, opt, device, callbacks)
  File "yolov5/train.py", line 424, in train
    callbacks.run('on_train_end', last, best, epoch, results)
  File "/home/ec2-user/SageMaker/Signature detection/yolov5/utils/callbacks.py", line 76, in run
    logger['callback'](*args, **kwargs)
  File "/home/ec2-user/SageMaker/Signature detection/yolov5/utils/loggers/__init__.py", line 297, in on_train_end
    auto_delete_file=False)
TypeError: update_output_model() got an unexpected keyword argument 'auto_delete_file'

Environment

  • YOLO: YOLOv5x
  • Sagemaker (EC2: ml.p2.xlarge)
  • Python: 3.7.12
  • OS: Linux ip-172-16-95-121 4.14.294-150.533.amzn1.x86_64 Image Hosting #1 SMP Thu Sep 29 00:51:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • ClearML: 1.0.3

Minimal Reproducible Example

!python yolov5/train.py ...

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@JeremyCraigMartinez JeremyCraigMartinez added the bug Something isn't working label Oct 22, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 22, 2022

👋 Hello @JeremyCraigMartinez, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://ultralytics.com or email [email protected].

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

YOLOv5 CI

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

@glenn-jocher
Copy link
Member

@JeremyCraigMartinez hi, thanks for the bug report!

@thepycoder can you take a look at this bug? It looks like a ClearML argument no longer exists but is being passes in the YOLOv5 code. This is occurring in two places in the loggers/intit.py:

Screenshot 2022-10-24 at 22 23 44

Should we just delete this argument and problem solved?

TypeError: update_output_model() got an unexpected keyword argument 'auto_delete_file'

glenn-jocher added a commit that referenced this issue Oct 24, 2022
@thepycoder possible fix for #9889

Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher linked a pull request Oct 24, 2022 that will close this issue
@glenn-jocher
Copy link
Member

@thepycoder opened PR #9909 with possible fix, can you please review?

@thepycoder
Copy link
Contributor

thepycoder commented Oct 25, 2022

Hey @glenn-jocher,

Sorry for the late reply. Getting rid of the auto_delete_file would just resurface bug #9251 which I fixed by adding this paramter in PR #9265.

It seems to be breaking because of ClearML version being 1.0.3, which is quite old by now (1y 4m) and didn't have the required parameter yet. So a quick fix for @JeremyCraigMartinez is to update your clearml if possible :) This intergation was written much more recently and didn't take older clearml versions into account.

That said, I agree we don't want it to break randomly for people, so wdyt:

  • Add a minimum version number to the requirements file, even if clearml is just in comments?
  • Add a try except clause to catch it and warn user
  • Add a clear note in the ClearML readme
  • Maybe enforce a minimum version at intialization time, where the actual clearml import is done already in a try except clause anyway?

FYI: support for this parameter was added in v1.2.0

@glenn-jocher
Copy link
Member

@thepycoder got it! We definitely want to add version requirements then in the commented line in requirements.txt, other than that we can check version on import (with a warning, a pip update, both, or just an assert etc).

I'll close #9909.

@glenn-jocher
Copy link
Member

@thepycoder opened #9933 with updates to requirements.txt and ClearmL tutorial adding minimum requirements for pip install clearml>=1.2.0

@glenn-jocher
Copy link
Member

@JeremyCraigMartinez the main problem is that your clearml package is out of date (version >=1.2.0 is required with YOLOv5). Please your ClearML with and try again, and let us know if this fixes your problem. Thanks!

pip install -U clearml

@glenn-jocher
Copy link
Member

@thepycoder PR is merged providing better awareness for version constraints with YOLOv5. Let's see how this works and then we can escalate to more measures like version checks on imports if this continues to be a problem. Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants