Skip to content

Commit

Permalink
remove old energy star config
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Nov 22, 2024
1 parent e23808f commit 2b6db1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
26 changes: 0 additions & 26 deletions examples/energy_star.yaml

This file was deleted.

7 changes: 4 additions & 3 deletions optimum_benchmark/scenarios/energy_star/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def run(self, backend: Backend[BackendConfigT]) -> BenchmarkReport:
self.prefill_kwargs = {**self.config.generate_kwargs, **TEXT_GENERATION_PREFILL_OVERRIDES}
self.logger.info("\t+ Initializing Text Generation report")
self.report = BenchmarkReport.from_list(
targets=["load_dataset", "preprocess_dataset", "load_model", "prefill", "decode", "per_token"]
targets=["load_dataset", "preprocess_dataset", "load_model", "prefill", "decode"]
)
elif self.task in IMAGE_DIFFUSION_TASKS:
self.logger.info("\t+ Updating Image Diffusion kwargs with default values")
Expand Down Expand Up @@ -236,7 +236,7 @@ def run_inference_energy_tracking(self, backend: Backend[BackendConfigT]):
)

@property
def dataset_preprocess_volume(self) -> int:
def dataset_preprocess_volume(self) -> int: # in samples
return self.config.num_samples

@property
Expand All @@ -249,12 +249,13 @@ def dataset_prefill_volume(self) -> int: # in tokens

for sample in self.dataset:
if "input_ids" in sample.keys():
# text/image-text conditioned generation
# text/image-text/video-image-text conditioned generation
prefill_volume += self.raw_sample_inputs["input_ids"].numel()
else:
# image/audio/other conditioned generation (1 bos token)
prefill_volume += 1

print("prefill_volume", prefill_volume)
return prefill_volume

@property
Expand Down

0 comments on commit 2b6db1a

Please sign in to comment.