Nested Dataset Slowdown
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- python, tensorflow
Línea de trabajo
Comienza con la ruta anidada de DataLoader mostrada en el ejemplo, especialmente con la creación y validación del estado, donde se informa de la ralentización; usa el flamegraph de pyinstrument para confirmar por qué Grain llama a repr en el dataset interno. Compara el bucle anidado de episode/steps con un caso no anidado. Se considera terminado cuando se haya resuelto la ralentización informada en el estado y la validación sin cambiar el comportamiento de los datasets anidados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
TLDR: I'm working with robotics datasets. They are expressed a nested dataset. Grain calls repr on the inner dataset which slows down the loops significantly.
I think grain has serious benefits over tfds for nested datasets like this. Currently, rlds is the best way of handling these types of datasets. It somewhat abuses tfds dataset manipulation techniques since it doesn't have a better of handling this. I think grain would be able to simplify a lot of these workflows and allow for much more complex things to be created, i.e stitching multiple robot episodes together in unique ways that aren't easily expressible in tfds or rlds.
Fixing the above problem would be hugely beneficial and doesn't feel like it's super necessary.
Simple example to showcase the problem:
builder = tfds.builder_from_directory(builder_dir=dataset_path)
episode_data_source = builder.as_data_source("train", deserialize_method=tfds.core.decode.DeserializeMethod.DESERIALIZE_AND_DECODE)
episode_index_sampler = grain.IndexSampler(
num_records=2,
num_epochs=1,
shard_options=grain.ShardOptions(shard_index=0, shard_count=1, drop_remainder=True),
shuffle=True,
seed=0
)
steps_index_sampler = grain.IndexSampler(
num_records=2,
num_epochs=1,
shard_options=grain.ShardOptions(shard_index=0, shard_count=1, drop_remainder=True),
shuffle=True,
seed=0
)
import pyinstrument
profiler = pyinstrument.Profiler()
profiler.start()
episode_data_loader = grain.DataLoader(data_source=episode_data_source, sampler=episode_index_sampler)
for episode_data in episode_data_loader:
steps_data_source = episode_data[rlds.STEPS]
steps_data_loader = grain.DataLoader(data_source=steps_data_source, sampler=steps_index_sampler)
for steps_data in steps_data_loader:
pass
profiler.stop()
# Save the flamegraph to an HTML file
with open('flamegraph.html', 'w') as f:
f.write(profiler.output_html())
Specific slowdowns happen when creating the state/validating the state.
- Lenguaje dominante
- Python
- Estrellas
- 800
- Forks
- 94
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 9
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 google/grain
-
[Docs] DataLoader tutorial fails with UnparsedFlagAccessError at cell 26 (grain 0.2.18 + JAX ≥ 0.10.1)Quizá libre de nuevo @akhil9tiet la tomó hace 8 días y no hay ningún pull request abierto. Abiertodocumentation type:bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
google/grain#1444 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
documentation type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
documentation type:bug
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
Restoring an exhausted flatmap checkpoint can replay consumed recordsPosiblemente ocupada @salma2vec la tomó hace 8 días. Abiertotype:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
ConcatThenSplitIterDataset drops a document when restored from a JSON-serialized statePosiblemente ocupada @AshishKumar4 la tomó hace 17 días. Abiertotype:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
Todos los issues de google/grain
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
FinanceFlash/unvibecode#509 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
FAIRmat-NFDI/nomad-distro-dev#161 ·
-
bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
modelcontextprotocol/python-sdk#3821 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
Log-odds calibration uses upper middle score instead of median for even candidate setsPosiblemente ocupada @flysheep-ai la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día