fix: use absolute path for cache dir
Browse files
src/snowleopard_reid/cache.py
CHANGED
|
@@ -31,8 +31,10 @@ from snowleopard_reid.visualization import (
|
|
| 31 |
|
| 32 |
logger = logging.getLogger(__name__)
|
| 33 |
|
| 34 |
-
# Cache directory
|
| 35 |
-
|
|
|
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
def get_cache_key(image_path: Path | str, extractor: str) -> str:
|
|
|
|
| 31 |
|
| 32 |
logger = logging.getLogger(__name__)
|
| 33 |
|
| 34 |
+
# Cache directory - use absolute path based on module location
|
| 35 |
+
# This ensures consistent path resolution regardless of cwd
|
| 36 |
+
PROJECT_ROOT = Path(__file__).parent.parent.parent
|
| 37 |
+
CACHE_DIR = PROJECT_ROOT / "cached_results"
|
| 38 |
|
| 39 |
|
| 40 |
def get_cache_key(image_path: Path | str, extractor: str) -> str:
|