[Fix] Fix `split` in Darts config (#451)

* fix split in DARTS config

* fix isort version

---------

Co-authored-by: gaoyang07 <1546308416@qq.com>
0.x
Yang Gao 2023-02-17 10:52:33 +08:00 committed by GitHub
parent d13b848666
commit 892af92c46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -4,8 +4,8 @@ repos:
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
- repo: https://github.com/PyCQA/isort
rev: 5.11.5
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-yapf

View File

@ -61,7 +61,7 @@ def train_mmcls_model(model,
logger = get_root_logger()
# Difference from mmclassification.
# Split dataset.
if cfg.data.get('split', False):
if cfg.data.pop('split', False):
train_dataset = dataset[0]
dataset[0] = split_dataset(train_dataset)