Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions aphrodite/engine/args_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,9 +619,8 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
parser.add_argument(
'--use-v2-block-manager',
default=EngineArgs.use_v2_block_manager,
action='store_true',
help='Use BlockSpaceMangerV2. By default this is set to True. '
'Set to False to use BlockSpaceManagerV1')
type=lambda x: (str(x).lower() in ['true', '1', 'yes']),
help='Use BlockSpaceManagerV2 (default: True). Set explicitly to False to use BlockSpaceManagerV1')
parser.add_argument(
"--scheduler-delay-factor",
"-sdf",
Expand Down
3 changes: 3 additions & 0 deletions aphrodite/engine/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ def _log_gauge(self, gauge, data: Union[int, float]) -> None:

def _log_counter(self, counter, data: Union[int, float]) -> None:
# Convenience function for logging to counter.
if data < 0:
logger.warning(f"Attempted to increment counter with negative value: {data}")
return
counter.labels(**self.labels).inc(data)

def _log_counter_labels(self, counter, data: CollectionsCounter,
Expand Down