Skip to content

Commit

Permalink
ultralytics 8.0.227 respect defaults.yaml data (ultralytics#6935)
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Jocher <[email protected]>
  • Loading branch information
glenn-jocher authored Dec 12, 2023
1 parent aa0ae08 commit 765b98f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ultralytics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license

__version__ = '8.0.226'
__version__ = '8.0.227'

from ultralytics.models import RTDETR, SAM, YOLO
from ultralytics.models.fastsam import FastSAM
Expand Down
2 changes: 1 addition & 1 deletion ultralytics/cfg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def entrypoint(debug=''):
LOGGER.warning(f"WARNING ⚠️ 'source' is missing. Using default 'source={overrides['source']}'.")
elif mode in ('train', 'val'):
if 'data' not in overrides and 'resume' not in overrides:
overrides['data'] = TASK2DATA.get(task or DEFAULT_CFG.task, DEFAULT_CFG.data)
overrides['data'] = DEFAULT_CFG.data or TASK2DATA.get(task or DEFAULT_CFG.task, DEFAULT_CFG.data)
LOGGER.warning(f"WARNING ⚠️ 'data' is missing. Using default 'data={overrides['data']}'.")
elif mode == 'export':
if 'format' not in overrides:
Expand Down
2 changes: 1 addition & 1 deletion ultralytics/engine/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def train(self, trainer=None, **kwargs):
checks.check_pip_update_available()

overrides = yaml_load(checks.check_yaml(kwargs['cfg'])) if kwargs.get('cfg') else self.overrides
custom = {'data': TASK2DATA[self.task]} # method defaults
custom = {'data': DEFAULT_CFG_DICT['data'] or TASK2DATA[self.task]} # method defaults
args = {**overrides, **custom, **kwargs, 'mode': 'train'} # highest priority args on the right
if args.get('resume'):
args['resume'] = self.ckpt_path
Expand Down

0 comments on commit 765b98f

Please sign in to comment.