ultralytics 8.0.176 update Dockerfile-arm64 to 22.04 (#4857)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kalen Michael <kalenmike@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-09-12 17:56:37 +02:00 committed by GitHub
parent fdf08d823e
commit e73447effb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 29 additions and 29 deletions

View file

@ -117,8 +117,7 @@ class HUBTrainingSession:
if data['status'] == 'new': # new model to start training
self.train_args = {
# TODO deprecate 'batch_size' argument in favor of 'batch'
'batch': data['batch' if 'batch' in data else 'batch_size'],
'batch': data['batch_size'], # note HUB argument is slightly different
'epochs': data['epochs'],
'imgsz': data['imgsz'],
'patience': data['patience'],
@ -159,6 +158,7 @@ class HUBTrainingSession:
data = {'epoch': epoch}
if final:
data.update({'type': 'final', 'map': map})
filesize = Path(weights).stat().st_size
smart_request('post',
url,
data=data,
@ -167,7 +167,7 @@ class HUBTrainingSession:
retry=10,
timeout=3600,
thread=False,
progress=True,
progress=filesize,
code=4)
else:
data.update({'type': 'epoch', 'isBest': bool(is_best)})

View file

@ -70,14 +70,15 @@ def requests_with_progress(method, url, **kwargs):
(requests.Response): The response object from the HTTP request.
Note:
If 'progress' is set to True, the progress bar will display the download progress
for responses with a known content length.
- If 'progress' is set to True, the progress bar will display the download progress for responses with a known
content length.
- If 'progress' is a number then progress bar will display assuming content length = progress.
"""
progress = kwargs.pop('progress', False)
if not progress:
return requests.request(method, url, **kwargs)
response = requests.request(method, url, stream=True, **kwargs)
total = int(response.headers.get('content-length', 0)) # total size
total = int(response.headers.get('content-length', 0) if isinstance(progress, bool) else progress) # total size
try:
pbar = TQDM(total=total, unit='B', unit_scale=True, unit_divisor=1024)
for data in response.iter_content(chunk_size=1024):