ultralytics 8.0.183 RayTune and yolo checks fixes (#5002)

Co-authored-by: Kapil Raj <103250862+raj-kapil@users.noreply.github.com>
Co-authored-by: Muhammad Rizwan Munawar <62513924+RizwanMunawar@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-09-20 16:33:43 +02:00 committed by GitHub
parent 7f78fad8ba
commit 3223e71fea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 124 additions and 64 deletions

View file

@ -493,9 +493,15 @@ def collect_system_info():
f"{'CPU':<20}{get_cpu_info()}\n"
f"{'CUDA':<20}{torch.version.cuda if torch and torch.cuda.is_available() else None}\n")
for r in parse_requirements():
if (ROOT.parent / 'requirements.txt').exists(): # pip install
requirements = parse_requirements()
else: # git install
from pkg_resources import get_distribution
requirements = get_distribution('ultralytics').requires()
for r in requirements:
current = version(r.name)
is_met = '' if check_version(current, r.specifier) else ''
is_met = '' if check_version(current, str(r.specifier)) else ''
LOGGER.info(f'{r.name:<20}{is_met}{current}{r.specifier}')

View file

@ -124,7 +124,7 @@ def run_ray_tune(model,
tuner_callbacks = [WandbLoggerCallback(project='YOLOv8-tune')] if wandb else []
# Create the Ray Tune hyperparameter search tuner
tune_dir = get_save_dir(DEFAULT_CFG, name='tune')
tune_dir = get_save_dir(DEFAULT_CFG, name='tune').resolve() # must be absolute dir
tune_dir.mkdir(parents=True, exist_ok=True)
tuner = tune.Tuner(trainable_with_resources,
param_space=space,