NABP-LSTM-Att / scripts /_bootstrap.py
wuxing0105's picture
Upload folder using huggingface_hub
bf928ee verified
Raw
History Blame Contribute Delete
559 Bytes
"""Shared absolute paths for scripts executed directly from this directory."""
import os
import sys
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
if str(PROJECT_ROOT) not in sys.path:
sys.path.insert(0, str(PROJECT_ROOT))
CONF_DIR = PROJECT_ROOT / "conf"
DATA_DIR = CONF_DIR / "data"
VOCAB_DIR = CONF_DIR / "vocab"
WEIGHT_DIR = PROJECT_ROOT / "weight"
OUTPUT_DIR = PROJECT_ROOT / "output"
def use_project_root():
"""Run an upstream script's relative paths against the repository root."""
os.chdir(PROJECT_ROOT)