File size: 471 Bytes
9126e0d
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
"""Resolve bundled legacy dependencies without hard-coded cluster paths."""
from pathlib import Path
import os
def legacy_root(root):
    if os.getenv('REFSEG_LEGACY_ROOT'):return Path(os.environ['REFSEG_LEGACY_ROOT']).resolve()
    root=Path(root)
    for p in [root/'legacy_project',root.parent/'refseg_scale_20260906',root.parent/'RefSeg_Scale_MVA']:
        if p.exists():return p
    raise FileNotFoundError('Bundled legacy_project missing; set REFSEG_LEGACY_ROOT')