Skip to content

[SYSTEMDS-3991] Prepare PTB-XL ECG dataset for Scuro - #2638

Open
shieru1214 wants to merge 7 commits into
apache:mainfrom
shieru1214:scuro-ptbxl
Open

shieru1214 wants to merge 7 commits into
apache:mainfrom
shieru1214:scuro-ptbxl

Conversation

@shieru1214

Copy link
Copy Markdown
Contributor

This change fixes format checks and error messages in TimeseriesLoader and adds tests for them.

TimeseriesLoader fixes

  • Remove mat and hdf5 from the supported formats because they are not implemented yet, and add csv to the format check.
  • Make the “file not found” error show the actual filename.
  • Add a helper that imports wfdb only when needed and gives an installation hint if the package is missing. This does not add file_format="wfdb" support yet.

Tests

I enabled test_timeseries_loader_loads_all_instances and test_timeseries_loader_stats. They now use ["x", "y"] as signal names. The data generator writes 10 samples with 2 signals, so the stats test can check max_length and num_signals.

The new tests check that the missing filename appears in the error, that mat, hdf5, and unknown formats are rejected, and that selecting y from a two-column CSV returns exactly the second column. I also added a test for the installation hint when wfdb is missing.

@codecov

codecov Bot commented Nov 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 51.33333% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.67%. Comparing base (1a358e5) to head (0ce5508).

Files with missing lines Patch % Lines
src/main/python/tests/scuro/test_data_loaders.py 56.86% 44 Missing ⚠️
...hon/systemds/scuro/dataloader/timeseries_loader.py 36.95% 29 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               main    #2638       +/-   ##
=============================================
+ Coverage     72.18%   76.67%    +4.49%     
=============================================
  Files          2105      458     -1647     
  Lines        230158    31346   -198812     
  Branches      38694        0    -38694     
=============================================
- Hits         166139    24035   -142104     
+ Misses        52813     7311    -45502     
+ Partials      11206        0    -11206     
Flag Coverage Δ
java ?
python 76.67% <51.33%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@christinadionysio christinadionysio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @shieru1214, overall this looks good! Please add the wfdb dependency to the python.yml file where the test environment for Scuro is created so the tests can also run in the CI.

@shieru1214

Copy link
Copy Markdown
Contributor Author

Thank you @shieru1214, overall this looks good! Please add the wfdb dependency to the python.yml file where the test environment for Scuro is created so the tests can also run in the CI.

Thanks! wfdb is now in the Scuro test environment.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants