diart
diart copied to clipboard
Feature Request: Export result to csv file
Hi,
Thanks for the repo!
I wanted to know how to export the dataframe printed at last of benchmark into a csv file. Please add a option for exporting if not there.
Update: Found the code for pandas dataframe generated . Requesting you to open an end point so that it can be used easily.
In inference.py
metric.report(display=True)
Thank You
Hi @AMITKESARI2000,
Thanks for your question.
Currently, if you pass a reference_path
to Benchmark
, then __call__
returns a pandas DataFrame
.
You can easily export a DataFrame
to a CSV file using DataFrame.to_csv()
(see here).
It would look like this:
benchmark = Benchmark(...)
pipeline = OnlineSpeakerDiarization(...)
benchmark(pipeline).to_csv("/your/path/to/file.csv")
However, you need to write your own script for this.
It would be useful to add a script argument to diart.benchmark
so these results are automatically saved to a CSV file without the need to write a custom script.
This could be something like diart.benchmark --to-csv /your/path/to/file.csv
.
Would you be interested in opening a PR for this feature?
Implemented in #86