Module neuralops.utils.paths
Functions
def get_datasets_dir() ‑> pathlib.Path-
Expand source code
def get_datasets_dir() -> Path: """Returns the absolute path to the global datasets directory.""" return get_project_root() / "datasets"Returns the absolute path to the global datasets directory.
def get_glue_dir() ‑> pathlib.Path-
Expand source code
def get_glue_dir() -> Path: """Returns the absolute path to the local GLUE datasets.""" return get_datasets_dir() / "glue"Returns the absolute path to the local GLUE datasets.
def get_project_root() ‑> pathlib.Path-
Expand source code
def get_project_root() -> Path: """Returns the absolute path to the project root directory (uni/Project).""" # Current file is in neuralops/utils/paths.py, project root is 4 levels up return Path(__file__).resolve().parent.parent.parent.parentReturns the absolute path to the project root directory (uni/Project).
def resolve_path(relative_path: str) ‑> str-
Expand source code
def resolve_path(relative_path: str) -> str: """Resolves a path relative to the project root and returns as string.""" return str((get_project_root() / relative_path).resolve())Resolves a path relative to the project root and returns as string.