fhe_aging_pace / common.py
vivanov
df
ed06307
Raw History Blame Contribute Delete
682 Bytes
from pathlib import Path
ROOT_DIR = Path(__file__).parent
KEYS_PATH = ROOT_DIR / ".fhe_keys"
CLIENT_TMP_PATH = ROOT_DIR / "client_tmp"
SERVER_TMP_PATH = ROOT_DIR / "server_tmp"
EXAMPLES_PATH = ROOT_DIR / "examples"
DUNEDIN_PACE_DATA_PATH = ROOT_DIR / "dunedin_pace_data.json"
KEYS_PATH.mkdir(exist_ok=True)
CLIENT_TMP_PATH.mkdir(exist_ok=True)
SERVER_TMP_PATH.mkdir(exist_ok=True)
CSV_EXAMPLES = [str(file) for file in EXAMPLES_PATH.glob("**/*")]
SERVER_URL = "http://localhost:8000"
SCALE = 100000
def get_tmp_file_path(user_id, file_name, type="client"):
tmp_path = SERVER_TMP_PATH if type == "server" else CLIENT_TMP_PATH
return tmp_path / f"{user_id}_{file_name}"