Skip to content

Commit

Permalink
various bugfixes and new primary metric
Browse files Browse the repository at this point in the history
-remove some models which do not work
-process the JSON generated from pytorch that will make your eyes bleed
-add latency primary metric
  • Loading branch information
atheurer committed Dec 2, 2024
1 parent 8ca4067 commit 073fa78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion multiplex.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"args" : [
"model"
],
"vals" : "BERT_pytorch|fastNLP_Bert|hf_Bert_large|hf_BigBird|hf_DistilBert|hf_GPT2|hf_GPT2_large|hf_Longformer|hf_Roberta_base|hf_Reformer|llama|llama_v2_7b_16h|llava|hf_Whisper|hf_T5_large|hf_T5|nanogpt|timm_vision_transformer|timm_vision_transformer_large"
"vals" : "^BERT_pytorch$|^fastNLP_Bert$|^hf_Bert_large$|^hf_BigBird$|^hf_DistilBert$|^hf_GPT2$|^hf_GPT2_large$|^hf_Longformer$|^hf_Roberta_base$|^hf_Reformer$|^llama$|^llama_v2_7b_16h$|^llava$|^hf_Whisper$|^hf_T5_large$|^hf_T5$|^nanogpt$|^timm_vision_transformer$|^timm_vision_transformer_large$"
}
}
}
10 changes: 7 additions & 3 deletions pytorch-post-process
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,21 @@ def main():
# }
# }

print(d)

# Now create the primary metric and the primary-period
iter_sample['primary-metric'] = 'elapsed-time-milliseconds'
iter_sample['primary-metric'] = 'latency-milliseconds'
period = { 'name': 'measurement', 'metric-files': [] }
file_id = 'measurement'
desc = {'source' : 'pytorch', 'class': 'count', 'type': 'elapsed-time-milliseconds'}
names = {}
sample = {'begin': begin, 'end': end, 'value': end - begin}
log_sample(file_id, desc, names, sample)

for key in d['metrics'].keys():
if (re.search("metric=latencies$", key)):
desc = {'source' : 'pytorch', 'class': 'count', 'type': 'latency-milliseconds'}
sample = {'begin': begin, 'end': end, 'value': d['metrics'][key]}
log_sample(file_id, desc, names, sample)

metric_file_name = finish_samples()
period['metric-files'].append(metric_file_name)
iter_sample['periods'].append(period)
Expand Down

0 comments on commit 073fa78

Please sign in to comment.