mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 12:10:09 +01:00
rollback
This commit is contained in:
@@ -225,8 +225,7 @@ class MsDataset:
|
||||
return MsDataset.to_ms_dataset(dataset_inst, target=target)
|
||||
|
||||
dataset_name = os.path.expanduser(dataset_name)
|
||||
is_local_path = os.path.exists(dataset_name) and len(
|
||||
os.listdir(dataset_name)) > 0
|
||||
is_local_path = os.path.exists(dataset_name)
|
||||
# Parse the path in form of `namespace/dataset_name`
|
||||
if is_relative_path(dataset_name) and dataset_name.count(
|
||||
'/') == 1 and not is_local_path:
|
||||
@@ -254,8 +253,8 @@ class MsDataset:
|
||||
**config_kwargs)
|
||||
|
||||
# Load from local disk
|
||||
if dataset_name in _PACKAGED_DATASETS_MODULES or is_local_path or os.path.isfile(
|
||||
dataset_name):
|
||||
if dataset_name in _PACKAGED_DATASETS_MODULES or os.path.isdir(
|
||||
) or os.path.isfile(dataset_name):
|
||||
dataset_inst = LocalDataLoaderManager(
|
||||
dataset_context_config).load_dataset(
|
||||
LocalDataLoaderType.HF_DATA_LOADER)
|
||||
|
||||
Reference in New Issue
Block a user