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.
()
| 68 | |
| 69 | |
| 70 | def 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 | |
| 81 | def get_dataset_cache_dir(dataset_id: str) -> str: |
no test coverage detected
searching dependent graphs…