Feature suggestion: lifecycle hooks for user-defined callbacks during simulations
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 28/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Área
- backend, machine-learning
Línea de trabajo
This is a design request for user callbacks on the simulation step path (the issue sketches step_func(..., callbacks=...) and a SimState check). Start by locating how steps, neighbor tiling, and convergence are implemented in the torch-sim codebase and how SimState is passed today. Done means a documented, extensible hook API plus tests that a callback can inspect state, mutate params, or abort with a reason—not a one-off tiling guard. Expect maintainer design discussion before coding.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
context
about 1 in 1e5 geometry optimizations goes off the rails (usually an issue with FIRE step size or MLIP stress preds) causing the cell to distort in strange ways, volume collapses, edge count explodes → OOM. this can bring down nodes doing long-running structure searches.
a possible current workaround is modifying the convergence check to monitor how many times the cell gets tiled for neighbor list construction and abort if it exceeds some threshold (e.g. 1k).
proposal
would be useful to have a general concept of lifecycle hooks in torch-sim that allows users to pass arbitrary callback functions. these could:
- perform custom sanity checks at every N-th step (N user-defined) (based on as many sim params as torch-sim can provide: cell volume, edge count, neighbor list tiling, etc.)
- modify sim params on the fly (e.g. reduce timestep if things look unstable)
- abort early with a user-intelligible reason if sim looks unrecoverable
something like:
def my_check(state: SimState) -> bool | str:
if state.neighbor_tiles > 1000:
return "cell tiling exceeded 1k, aborting"
return True # continue
result = step_func(state, model, ..., callbacks=[my_check])
a general callback mechanism would let:
- users define domain-specific guardrails
- future tools (think custodian for MD) tap into the sim lifecycle
- debugging/logging without modifying torch-sim internals
tagging @kyonofx who brought up the dying nodes in our cluster, briefly discussed this with @abhijeetgangan
- Lenguaje dominante
- Python
- Estrellas
- 502
- Forks
- 108
- Merge medio
- 1 d 1 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TorchSim/torch-sim
-
`unwrap_positions` gives wrong results for triclinic cellsPosiblemente ocupada @lance-lii la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
TorchSim/torch-sim#629 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Autobatcher memory probe does not recognize cuequivariance out-of-memory errorsPosiblemente ocupada @lil-lon la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
TorchSim/torch-sim#627 · 5 comentarios · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 2 días
-
Add MLIPOps backendsAbiertohelp wanted ml-eng-friendly
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
TorchSim/torch-sim#606 · 6 comentarios · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
TorchSim/torch-sim#597 · 7 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de TorchSim/torch-sim
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
elviskahoro/sdk-python-attio#144 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
RenyiELBO raises TypeError when model has no sample sitesPosiblemente ocupada @alibb007 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
[Bug]: Four evaluation scripts unpack init_memmachine_params's five return values into three namesAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
MemMachine/MemMachine#1911 ·
Los mantenedores suelen responder en 3 días