1 2 3 4 5 6 7 8 9 10
import os import pathlib DATA_ROOT = pathlib.Path( os.environ.get( "DATA_ROOT", pathlib.Path(__file__).parent.parent.parent.parent.joinpath("data"), ), ).resolve() assert DATA_ROOT.exists(), f"DATA_ROOT not found: {DATA_ROOT}"