MCPcopy Index your code
hub / github.com/modelscope/modelscope / get_dataset_cache_root

Function get_dataset_cache_root

modelscope/utils/file_utils.py:70–78  ·  view source on GitHub ↗

Get dataset raw file cache root path. if `MODELSCOPE_CACHE` is set, return `MODELSCOPE_CACHE/datasets`, else return `~/.cache/modelscope/hub/datasets` Returns: str: the modelscope dataset raw file cache root.

()

Source from the content-addressed store, hash-verified

68
69
70def get_dataset_cache_root() -> str:
71 """Get dataset raw file cache root path.
72 if `MODELSCOPE_CACHE` is set, return `MODELSCOPE_CACHE/datasets`,
73 else return `~/.cache/modelscope/hub/datasets`
74
75 Returns:
76 str: the modelscope dataset raw file cache root.
77 """
78 return os.path.join(get_modelscope_cache_dir(), 'datasets')
79
80
81def get_dataset_cache_dir(dataset_id: str) -> str:

Callers 3

config_ds.pyFile · 0.90
get_dataset_cache_dirFunction · 0.85

Calls 1

get_modelscope_cache_dirFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…