[doc] Document the contract of storage-side callables (data_parser, merge_fn) with a tutorial
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
- 55/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- jupyter-notebook, python
- Área
- data, documentation
Línea de trabajo
Start with the three docstrings in transfer_queue/interface.py (kv_put, kv_batch_put, kv_batch_get) and the storage-side functions apply_data_parser and apply_update in transfer_queue/storage/simple_storage.py, to confirm the arity and input shapes the issue describes. Fix the inaccurate in-place wording first, then write the shared contract in the README. Done means the docstrings reference it, tutorial/07*.py runs end to end, and section 11 of tutorial/basic.ipynb has the get-side and kv_update demos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Background
Three KV APIs run a user callable on the SimpleStorage units:
| API | Callable | What it receives |
|---|---|---|
kv_put / kv_batch_put |
data_parser(data) -> data |
The unit's share of the new batch, before it is stored. A regular tensor column arrives as one batched tensor; nested-tensor and NonTensorStack columns arrive as lists. |
kv_batch_get (#191) |
data_parser(data, args) -> data |
The stored values, as one list per column with one value per sample (tensor columns included), plus the matching parser_args entries. |
kv_update / kv_batch_update (#182) |
merge_fn(old, new) -> stored |
One sample's stored value and its new value, per field. |
They are powerful but easy to misuse, and their contracts are documented unevenly, in places inaccurately.
Gaps in the current docs
- put
data_parser: "must modify in-place" is inaccurate. The docstrings ofkv_putandkv_batch_putsay the parser must modify values in place, but the unit requires it to return a dict and raisesTypeErrorotherwise (_apply_data_parser). Modifying in place is allowed, not required. - The get and put
data_parserlook interchangeable but are not. The get docstring calls itself the get-side counterpart of put's parser, but the two differ in arity ((data, args)vs(data)) and in input structure (per-sample lists vs a batched tensor for regular tensor columns). Passing a put parser tokv_batch_getfails on the unit withtakes 1 positional argument but 2 were given. merge_fndoes not say thatoldis the stored object.apply_updatepasses the stored value itself (L255). If amerge_fnmodifiesoldin place, the guarantee that a failed merge leaves storage unchanged no longer holds: samples merged before the failure have already changed.- Runtime constraints are not stated in one place. All three run synchronously on the unit's single worker thread, so a slow one delays every other request to that unit. A call that uses one of them is not retried on a storage-unit timeout, and a timeout has an unknown outcome. Callables travel through cloudpickle, so module-level functions must be importable on the units, and tuples inside
parser_argsarrive as lists.
Expected work
- Docs. One shared contract for storage-side callables in the README, referenced from the docstrings of
kv_put,kv_batch_put,kv_batch_get,kv_update,kv_batch_updateand their async variants: where it runs, the input structure per API, no in-place modification of stored values, no side effects, keep it light, no retry, serialization, and how errors reach the caller. Fix gaps 1-3 above. - Dedicated tutorial. A new
tutorial/07_*.pythat walks through putdata_parser(resolving references into content), getdata_parserwithparser_args(trimming a tensor field and picking items from a list field in one get), andkv_updatewithmerge_fn(appending to a field). Include one in-place example and show why it corrupts stored data. - Notebook demo. Extend section 11 of
tutorial/basic.ipynb("Lazy Data Parsing withdata_parser") with a get-sidedata_parserdemo, and add akv_update/merge_fndemo.
Related: #182, #191
- Lenguaje dominante
- Python
- Estrellas
- 166
- Forks
- 56
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 15
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 Ascend/TransferQueue
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Ascend/TransferQueue#194 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
Ascend/TransferQueue#188 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Ascend/TransferQueue#180 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Ascend/TransferQueue#173 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[optim] MooncakeStore read path registers RDMA buffers on every get(), dominating end-to-end timeQuizá libre de nuevo @weiziyoung la tomó hace 39 días y no hay ningún pull request abierto. Abiertoenhancement
Ascend/TransferQueue#169 · 3 comentarios · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 1 día
Todos los issues de Ascend/TransferQueue
Issues similares
-
Project submission:Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
slavakurilyak/awesome-ai-agents#845 ·
Los mantenedores suelen responder en 1 día
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directoryPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodifficulty:2 enhancement good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
MakazhanAlpamys/Soup#2178 ·
Los mantenedores suelen responder en 1 día
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-valuesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
scverse/rapids-singlecell#854 ·
Los mantenedores suelen responder en 1 día
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGLPosiblemente ocupada @ninglinLiu la tomó hoy. Abiertoarea:frontend backend:slang bug direction:input
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=FalsePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 13 días