Spaces:
Running
Running
Fix sample path resolution for Space root layout
Browse files- space_utils.py +4 -6
space_utils.py
CHANGED
|
@@ -351,12 +351,10 @@ def analyze_path(path: Path) -> SpaceBundle:
|
|
| 351 |
|
| 352 |
def find_local_sample() -> Optional[Path]:
|
| 353 |
here = Path(__file__).resolve()
|
| 354 |
-
candidates = [
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
here.parents[1] / "examples" / "synthetic" / "report.json",
|
| 359 |
-
]
|
| 360 |
for candidate in candidates:
|
| 361 |
if candidate.exists():
|
| 362 |
return candidate
|
|
|
|
| 351 |
|
| 352 |
def find_local_sample() -> Optional[Path]:
|
| 353 |
here = Path(__file__).resolve()
|
| 354 |
+
candidates = [here.parent / "sample_report.json"]
|
| 355 |
+
for parent in (here.parent, *tuple(here.parents)):
|
| 356 |
+
candidates.append(parent / "examples" / "synthetic" / "report.json")
|
| 357 |
+
candidates.append(parent / "examples" / "a100_vllm" / "report.json")
|
|
|
|
|
|
|
| 358 |
for candidate in candidates:
|
| 359 |
if candidate.exists():
|
| 360 |
return candidate
|