File size: 415 Bytes
4d43445 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | """Make command-line entry points independent of the current directory."""
from __future__ import annotations
import os
import sys
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
def configure_runtime() -> Path:
root = str(PROJECT_ROOT)
if root not in sys.path:
sys.path.insert(0, root)
os.environ.setdefault("TF_USE_LEGACY_KERAS", "1")
return PROJECT_ROOT
|