[Documentation] How does `SingleNodeExecutor` touch the file system?
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Documentación
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- documentation, hpc
Línea de trabajo
Comienza con SingleNodeExecutor, BaseExecutor, DependencyTaskScheduler, OneProcessTaskScheduler y las herramientas task_scheduler.file mencionadas en el issue. Rastrea cache_directory desde resource_dict a través del envío y la ejecución de tareas, y documenta después el punto en el que se selecciona el almacenamiento en caché respaldado por archivos y en qué se diferencia de create_file_executor. Se considera terminado cuando la ruta de ejecución y la conexión que falta están claramente explicadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I'm trying to understand where SingleNodeExecutor with a cache_directory gets its instructions to actually write it's result to file.
For instance, consider the following:
from executorlib import SingleNodeExecutor
def foo(x):
return x + 1
with SingleNodeExecutor() as exe:
f = exe.submit(foo, 1, resource_dict={"cache_key": "my_key", "cache_directory": "my_dir"})
print("Result", f.result())
My understanding of the path of events is
Initialization:
SingleNodeExecutor.__init__triggersBaseExecutor.__init__with aDependencyTaskScheduleras its underlying_task_scheduler- That
DependencyTaskScheduleris initialized with aOneProcessTaskScheduleras itsexecutorarg, which gets stored in_process_kwargs["executor"]
Submission:
SingleNodeExecutor.submitis inherited directly fromBaseExecutor.submitBaseExecutor.submitpasses everything (including theresource_dictas a single kwarg) to the_task_scheduler.submit- Since
DependencyTaskScheduler._generate_dependency_graphhas fed through toFalsewith all the default values, this generates the future by a plainsuper()call toTaskSchedulerBase.submit TaskSchedulerBase.submitsends our information (function, args, kwargs, resource dict, empty future) toself._future_queue.put
Here I get out of my depth, but it seems to me like putting stuff on the future queues is activating the associated Thread, which all the TaskSchedulerBase children initialize in _set_process using a Thread taking some function and the _process_kwargs (which includes the _future_queue!). On that assumption, that means that the self._future_queue.put call we got to from TaskSchedulerBase.submit would route back to the Thread set in the DependencyTaskScheduler._set_process invocation -- i.e. _execute_tasks_with_dependencies
Continuing submission:
_execute_tasks_with_dependenciesindeed takes anexecutor, which isDependencyTaskScheduler._process_kwargs["executor"]i.e. ourOneProcessTaskScheduler; there's lots going on, but...- I don't see any reference to the cache, so I don't think the file system interaction is happening here
- It looks like we ultimately do a
executor_queue.putonto the underlyingOneProcessTaskScheduler._future_queue - I.e. we move to
_execute_task_in_separate_process
_execute_task_in_separate_processis in turn re-directing to_wrap_execute_task_in_separate_processand both of these are now taking aspawner: type[BaseSpawner]argument- But I'm at the end of the line, I don't see anything other than the default
MpiExecSpawnerbeing leveraged, and I never find any references to thecache_directoryor any of thetask_scheduler.filemodule tools
With the SlurmClusterExecutor we sometimes route through create_file_executor, in which case the file system connection is obvious, but in the other case we're still going through DependencyTaskScheduler -- this time with an SrunSpawner instead of a MpiExecSpawner. In this later case I also don't see the connection to file system tools, so I feel like I must be missing something at the diverging point: DependencyTaskScheduler.
What am I missing here? When does the SingleNodeExecutor figure out it needs to leverage the "cache_directory" field in the resource_dict?
- Lenguaje dominante
- Python
- Estrellas
- 77
- Forks
- 9
- Merge medio
- 7 h 9 min
- PR fusionados (30 d)
- 13
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 pyiron/executorlib
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pyiron/executorlib#1054 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pyiron/executorlib#1032 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pyiron/executorlib#1005 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
pyiron/executorlib#1072 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
pyiron/executorlib#1049 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de pyiron/executorlib
Issues similares
-
good first issue hacktoberfest
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
RogueAlg0/taken#387 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
tool-calling
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
vllm-project/vllm#59838 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
raullenchai/Rapid-MLX#4042 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
transitmatters/mbta-slow-zone-bot#70 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
open-webui/open-webui#31871 · 1 comentario ·
Los mantenedores suelen responder en 1 día