Skip to content

Commit

Permalink
change path to save file
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanniasingheTT committed Nov 19, 2024
1 parent ceb3ce7 commit 2583311
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/mock_vllm_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import json
from dataclasses import dataclass
from typing import List
from pathlib import Path


import torch

Expand Down Expand Up @@ -342,7 +344,8 @@ def __init__(self, num_scheduler_steps, batch_size) -> None:
self.num_scheduler_steps = num_scheduler_steps
self.batch_size = batch_size
timestamp = datetime.now().strftime("%Y-%m-%d_%H%M%S")
self.filepath = f"/home/user/tests/statistics_{timestamp}.jsonl"
cache_root = Path(os.getenv("CACHE_ROOT", "."))
self.filepath = cache_root / f"statistics_{timestamp}.jsonl"
self.num_total_grouped_step = (
0 # number of iterations of size num_scheduler_steps
)
Expand Down
5 changes: 4 additions & 1 deletion vllm-tt-metal-llama3-70b/src/logging_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
import datetime
import json
from pathlib import Path


from vllm.engine.metrics_types import StatLoggerBase, Stats, SupportsMetricsInfo
from vllm.engine.metrics import logger
Expand All @@ -25,7 +27,8 @@ def __init__(self, num_scheduler_steps, batch_size) -> None:
self.num_scheduler_steps = num_scheduler_steps
self.batch_size = batch_size
timestamp = datetime.now().strftime("%Y-%m-%d_%H%M%S")
self.filepath = f"/home/user/tests/statistics_{timestamp}.jsonl"
cache_root = Path(os.getenv("CACHE_ROOT", "."))
self.filepath = cache_root / f"statistics_{timestamp}.jsonl"
self.num_total_grouped_step = (
0 # number of iterations of size num_scheduler_steps
)
Expand Down

0 comments on commit 2583311

Please sign in to comment.