Skip to content

Commit 657d43a

Browse files
committed
Bugfix for metrics, update image for metrics command
1 parent 66dfa8e commit 657d43a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ vec-inf metrics 13014393
4545

4646
And you will see the performance metrics streamed to your console, note that the metrics are updated with a 10-second interval.
4747

48-
<img width="400" alt="metrics_img" src="https://github.com/user-attachments/assets/6732215b-96f3-407c-ba45-6334b2061706">
48+
<img width="400" alt="metrics_img" src="https://github.com/user-attachments/assets/e5ff2cd5-659b-4c88-8ebc-d8f3fdc023a4">
4949

5050
Finally, when you're finished using a model, you can shut it down by providing the Slurm job ID:
5151
```bash

vec_inf/cli/_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,18 +326,18 @@ def metrics(slurm_job_id: int, log_dir: Optional[str] = None) -> None:
326326
status_cmd = f"scontrol show job {slurm_job_id} --oneliner"
327327
output = utils.run_bash_command(status_cmd)
328328
slurm_job_name = output.split(" ")[1].split("=")[1]
329-
out_logs = utils.read_slurm_log(slurm_job_name, slurm_job_id, "out", log_dir)
330329

331330
with Live(refresh_per_second=1, console=CONSOLE) as live:
332331
while True:
332+
out_logs = utils.read_slurm_log(slurm_job_name, slurm_job_id, "out", log_dir)
333333
metrics = utils.get_latest_metric(out_logs)
334334
table = utils.create_table(key_title="Metric", value_title="Value")
335335
for key, value in metrics.items():
336336
table.add_row(key, value)
337337

338338
live.update(table)
339339

340-
time.sleep(10)
340+
time.sleep(2)
341341

342342

343343
if __name__ == "__main__":

0 commit comments

Comments
 (0)