KokosDev commited on
Commit
65a157d
·
verified ·
1 Parent(s): ceab523

Fix sample path resolution for Space root layout

Browse files
Files changed (1) hide show
  1. 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
- here.parent / "sample_report.json",
356
- here.parents[2] / "examples" / "synthetic" / "report.json",
357
- here.parents[2] / "examples" / "a100_vllm" / "report.json",
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