Add option to track other metrics than solely the loss function.

Abierto
#629 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python, pytorch

Línea de trabajo

Read the Task and StandardModel implementations to understand how training and validation data and loss values are handled, then check how metrics are logged to the progress bar and WandB. Decide how additional named metrics should be attached to tasks, updated, and logged, including whether torchmetrics fits the project. Done means metrics can be configured and reported during training and validation; the issue does not specify exact files or tests.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

feature

Is your feature request related to a problem? Please describe.
Currently we're the only value which is Logged to the progress bar and WandB is the loss value. However there are many situations in which the loss is either of little to no value, or you're more interested in another metric. Examples include when using a negative log-likelihood based loss function like (von-Mises Fisher, Gaussian, or CrossEntropy), where other quantities like RMSE, MAE, Accuracy, or AUC might be more relevant metrics to go by. Other examples could occur if a combination of multiple losses is used, then each component might be of interest.

Describe the solution you'd like
I would like to have the option to log additional more human-friendly quantities. There exists a library called torchmetrics which defines a plethora of metrics, which we probably can integrate with.
For implementation I think the easiest would be to have the option to add additional metrics to a Task, along with a name for the metric, and then the StandardModel, would process all metrics from all it's tasks and be responsible for feeding them the proper data and logging them during training/validation.

Describe alternatives you've considered
We could make our own implementation of a Metric like class, and use those, but I think it might be easier to use a library that already exists, especially since it is developed by lightning-ai and we probably won't run into issues with incompatible versions.

Additional context
Some of the metrics also define a plot method, which might be integrated in a way such that this would also solve #507.

Lenguaje dominante
Python
Estrellas
117
Forks
115
Merge medio
2 d 21 h
PR fusionados (30 d)
1

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de graphnet-team/graphnet

Todos los issues de graphnet-team/graphnet

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.