Skip to content
Merged
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
2 changes: 2 additions & 0 deletions benchmark_v2/framework/benchmark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ def adapt_configs(
config["sequence_length"] = seqlen
config["num_tokens_to_generate"] = ntok
config["gpu_monitoring"] = monitor
# Remove the old name so it gets re-inferred with the updated values
config.pop("name", None)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

adapted_configs.append(BenchmarkConfig.from_dict(config))
return adapted_configs

Expand Down
12 changes: 6 additions & 6 deletions benchmark_v2/run_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@
logger.info(f"Benchmark run UUID: {benchmark_run_uuid}")
logger.info(f"Output directory: {args.output_dir}")

# We cannot compute ITL if we don't have at least two measurements
if any(n <= 1 for n in args.num_tokens_to_generate):
raise ValueError("--num_tokens_to_generate arguments should be larger than 1")

# Error out if one of the arguments is not provided
if len(args.batch_size) * len(args.sequence_length) * len(args.num_tokens_to_generate) == 0:
if any(arg is None for arg in [args.batch_size, args.sequence_length, args.num_tokens_to_generate]):
raise ValueError(
"At least one of the arguments --batch-size, --sequence-length, or --num-tokens-to-generate is required"
"All of the arguments --batch-size, --sequence-length, and --num-tokens-to-generate are required"
)

# We cannot compute ITL if we don't have at least two measurements
if any(n <= 1 for n in args.num_tokens_to_generate):
raise ValueError("--num_tokens_to_generate arguments should be larger than 1")

# Get the configs for the given coverage level
configs = get_config_by_level(args.level)
# Adapt the configs to the given arguments
Expand Down