Support both *.yml and *.yaml files (#4086)
Co-authored-by: ChristopherRogers1991 <ChristopherRogers1991@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sungjoo(Dennis) Hwang <48212469+Denny-Hwang@users.noreply.github.com>
This commit is contained in:
parent
f2ed85790f
commit
b507e3a032
10 changed files with 17 additions and 17 deletions
|
|
@ -126,7 +126,7 @@ class BaseValidator:
|
|||
self.args.batch = 1 # export.py models default to batch-size 1
|
||||
LOGGER.info(f'Forcing batch=1 square inference (1,3,{imgsz},{imgsz}) for non-PyTorch models')
|
||||
|
||||
if isinstance(self.args.data, str) and self.args.data.endswith('.yaml'):
|
||||
if isinstance(self.args.data, str) and self.args.data.split('.')[-1] in ('yaml', 'yml'):
|
||||
self.data = check_det_dataset(self.args.data)
|
||||
elif self.args.task == 'classify':
|
||||
self.data = check_cls_dataset(self.args.data, split=self.args.split)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue