TEST Add sparse dataset inclusion coverage for row ID and ignore attributes.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
Hướng nghiên cứu
Bắt đầu trong tests/test_datasets/test_dataset.py tại OpenMLDatasetTestSparse::test_get_sparse_dataset_rowid_and_ignore_and_target. Chạy lệnh pytest nhắm mục tiêu được nêu trong issue, sau đó kiểm tra các kiểm tra loại trừ hiện có và hành vi bao gồm được yêu cầu. Hoàn tất khi test bao phủ cả hai chế độ và xác minh shape được trả về, các chỉ báo phân loại và shape của target.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 361
- Fork
- 296
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openml/openml-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
openml/openml-python#1750 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
openml/openml-python#1746 ·
-
Documentation Good First Issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
openml/openml-python#1708 · 7 bình luận ·
-
Good First Issue module:Run testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openml/openml-python#1646 · 7 bình luận · 2 reaction ·
-
Good First Issue module:Data testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openml/openml-python#1644 · 4 bình luận ·
Tất cả issue của openml/openml-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
browser-use/browser-use#5905 ·
-
type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ynput/ayon-python-api#363 ·
-
bug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
modelscope/FunASR#3728 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
open-compass/opencompass#2655 ·