`info` method - expose information about the model

Abierto
#1,178 4 comentarios 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
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
cpp
Área
cli, tooling

Línea de trabajo

El issue no nombra archivos, pruebas ni puntos de entrada; comienza localizando dónde se gestionan los metadatos de los modelos compilados y los métodos de comandos. Define los metadatos expuestos por el nuevo info method, incluidos los detalles de compilación y posiblemente el contenido de Stan o de los headers; después, determina cómo debería producirse el JSON en tiempo de compilación u otro formato integrado y verifica que la salida permita tomar decisiones de recompilación y almacenamiento en caché.

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

Descripción

Summary:

Add a new info method that lets tools (or users) get info about the model to help e.g. deciding if the model needs recompilation.

Description:

Currently, a lot of the metadata about a compiled model can only be retrieved by running inference (Stan version, stanc flags) or not at all (cpp compile options, compiler, ...). This limits the ability of wrappers like cmdstanr to make good decisions on when to recompile a model as a change in compiler options or Stan version will not be recognized by checking modification times.

Beyond choosing to recompile or not, other tools may benefit from this metadata in my own work, the SBC package tries to do caching of its results and needs to check if the model it is given is substantially equivalent to a model the cached results were compiled with. It could rely on modification time, but this could result in some unnecessary recomputations (e.g. when the model is modified, found to be problematic and then the change is reverted). For those more extended usages by tools, it might make sense to also include the Stan code and the contents of user-provided extra .hpp in the information stored.

Since all of the information is known at a compile time, a simple implementation would have a .json (or other format) created at compile time and embedded as a resource. The output format could be configurable, but since the primary consumers are likely to be tools, it should probably default to JSON or similar.

Additional information:

If there is an agreement on implementing this, I'd be happy to write a PR.

Current Version:

v2.32.2

Lenguaje dominante
C++
Estrellas
240
Forks
105
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

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 stan-dev/cmdstan

Todos los issues de stan-dev/cmdstan

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.