-
-
Couldn't load subscription status.
- Fork 17.3k
Update train.py #902
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
Update train.py #902
Conversation
Leave line commented for future use once mystery of best finetuning hyps to apply becomes clearer.
This will allow you to see predictions final testing run after training completes in runs/exp0
|
All updates look good, passing CI, will merge. These are small tweaks to improve training results, visualization and usability. |
|
Hi @glenn-jocher , may I ask why you would only append I think I found one bug in code with the renaming. Lines 366 to 368 in 281d78c
My proposed solution fresults, flast, fbest = log_dir / f'results{n}.txt', wdir / f'last{n}.pt', wdir / f'best{n}.pt'
for f1, f2 in zip([wdir / 'last.pt', wdir / 'best.pt', results_file], [flast, fbest, fresults]): Result from my proposed fix with |
|
@NanoCode012 ah, yes that change works better than what I have, not sure why I was treating results.txt differently. Can you do a quick PR? The isnumeric thing is a bit of a personal hack. I'm currently keeping historical records of experiments in GCP buckets with numeric names (i.e. last241.pt, last242.pt etc), but I'm only sending the 3 files here rather than the entire runs/exp directory so I need to keep the numeric names attached for now. In the future I'm planning on switching to full log_dir saving, and then I can delete the isnumeric line, and then the weights and results should not have any name appended to them (for easier plotting and testing). |
Sure thing! |
* Update train.py with simplified ckpt names * Return default hyps to hyp.scratch.yaml Leave line commented for future use once mystery of best finetuning hyps to apply becomes clearer. * Force test_batch*_pred.jpg replot on final epoch This will allow you to see predictions final testing run after training completes in runs/exp0
* Update train.py with simplified ckpt names * Return default hyps to hyp.scratch.yaml Leave line commented for future use once mystery of best finetuning hyps to apply becomes clearer. * Force test_batch*_pred.jpg replot on final epoch This will allow you to see predictions final testing run after training completes in runs/exp0
* Update train.py with simplified ckpt names * Return default hyps to hyp.scratch.yaml Leave line commented for future use once mystery of best finetuning hyps to apply becomes clearer. * Force test_batch*_pred.jpg replot on final epoch This will allow you to see predictions final testing run after training completes in runs/exp0


🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhanced cleanup and default parameter settings in YOLOv5 training script.
📊 Key Changes
globimport to use globbing patterns for file operations.--hypargument to 'data/hyp.scratch.yaml', standardizing hyperparameter selection.opt.hypargument.🎯 Purpose & Impact