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

Per-label and per-class metrics should be formatted properly for CSV output #686

Closed
sarthakpati opened this issue Jul 6, 2023 · 0 comments · Fixed by #687
Closed

Per-label and per-class metrics should be formatted properly for CSV output #686

sarthakpati opened this issue Jul 6, 2023 · 0 comments · Fixed by #687
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@sarthakpati
Copy link
Collaborator

Describe the bug
The per class/label metrics get saved as lists in the CSV, which makes parsing difficult.

To Reproduce
Steps to reproduce the behavior:

  1. Run any training.
  2. See the following in logs (example shown for a simple classification unit test):
epoch_no,train_loss,train_accuracy_global,train_f1_global,
0,0.445031365,[1.0, 0.0],[0.936170220375061, 0.0]

Expected behavior
This creates an issue when trying to parse the CSV, since the location of the actual results get moved. There are 2 potential solutions:

  1. Either the class value needs to be appended in the metric, such as:
    epoch_no,train_loss,train_accuracy_global_0,train_accuracy_global_1,train_f1_global_0,train_f1_global_1
    0,0.445031365,1.0,0.0,0.936170220375061,0.0
    
  2. Concatenate the metrics that give lists into a single string:
    epoch_no,train_loss,train_accuracy_globa,train_f1_global
    0,0.445031365,1.0_0.0,0.936170220375061_0.0
    

My expectation is that solution 2 is easier to implement and maintain, and 1 needs a wrappers per metric.

Screenshots
N.A.

GaNDLF Version

0.0.17-dev

Desktop (please complete the following information):
N.A.

Additional context
Related to #680

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

GaNDLF Version

Version information of the GaNDLF package in the virtual environment.

Desktop (please complete the following information):

  • OS: [e.g. Windows/Linux (include detailed distro information)/macOS]
  • Version (including Build information, if any): [e.g. Fedora 22 or Windows 10.1803]

Additional context
Add any other context about the problem here.

@sarthakpati sarthakpati self-assigned this Jul 6, 2023
@sarthakpati sarthakpati added bug Something isn't working enhancement New feature or request labels Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant