huggingface / huggingface/inference-benchmarker

KeyError: 'model_name' while visualizing results

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
172
Forks
34
PR merge metrics
No merged PRs in 30d

Description

Hi @Hugoch ,

While running the results, I'm facing this now.

```
(tgi) sdp@raj:~/raj/inference-benchmarker/extra/dashboard$ poetry run python app.py --from-results-dir /home/sdp/raj/inference-benchmarker/results
Traceback (most recent call last):
File "/home/sdp/raj/inference-benchmarker/extra/dashboard/app.py", line 211, in
main(auto_envvar_prefix='DASHBOARD')
File "/home/sdp/miniforge3/envs/tgi/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sdp/miniforge3/envs/tgi/lib/python3.11/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/sdp/miniforge3/envs/tgi/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sdp/miniforge3/envs/tgi/lib/python3.11/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sdp/raj/inference-benchmarker/extra/dashboard/app.py", line 207, in main
run(from_results_dir, datasource, port)
File "/home/sdp/raj/inference-benchmarker/extra/dashboard/app.py", line 123, in run
build_results(from_results_dir, 'benchmarks.parquet', None)
File "/home/sdp/raj/inference-benchmarker/extra/dashboard/parse_results.py", line 53, in build_results
df = build_results_df(results_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sdp/raj/inference-benchmarker/extra/dashboard/parse_results.py", line 48, in build_results_df
df = pd.concat([df, build_df(directory.split('/')[-1], data_files)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sdp/raj/inference-benchmarker/extra/dashboard/parse_results.py", line 26, in build_df
entry['model'] = data['config']['model_name']
~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'model_name'
```

This is my results folder structure.

```
(tgi) sdp@raj:~/raj/inference-benchmarker/results$ tree
.
└── mistral
├── mistralai_Mistral-7B-Instruct-v0_3_2025-03-29-12-22-04.json
└── mistralai_Mistral-7B-Instruct-v0_3_2025-03-29-12-46-39.json

1 directory, 2 files
```

Let me know if you need any information, I've tried with the latest version `v1.1.0`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.