SaylorTwift HF Staff commited on
Commit
b1923e5
·
verified ·
1 Parent(s): b4090e6

Upload folder using huggingface_hub

Browse files
assets/index.js CHANGED
@@ -28670,19 +28670,27 @@ const createLogsSlice = (set3, get2, _store) => {
28670
  console.error("API not initialized in LogsStore");
28671
  return void 0;
28672
  }
28673
- const loadLogDir = async () => {
28674
  try {
28675
- return await api2.get_log_dir();
 
28676
  } catch (e) {
28677
  console.log(e);
28678
  get2().appActions.setLoading(false, e);
28679
  return void 0;
28680
  }
28681
  };
28682
- const logDir2 = await loadLogDir();
 
28683
  if (get2().logs.logDir !== logDir2) {
28684
  get2().logsActions.setLogDir(logDir2);
28685
  }
 
 
 
 
 
 
28686
  return logDir2;
28687
  },
28688
  ensureReplication: async () => {
@@ -110597,15 +110605,17 @@ const fetchJsonFile = async (file, handleError2) => {
110597
  function joinURI(...segments2) {
110598
  return segments2.map((segment2) => segment2.replace(/(^\/+|\/+$)/g, "")).join("/");
110599
  }
110600
- function staticHttpApi(log_dir, log_file) {
110601
  const resolved_log_dir = log_dir?.replace(" ", "+");
110602
  log_file ? log_file.replace(" ", "+") : void 0;
110603
  return staticHttpApiForLog({
110604
- log_dir: resolved_log_dir
 
110605
  });
110606
  }
110607
  function staticHttpApiForLog(logInfo) {
110608
  const log_dir = logInfo.log_dir;
 
110609
  let manifest = void 0;
110610
  let manifestPromise = void 0;
110611
  const getManifest = async () => {
@@ -110639,7 +110649,8 @@ function staticHttpApiForLog(logInfo) {
110639
  });
110640
  return Promise.resolve({
110641
  logs,
110642
- log_dir
 
110643
  });
110644
  }
110645
  }
@@ -111399,7 +111410,7 @@ const resolveApi = () => {
111399
  const data = lib$d.parse(context);
111400
  if (data.log_dir || data.log_file) {
111401
  const log_dir2 = data.log_dir || dirname(data.log_file);
111402
- const api2 = staticHttpApi(log_dir2, data.log_file);
111403
  return clientApi(api2, data.log_file, debug2);
111404
  }
111405
  }
@@ -118900,7 +118911,7 @@ const ViewerOptionsPopover = ({
118900
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.fullWidth, styles$1d.fullWidthPadded), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$1d.logDir, children: logDir2 }) }),
118901
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.spacer) }),
118902
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Version" }),
118903
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: "0.3.199-28-gc856926c2" }),
118904
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Schema" }),
118905
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: DB_VERSION }),
118906
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.spacer) }),
@@ -217209,9 +217220,17 @@ const PrimaryBar = ({
217209
  }) => {
217210
  const streamSamples = useStore((state) => state.capabilities.streamSamples);
217211
  const downloadLogs = useStore((state) => state.capabilities.downloadLogs);
 
217212
  const selectedLogFile = useStore((state) => state.logs.selectedLogFile);
 
217213
  const logFileName = selectedLogFile ? filename(selectedLogFile) : "";
217214
  const isEvalFile2 = selectedLogFile?.endsWith(".eval");
 
 
 
 
 
 
217215
  const hasRunningMetrics = runningMetrics && runningMetrics.length > 0;
217216
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$b.wrapper), children: [
217217
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -217253,7 +217272,7 @@ const PrimaryBar = ({
217253
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("text-size-small", styles$b.secondaryContainer), children: [
217254
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("navbar-secondary-text", "text-truncate"), children: logFileName }),
217255
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.buttonGroup, children: [
217256
- selectedLogFile ? /* @__PURE__ */ jsxRuntimeExports.jsx(CopyButton, { value: selectedLogFile }) : "",
217257
  downloadLogs && selectedLogFile && isEvalFile2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DownloadLogButton, { log_file: selectedLogFile }) : null
217258
  ] })
217259
  ] })
 
28670
  console.error("API not initialized in LogsStore");
28671
  return void 0;
28672
  }
28673
+ const loadLogInfo = async () => {
28674
  try {
28675
+ const root2 = await api2.get_log_root();
28676
+ return { logDir: root2.log_dir, absLogDir: root2.abs_log_dir };
28677
  } catch (e) {
28678
  console.log(e);
28679
  get2().appActions.setLoading(false, e);
28680
  return void 0;
28681
  }
28682
  };
28683
+ const info = await loadLogInfo();
28684
+ const logDir2 = info?.logDir;
28685
  if (get2().logs.logDir !== logDir2) {
28686
  get2().logsActions.setLogDir(logDir2);
28687
  }
28688
+ const absLogDir = info?.absLogDir;
28689
+ if (get2().logs.absLogDir !== absLogDir) {
28690
+ set3((state) => {
28691
+ state.logs.absLogDir = absLogDir;
28692
+ });
28693
+ }
28694
  return logDir2;
28695
  },
28696
  ensureReplication: async () => {
 
110605
  function joinURI(...segments2) {
110606
  return segments2.map((segment2) => segment2.replace(/(^\/+|\/+$)/g, "")).join("/");
110607
  }
110608
+ function staticHttpApi(log_dir, log_file, abs_log_dir) {
110609
  const resolved_log_dir = log_dir?.replace(" ", "+");
110610
  log_file ? log_file.replace(" ", "+") : void 0;
110611
  return staticHttpApiForLog({
110612
+ log_dir: resolved_log_dir,
110613
+ abs_log_dir
110614
  });
110615
  }
110616
  function staticHttpApiForLog(logInfo) {
110617
  const log_dir = logInfo.log_dir;
110618
+ const abs_log_dir = logInfo.abs_log_dir;
110619
  let manifest = void 0;
110620
  let manifestPromise = void 0;
110621
  const getManifest = async () => {
 
110649
  });
110650
  return Promise.resolve({
110651
  logs,
110652
+ log_dir,
110653
+ abs_log_dir
110654
  });
110655
  }
110656
  }
 
111410
  const data = lib$d.parse(context);
111411
  if (data.log_dir || data.log_file) {
111412
  const log_dir2 = data.log_dir || dirname(data.log_file);
111413
+ const api2 = staticHttpApi(log_dir2, data.log_file, data.abs_log_dir);
111414
  return clientApi(api2, data.log_file, debug2);
111415
  }
111416
  }
 
118911
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.fullWidth, styles$1d.fullWidthPadded), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$1d.logDir, children: logDir2 }) }),
118912
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.spacer) }),
118913
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Version" }),
118914
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: "0.3.200-28-g6f7ea0284" }),
118915
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Schema" }),
118916
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: DB_VERSION }),
118917
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.spacer) }),
 
217220
  }) => {
217221
  const streamSamples = useStore((state) => state.capabilities.streamSamples);
217222
  const downloadLogs = useStore((state) => state.capabilities.downloadLogs);
217223
+ const absLogDir = useStore((state) => state.logs.absLogDir);
217224
  const selectedLogFile = useStore((state) => state.logs.selectedLogFile);
217225
+ const logDir2 = useStore((state) => state.logs.logDir);
217226
  const logFileName = selectedLogFile ? filename(selectedLogFile) : "";
217227
  const isEvalFile2 = selectedLogFile?.endsWith(".eval");
217228
+ const copyValue = (() => {
217229
+ if (!absLogDir || !selectedLogFile || !logDir2) return selectedLogFile;
217230
+ const prefix = logDir2 + "/";
217231
+ const relFile = selectedLogFile.startsWith(prefix) ? selectedLogFile.slice(prefix.length) : selectedLogFile;
217232
+ return absLogDir.replace(/\/?$/, "/") + relFile;
217233
+ })();
217234
  const hasRunningMetrics = runningMetrics && runningMetrics.length > 0;
217235
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$b.wrapper), children: [
217236
  /* @__PURE__ */ jsxRuntimeExports.jsx(
 
217272
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("text-size-small", styles$b.secondaryContainer), children: [
217273
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("navbar-secondary-text", "text-truncate"), children: logFileName }),
217274
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.buttonGroup, children: [
217275
+ copyValue ? /* @__PURE__ */ jsxRuntimeExports.jsx(CopyButton, { value: copyValue }) : "",
217276
  downloadLogs && selectedLogFile && isEvalFile2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DownloadLogButton, { log_file: selectedLogFile }) : null
217277
  ] })
217278
  ] })
index.html CHANGED
@@ -20,7 +20,7 @@
20
  </script>
21
  <script type="module" crossorigin src="./assets/index.js"></script>
22
  <link rel="stylesheet" crossorigin href="./assets/index.css">
23
- <script id="log_dir_context" type="application/json">{"log_dir": "logs"}</script>
24
  </head>
25
 
26
  <body style="min-width: 450px">
 
20
  </script>
21
  <script type="module" crossorigin src="./assets/index.js"></script>
22
  <link rel="stylesheet" crossorigin href="./assets/index.css">
23
+ <script id="log_dir_context" type="application/json">{"log_dir": "logs", "abs_log_dir": "/gpqa-diamond-transformers-serve"}</script>
24
  </head>
25
 
26
  <body style="min-width: 450px">
logs/2026-03-26T15-35-41-00-00_gpqa-diamond_mm6pmh4awKQu9U5djWxfyC.eval ADDED
Binary file (20.3 kB). View file
 
logs/listing.json CHANGED
The diff for this file is too large to render. See raw diff