Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Export result to csv file #70

Closed
AMITKESARI2000 opened this issue Jul 21, 2022 · 2 comments
Closed

Feature Request: Export result to csv file #70

AMITKESARI2000 opened this issue Jul 21, 2022 · 2 comments
Labels
feature New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Milestone

Comments

@AMITKESARI2000
Copy link
Contributor

AMITKESARI2000 commented Jul 21, 2022

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.
image

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

@juanmc2005 juanmc2005 added question Further information is requested API Improvements to the API labels Jul 25, 2022
@juanmc2005
Copy link
Owner

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?

@juanmc2005 juanmc2005 added feature New feature or request and removed API Improvements to the API labels Jul 25, 2022
@juanmc2005 juanmc2005 added this to the Version 0.5 milestone Jul 26, 2022
@juanmc2005 juanmc2005 added help wanted Extra attention is needed good first issue Good for newcomers labels Jul 26, 2022
@juanmc2005
Copy link
Owner

Implemented in #86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants