TEST Add sparse dataset inclusion coverage for row ID and ignore attributes.
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
Línea de trabajo
Empieza en tests/test_datasets/test_dataset.py, en OpenMLDatasetTestSparse::test_get_sparse_dataset_rowid_and_ignore_and_target. Ejecuta el comando pytest dirigido indicado en el issue y, a continuación, inspecciona las comprobaciones de exclusión existentes y el comportamiento de inclusión solicitado. La tarea estará terminada cuando la prueba cubra ambos modos y verifique la forma devuelta, los indicadores categóricos y la forma del target.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description :-
This PR improves the regression test coverage for sparse dataset retrieval when row ID and ignored attributes are configured for the dataset.
The existing test already defined a row ID attribute and an ignored attribute, but the retrieval operation was performed with both inclusion options disabled. As a result, the test confirmed that these attributes were excluded from the returned feature data, but it did not verify what happens when a caller explicitly requests them.
This change extends the test so that the inclusion behaviour is also checked. The dataset is retrieved with both include_row_id=True and include_ignore_attribute=True, allowing the test to verify that the additional attributes are correctly represented in the returned feature matrix.
The new assertions also check the dimensions of the returned data and the associated categorical information. This ensures that the test does not only execute successfully, but also confirms that the returned dataset has the expected structure.
Changes :-
-
Extended the existing sparse dataset test to cover the case where row ID attributes are explicitly included in the returned features.
-
Added coverage for retrieving attributes that were previously marked as ignored by using include_ignore_attribute=True
-
Verified that enabling both inclusion options results in a feature matrix with the expected shape (600, 20000)
-
Added a check for the length of the categorical indicator list to ensure it corresponds to all 20,000 returned features.
-
Verified that every categorical indicator is False, matching the expected characteristics of the returned sparse dataset.
-
Added an assertion for the target data to confirm that the returned target has the expected shape (600,)
-
Kept the existing exclusion behaviour covered so that the test continues to validate both inclusion and exclusion scenarios.
Testing
The updated sparse dataset test was executed using the following command:
bash
pytest tests/test_datasets/test_dataset.py::OpenMLDatasetTestSparse::test_get_sparse_dataset_rowid_and_ignore_and_target
- Lenguaje dominante
- Python
- Estrellas
- 361
- Forks
- 296
- Métricas de merge de PR
- Sin PR fusionados en 30 d
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 openml/openml-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
openml/openml-python#1750 · 1 comentario ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
openml/openml-python#1746 ·
-
Documentation Good First Issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
openml/openml-python#1708 · 7 comentarios ·
-
Good First Issue module:Run testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
openml/openml-python#1646 · 7 comentarios · 2 reacciones ·
-
Good First Issue module:Data testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
openml/openml-python#1644 · 4 comentarios ·
Todos los issues de openml/openml-python
Issues similares
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Abiertoarea: harness bug status: needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Human-Agent-Society/reef#625 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
learningequality/kolibri#15351 · 2 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Name consistency Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
eellak/triplestore#65 · 1 comentario ·