Anlea commited on
Commit
f66b538
·
verified ·
1 Parent(s): 7a981dc

fix: update inference.py with runs/ prefix fallback

Browse files
Files changed (1) hide show
  1. src/inference.py +7 -2
src/inference.py CHANGED
@@ -1219,9 +1219,14 @@ class RunCheckpoint:
1219
  if repo is None:
1220
  return None, config
1221
  prefix = f"{selected}/" if selected else ""
1222
- downloaded = RunCheckpoint.download(repo, f"{prefix}{name}")
1223
  try:
1224
- metrics = RunCheckpoint.download(repo, f"{prefix}metrics.json")
 
 
 
 
 
 
1225
  except ValueError:
1226
  metrics = None
1227
  if metrics is None:
 
1219
  if repo is None:
1220
  return None, config
1221
  prefix = f"{selected}/" if selected else ""
 
1222
  try:
1223
+ downloaded = RunCheckpoint.download(repo, f"{prefix}{name}")
1224
+ active_prefix = prefix
1225
+ except ValueError:
1226
+ downloaded = RunCheckpoint.download(repo, f"runs/{prefix}{name}")
1227
+ active_prefix = f"runs/{prefix}"
1228
+ try:
1229
+ metrics = RunCheckpoint.download(repo, f"{active_prefix}metrics.json")
1230
  except ValueError:
1231
  metrics = None
1232
  if metrics is None: