[Fix] [DP] Automatically create nonexistent directory for base configs

pull/1538/head
Tong Gao 2022-11-16 12:49:13 +08:00 committed by GitHub
parent 00254f0390
commit 9785dc616c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -127,6 +127,7 @@ class BaseDataConverter:
break
if c.lower() == 'n':
return
mkdir_or_exist(osp.dirname(cfg_path))
with open(cfg_path, 'w') as f:
f.write(
f'{self.dataset_name}_{self.task}_data_root = \'{self.data_root}\'\n' # noqa: E501