General ultralytics==8.0.6 updates (#351)
Co-authored-by: Dzmitry Plashchynski <plashchynski@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
70427579b8
commit
f8e32c4c13
16 changed files with 79 additions and 80 deletions
|
|
@ -506,10 +506,12 @@ class BaseTrainer:
|
|||
def check_resume(self):
|
||||
resume = self.args.resume
|
||||
if resume:
|
||||
last = Path(check_file(resume) if isinstance(resume, str) else get_latest_run())
|
||||
last = Path(check_file(resume) if isinstance(resume, (str, Path)) else get_latest_run())
|
||||
args_yaml = last.parent.parent / 'args.yaml' # train options yaml
|
||||
if args_yaml.is_file():
|
||||
args = get_config(args_yaml) # replace
|
||||
assert args_yaml.is_file(), \
|
||||
FileNotFoundError('Resume checkpoint f{last} not found. '
|
||||
'Please pass a valid checkpoint to resume from, i.e. yolo resume=path/to/last.pt')
|
||||
args = get_config(args_yaml) # replace
|
||||
args.model, resume = str(last), True # reinstate
|
||||
self.args = args
|
||||
self.resume = resume
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue